#define _FG_AIBASE_HXX
#include <string>
-
-#include <osg/LOD>
+#include <osg/ref_ptr>
#include <simgear/constants.h>
#include <simgear/scene/model/placement.hxx>
#include <simgear/math/sg_geodesy.hxx>
-#include <Main/fg_props.hxx>
+namespace osg { class PagedLOD; }
namespace simgear {
class BVHMaterial;
virtual void readFromScenario(SGPropertyNode* scFileNode);
virtual bool init(bool search_in_AI_path=false);
- virtual void initModel(osg::Node *node);
+ virtual void initModel();
virtual void update(double dt);
virtual void bind();
virtual void unbind();
virtual void reinit() {}
void updateLOD();
+ void updateInterior();
void setManager(FGAIManager* mgr, SGPropertyNode* p);
void setPath( const char* model );
void setSMPath( const std::string& p );
int _getSubID() const;
bool getDie();
+ bool isValid();
SGVec3d getCartPosAt(const SGVec3d& off) const;
SGVec3d getCartPos() const;
protected:
double _elevation_m;
+ double _maxRangeInterior;
double _x_offset;
double _y_offset;
int _refID;
object_type _otype;
bool _initialized;
- osg::ref_ptr<osg::LOD> _model; //The 3D model LOD object
+ osg::ref_ptr<osg::PagedLOD> _model;
+ osg::ref_ptr<osg::PagedLOD> _interior;
osg::ref_ptr<FGAIModelData> _modeldata;
std::string & getCallSign();
};
+typedef SGSharedPtr<FGAIBase> FGAIBasePtr;
+
inline void FGAIBase::setManager(FGAIManager* mgr, SGPropertyNode* p) {
manager = mgr;
props = p;