2002-04-05 03:19:34 +00:00
|
|
|
// 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);
|
|
|
|
|
2002-04-20 14:07:03 +00:00
|
|
|
#include <Main/fgfs.hxx> // for FGSubsystem
|
2002-04-05 03:19:34 +00:00
|
|
|
|
|
|
|
|
2002-04-20 14:07:03 +00:00
|
|
|
// Don't pull in the headers, since we don't need them here.
|
|
|
|
class ssgRoot;
|
|
|
|
class ssgSelector;
|
|
|
|
class FG3DModel;
|
2002-04-05 03:19:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
class FGAircraftModel : public FGSubsystem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
FGAircraftModel ();
|
|
|
|
virtual ~FGAircraftModel ();
|
|
|
|
|
|
|
|
virtual void init ();
|
|
|
|
virtual void bind ();
|
|
|
|
virtual void unbind ();
|
2002-05-11 16:28:50 +00:00
|
|
|
virtual void update (double dt);
|
2002-04-11 04:25:30 +00:00
|
|
|
virtual void draw ();
|
|
|
|
virtual FG3DModel * get3DModel() { return _aircraft; }
|
2002-04-05 03:19:34 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
FG3DModel * _aircraft;
|
2002-04-13 21:36:22 +00:00
|
|
|
ssgSelector * _selector;
|
2002-04-09 21:08:28 +00:00
|
|
|
ssgRoot * _scene;
|
|
|
|
float _nearplane;
|
|
|
|
float _farplane;
|
2002-04-05 03:19:34 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __ACMODEL_HXX
|