-// model.hxx - manage a 3D aircraft model.
+// acmodel.hxx - manage a 3D aircraft model.
// Written by David Megginson, started 2002.
//
// This file is in the Public Domain, and comes with no warranty.
#ifndef __ACMODEL_HXX
#define __ACMODEL_HXX 1
-#ifndef __cplusplus
-# error This library requires C++
-#endif
+#include <osg/ref_ptr>
+#include <osg/Group>
+#include <osg/Switch>
-#include <vector>
+#include <simgear/structure/subsystem_mgr.hxx> // for SGSubsystem
-SG_USING_STD(string);
-SG_USING_STD(vector);
-#include <simgear/misc/props.hxx>
+// Don't pull in the headers, since we don't need them here.
+class SGModelPlacement;
+class FGFX;
-#include <Main/fgfs.hxx>
-
-#include "model.hxx"
-
-
-class FGAircraftModel : public FGSubsystem
+class FGAircraftModel : public SGSubsystem
{
public:
virtual ~FGAircraftModel ();
virtual void init ();
+ virtual void reinit ();
virtual void bind ();
virtual void unbind ();
- virtual void update (int dt);
+ virtual void update (double dt);
+ virtual SGModelPlacement * get3DModel() { return _aircraft; }
+ virtual SGVec3d& getVelocity() { return _velocity; }
private:
-
- FG3DModel * _aircraft;
-
+ void deinit ();
+
+ SGModelPlacement * _aircraft;
+ SGVec3d _velocity;
+ SGSharedPtr<FGFX> _fx;
+
+ SGPropertyNode_ptr _lon;
+ SGPropertyNode_ptr _lat;
+ SGPropertyNode_ptr _alt;
+ SGPropertyNode_ptr _pitch;
+ SGPropertyNode_ptr _roll;
+ SGPropertyNode_ptr _heading;
+ SGPropertyNode_ptr _speed_n;
+ SGPropertyNode_ptr _speed_e;
+ SGPropertyNode_ptr _speed_d;
};
-extern FGAircraftModel current_model;
-
#endif // __ACMODEL_HXX
-