]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/stars.hxx
Merge branch 'ehofman/sound'
[simgear.git] / simgear / scene / sky / stars.hxx
index 8c02b44e532f69622891f66a88cc07cacc307959..bf311e31a6ea238d99d8dfa2caf2091455a8b062 100644 (file)
 #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
 
@@ -51,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
@@ -59,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[] );
 };