1
0
Fork 0
flightgear/src/Model/acmodel.hxx
david a74c184cfb Separate the model geodetic position and orientation into a separate
class, FGModelPlacement, while FG3DModel retains control of animation.
This way, we can have a single, top-level placement, but multiple
layers of nested models underneath.  To include a nested model, use
something like this in the XML wrapper:

  <model>
   <path>Models/Stuff/my-component.xml</path>
   <offsets>
    <roll-offset-deg>45</roll-offset-deg>
   </offsets>
  </model>
2002-06-10 13:20:26 +00:00

51 lines
961 B
C++

// 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.
#ifndef __ACMODEL_HXX
#define __ACMODEL_HXX 1
#ifndef __cplusplus
# error This library requires C++
#endif
#include <vector>
SG_USING_STD(string);
SG_USING_STD(vector);
#include <Main/fgfs.hxx> // for FGSubsystem
// Don't pull in the headers, since we don't need them here.
class ssgRoot;
class ssgSelector;
class FGModelPlacement;
class FGAircraftModel : public FGSubsystem
{
public:
FGAircraftModel ();
virtual ~FGAircraftModel ();
virtual void init ();
virtual void bind ();
virtual void unbind ();
virtual void update (double dt);
virtual void draw ();
virtual FGModelPlacement * get3DModel() { return _aircraft; }
private:
FGModelPlacement * _aircraft;
ssgSelector * _selector;
ssgRoot * _scene;
float _nearplane;
float _farplane;
};
#endif // __ACMODEL_HXX