// 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_MOON_HXX_
-#include <plib/ssg.h>
+#include <osg/ref_ptr>
+#include <osg/MatrixTransform>
+#include <osg/Material>
-#include <simgear/misc/sg_path.hxx>
+#include <simgear/math/SGMath.hxx>
+#include <simgear/structure/SGReferenced.hxx>
+#include <simgear/misc/sg_path.hxx>
-class SGMoon {
- ssgTransform *moon_transform;
- ssgSimpleState *orb_state;
- ssgSimpleState *halo_state;
+class SGMoon : public SGReferenced {
- ssgColourArray *cl;
+ osg::ref_ptr<osg::MatrixTransform> moon_transform;
+ osg::ref_ptr<osg::Material> orb_material;
- ssgVertexArray *halo_vl;
- ssgTexCoordArray *halo_tl;
+ double prev_moon_angle;
public:
~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 );
};