#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
~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
// 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[] );
};