X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIBase.hxx;h=46d287f732778dd4397f07fb6bf7cf6fccba2057;hb=6b72986b276290073ae3fd1e889bf59b647c03e1;hp=0bdd6f85b0711ae990ed42e6700de7668e540876;hpb=79e251383be10eee7314dc030bc5eaa4c034ce7b;p=flightgear.git diff --git a/src/AIModel/AIBase.hxx b/src/AIModel/AIBase.hxx index 0bdd6f85b..46d287f73 100644 --- a/src/AIModel/AIBase.hxx +++ b/src/AIModel/AIBase.hxx @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -34,13 +33,13 @@ #include
-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(); };