]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/acmodel.hxx
Modified Files:
[flightgear.git] / src / Model / acmodel.hxx
index 08ffd139fcc0151a354254ccc39588951e76dbc8..cbab40602d1570d34b4347b64dc8935c78012e22 100644 (file)
@@ -1,4 +1,4 @@
-// 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.
 #endif
 
 #include <vector>
+#include <string>
 
 SG_USING_STD(string);
 SG_USING_STD(vector);
 
-#include <simgear/misc/props.hxx>
+#include <osg/ref_ptr>
+#include <osg/Group>
+#include <osg/Switch>
 
-#include <Main/fgfs.hxx>
+#include <simgear/structure/subsystem_mgr.hxx> // for SGSubsystem
 
-#include "model.hxx"
 
+// Don't pull in the headers, since we don't need them here.
+class SGModelPlacement;
 
-class FGAircraftModel : public FGSubsystem
+
+class FGAircraftModel : public SGSubsystem
 {
 public:
 
@@ -32,20 +37,17 @@ public:
   virtual void init ();
   virtual void bind ();
   virtual void unbind ();
-  virtual void update (int dt);
-  virtual void draw ();
-  virtual FG3DModel * get3DModel() { return _aircraft; }
+  virtual void update (double dt);
+  virtual SGModelPlacement * get3DModel() { return _aircraft; }
+  void select( bool s ) { _selector->setValue( 0, s ); }
 
 private:
 
-  FG3DModel * _aircraft;
-  ssgSelector * _selector;
-  ssgRoot * _scene;
+  SGModelPlacement * _aircraft;
+  osg::ref_ptr<osg::Switch> _selector;
   float _nearplane;
   float _farplane;
 
 };
 
 #endif // __ACMODEL_HXX
-
-