#define _SG_MOON_HXX_
-#include <plib/ssg.h>
-
-#include <simgear/misc/sg_path.hxx>
+#include <osg/ref_ptr>
+#include <osg/MatrixTransform>
+#include <osg/Material>
+#include <simgear/math/SGMath.hxx>
+#include <simgear/structure/SGReferenced.hxx>
-class SGMoon {
+#include <simgear/misc/sg_path.hxx>
- ssgTransform *moon_transform;
- ssgSimpleState *orb_state;
- ssgSimpleState *halo_state;
- ssgColourArray *cl;
+class SGMoon : public SGReferenced {
- ssgVertexArray *halo_vl;
- ssgTexCoordArray *halo_tl;
+ osg::ref_ptr<osg::MatrixTransform> moon_transform;
+ osg::ref_ptr<osg::Material> orb_material;
double prev_moon_angle;
~SGMoon( void );
// build the moon object
- ssgBranch *build( SGPath path, double moon_size );
+ osg::Node *build( SGPath path, double moon_size );
// repaint the moon colors based on current value of moon_anglein
// degrees relative to verticle
// declination, offset by our current position (p) so that it
// appears fixed at a great distance from the viewer. Also add in
// an optional rotation (i.e. for the current time of day.)
- bool reposition( sgVec3 p, double angle,
- double rightAscension, double declination,
+ bool reposition( double rightAscension, double declination,
double moon_dist );
};