]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/submodel.hxx
Improove FGTileMgr::scenery_available for small ranges.
[flightgear.git] / src / AIModel / submodel.hxx
index bbb3eaa020cd6c95948f8aafcd8b19b7c563c132..7ca046f9dc0789f8334c3a572634772d7635ea15 100644 (file)
@@ -19,9 +19,9 @@
 
 #include <Main/fg_props.hxx>
 
-SG_USING_STD(vector);
-SG_USING_STD(string);
-SG_USING_STD(list);
+using std::vector;
+using std::string;
+using std::list;
 
 class FGAIBase;
 
@@ -30,8 +30,7 @@ class FGSubmodelMgr : public SGSubsystem
 
 public:
 
-    typedef struct
-    {
+    typedef struct {
         SGPropertyNode_ptr trigger_node;
         SGPropertyNode_ptr prop;
         SGPropertyNode_ptr contents_node;
@@ -69,11 +68,12 @@ public:
         double             fuse_range;
         string             submodel;
         int                sub_id;
-    }
-    submodel;
+        bool               force_stabilised;
+        bool               ext_force;
+        string             force_path;
+    }   submodel;
 
-    typedef struct
-    {
+    typedef struct {
         double     lat;
         double     lon;
         double     alt;
@@ -92,8 +92,7 @@ public:
         double     mass;
         int        id;
         bool       no_roll;
-    }
-    IC_struct;
+    }   IC_struct;
 
     FGSubmodelMgr();
     ~FGSubmodelMgr();
@@ -109,7 +108,7 @@ public:
 private:
 
     typedef vector <submodel*> submodel_vector_type;
-    typedef submodel_vector_type::const_iterator submodel_vector_iterator;
+    typedef submodel_vector_type::iterator submodel_vector_iterator;
 
     submodel_vector_type       submodels;
     submodel_vector_type       subsubmodels;
@@ -119,9 +118,9 @@ private:
     float in[3];
     float out[3];
 
-    double Rx, Ry, Rz;
-    double Sx, Sy, Sz;
-    double Tx, Ty, Tz;
+    //double Rx, Ry, Rz;
+    //double Sx, Sy, Sz;
+    //double Tx, Ty, Tz;
 
     float cosRx, sinRx;
     float cosRy, sinRy;
@@ -175,7 +174,7 @@ private:
     IC_struct  IC;
 
     // A list of pointers to AI objects
-    typedef list <SGSharedPtr<FGAIBase> > sm_list_type;
+    typedef list <osg::ref_ptr<FGAIBase> > sm_list_type;
     typedef sm_list_type::iterator sm_list_iterator;
     typedef sm_list_type::const_iterator sm_list_const_iterator;
 
@@ -187,9 +186,9 @@ private:
     void setData(int id, string& path, bool serviceable);
     void setSubData(int id, string& path, bool serviceable);
     void valueChanged (SGPropertyNode *);
-    void transform(submodel_vector_iterator);
+    void transform(submodel *);
 
-    bool release(submodel_vector_iterator, double dt);
+    bool release(submodel *, double dt);
 
     double getRange(double lat, double lon, double lat2, double lon2) const;