]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIBase.hxx
Interim windows build fix
[flightgear.git] / src / AIModel / AIBase.hxx
index 52be8e5a3d89b7b205f671f89ef150d26fc14da3..da27569c17de424cfb66bc5cccefd8f62ab692be 100644 (file)
@@ -21,8 +21,7 @@
 #define _FG_AIBASE_HXX
 
 #include <string>
-
-#include <osg/LOD>
+#include <osg/ref_ptr>
 
 #include <simgear/constants.h>
 #include <simgear/scene/model/placement.hxx>
@@ -34,7 +33,7 @@
 
 #include <simgear/math/sg_geodesy.hxx>
 
-#include <Main/fg_props.hxx>
+namespace osg { class PagedLOD; }
 
 namespace simgear {
 class BVHMaterial;
@@ -59,13 +58,14 @@ public:
     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 );
@@ -108,6 +108,7 @@ public:
     int _getSubID() const;
 
     bool getDie();
+       bool isValid();
 
     SGVec3d getCartPosAt(const SGVec3d& off) const;
     SGVec3d getCartPos() const;
@@ -123,6 +124,7 @@ public:
 protected:
     double _elevation_m;
     
+    double _maxRangeInterior;
 
     double _x_offset;
     double _y_offset;
@@ -233,7 +235,8 @@ private:
     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;
 
@@ -320,6 +323,8 @@ public:
     std::string & getCallSign();
 };
 
+typedef SGSharedPtr<FGAIBase> FGAIBasePtr;
+
 inline void FGAIBase::setManager(FGAIManager* mgr, SGPropertyNode* p) {
     manager = mgr;
     props = p;