]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIBase.hxx
Postpone initialization of the avionics soundgroup until avionics are enabled. This...
[flightgear.git] / src / AIModel / AIBase.hxx
index fa85d5d2b656ab066311caf672ec4ceac73167f1..726ce303bef95d5d008609686c5d2757b84b7cd5 100644 (file)
@@ -43,6 +43,7 @@ using std::list;
 class SGMaterial;
 class FGAIManager;
 class FGAIFlightPlan;
+class FGFX;
 
 class FGAIBase : public SGReferenced {
 
@@ -64,6 +65,7 @@ public:
     virtual void unbind();
     virtual void reinit() {}
 
+    void updateLOD();
     void setManager(FGAIManager* mgr, SGPropertyNode* p);
     void setPath( const char* model );
     void setSMPath( const string& p );
@@ -133,7 +135,7 @@ public:
     string _path;
     string _callsign;
     string _submodel;
-    string _name;
+    std::string _name;
     string _parent;
 
     SGGeod userpos;
@@ -186,7 +188,6 @@ protected:
     double ht_diff;             // value used by radar display instrument
 
     string model_path;    //Path to the 3D model
-    osg::ref_ptr<osg::Node> model; //The 3D model object
     SGModelPlacement aip;
 
     bool delete_me;
@@ -216,12 +217,16 @@ protected:
     void CalculateMach();
     double UpdateRadar(FGAIManager* manager);
 
+    void removeModel();
+
     static int _newAIModelID();
 
 private:
     int _refID;
     object_type _otype;
     bool _initialized;
+    osg::ref_ptr<osg::LOD> _model; //The 3D model LOD object
+    SGSharedPtr<FGFX>  _fx;
 
 public:
     object_type getType();