]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIBase.hxx
Merge branch 'topic/gcintersect' into next
[flightgear.git] / src / AIModel / AIBase.hxx
index 0bdd6f85b0711ae990ed42e6700de7668e540876..46d287f732778dd4397f07fb6bf7cf6fccba2057 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <simgear/constants.h>
 #include <simgear/math/SGMath.hxx>
-#include <simgear/math/point3d.hxx>
 #include <simgear/scene/model/placement.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/structure/SGSharedPtr.hxx>
 #include <Main/fg_props.hxx>
 
 
-SG_USING_STD(string);
-SG_USING_STD(list);
+using std::string;
+using std::list;
 
 class FGAIManager;
 class FGAIFlightPlan;
 
-class FGAIBase : public SGReferenced {
+class FGAIBase : public osg::Referenced {
 
 public:
     enum object_type { otNull = 0, otAircraft, otShip, otCarrier, otBallistic,
@@ -54,6 +53,7 @@ public:
     virtual void readFromScenario(SGPropertyNode* scFileNode);
 
     virtual bool init(bool search_in_AI_path=false);
+    virtual void initModel(osg::Node *node);
     virtual void update(double dt);
     virtual void bind();
     virtual void unbind();
@@ -191,6 +191,7 @@ protected:
 private:
     int _refID;
     object_type _otype;
+    bool _initialized;
 
 public:
     object_type getType();
@@ -266,11 +267,9 @@ public:
     inline double _getRange() { return range; };
     inline double _getBearing() { return bearing; };
 
-    osg::Node* load3DModel(const string& fg_root,
-                            const string &path,
-                            SGPropertyNode *prop_root,
-                            double sim_time_sec);
-
+    virtual osg::Node* load3DModel(const string &path,
+                           SGPropertyNode *prop_root);
     static bool _isNight();
 };