-// model.hxx - manage a 3D aircraft model.
+#// model.hxx - manage a 3D aircraft model.
// Written by David Megginson, started 2002.
//
// This file is in the Public Domain, and comes with no warranty.
SG_USING_STD(string);
SG_USING_STD(vector);
+#include <osg/ref_ptr>
+#include <osg/Group>
+#include <osg/Switch>
+
#include <simgear/structure/subsystem_mgr.hxx> // for SGSubsystem
-#include <simgear/structure/ssgSharedPtr.hxx>
// Don't pull in the headers, since we don't need them here.
-class ssgRoot;
-class ssgSelector;
class SGModelPlacement;
virtual void bind ();
virtual void unbind ();
virtual void update (double dt);
- virtual void draw ();
virtual SGModelPlacement * get3DModel() { return _aircraft; }
- void select( bool s ) { _selector->select( s ? 0xffffffff : 0 ); }
+ void select( bool s ) { _selector->setValue( 0, s ); }
private:
SGModelPlacement * _aircraft;
- ssgSharedPtr<ssgSelector> _selector;
- ssgSharedPtr<ssgRoot> _scene;
+ osg::ref_ptr<osg::Switch> _selector;
float _nearplane;
float _farplane;