]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/stars.hxx
Merge branch 'ehofman/sound'
[simgear.git] / simgear / scene / sky / stars.hxx
index 4260aad4491fb47362e5dcfc6671b253479e26b1..bf311e31a6ea238d99d8dfa2caf2091455a8b062 100644 (file)
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Library General Public License for more details.
 //
-// You should have received a copy of the GNU Library General Public
-// License along with this library; if not, write to the
-// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-// Boston, MA  02111-1307, USA.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 #define _SG_STARS_HXX_
 
 
-#include <plib/ssg.h>
+#include <osg/Array>
 
+#include <simgear/math/SGMath.hxx>
+#include <simgear/structure/SGReferenced.hxx>
 
-class SGStars {
 
-    ssgTransform *stars_transform;
-    ssgSimpleState *state;
+class SGStars : public SGReferenced {
 
-    ssgColourArray *cl;
-    ssgVertexArray *vl;
+    osg::ref_ptr<osg::Vec4Array> cl;
 
     int old_phase;             // data for optimization
 
@@ -52,7 +50,7 @@ public:
     ~SGStars( void );
 
     // initialize the stars structure
-    ssgBranch *build( int num, sgdVec3 *star_data, double star_dist );
+    osg::Node* build( int num, const SGVec3d star_data[], double star_dist );
 
     // repaint the planet magnitudes based on current value of
     // sun_angle in degrees relative to verticle (so we can make them
@@ -60,12 +58,7 @@ public:
     // 0 degrees = high noon
     // 90 degrees = sun rise/set
     // 180 degrees = darkest midnight
-    bool repaint( double sun_angle, int num, sgdVec3 *star_data );
-
-    // reposition the stars for the specified time (GST rotation),
-    // offset by our current position (p) so that it appears fixed at
-    // a great distance from the viewer.
-    bool reposition( sgVec3 p, double angle );
+    bool repaint( double sun_angle, int num, const SGVec3d star_data[] );
 };