]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/AIEntity.hxx
Catch sound exceptions at the earliest, report problem has an alert, and continue...
[flightgear.git] / src / ATC / AIEntity.hxx
index 1c8afdc9e9e3fa877c09ed5ad644fb544aada722..9f2870dfa8655a941740fcb61ee1ee0570340118 100644 (file)
 #ifndef _FG_AIEntity_HXX
 #define _FG_AIEntity_HXX
 
-#include <Model/model.hxx>
-#include <plib/sg.h>
-#include <plib/ssg.h>
 #include <simgear/math/point3d.hxx>
+#include <simgear/scene/model/model.hxx>
+#include <simgear/scene/model/placement.hxx>
+#include <simgear/structure/ssgSharedPtr.hxx>
+
+
+class ssgBase;
 
 
 /*****************************************************************
@@ -39,24 +42,33 @@ class FGAIEntity {
 
 public:
 
+       FGAIEntity();
     virtual ~FGAIEntity();
+       
+       // Set the 3D model to use (Must be called)
+       void SetModel(ssgBranch* model);
 
     // Run the internal calculations
-    virtual void Update(double dt);
+    virtual void Update(double dt)=0;
+       
+    // Send a transmission *TO* the AIEntity.
+    // FIXME int code is a hack - eventually this will receive Alexander's coded messages.
+    virtual void RegisterTransmission(int code)=0;
+       
+       inline const Point3D& GetPos() const { return(_pos); }
+       
+       virtual const string& GetCallsign()=0;
        
-       // Send a transmission *TO* the AIEntity.
-       // FIXME int code is a hack - eventually this will receive Alexander's coded messages.
-       virtual void RegisterTransmission(int code);
-
 protected:
 
-    Point3D pos;       // WGS84 lat & lon in degrees, elev above sea-level in meters
-    double hdg;                //True heading in degrees
-    double roll;       //degrees
-    double pitch;      //degrees
+    Point3D _pos;      // WGS84 lat & lon in degrees, elev above sea-level in meters
+    double _hdg;               //True heading in degrees
+    double _roll;      //degrees
+    double _pitch;     //degrees
 
-    char* model_path;  //Path to the 3D model
-    FGModelPlacement aip;
+    char* _model_path; //Path to the 3D model
+    ssgSharedPtr<ssgBranch> _model;    // Pointer to the model
+    SGModelPlacement _aip;
 
     void Transform();
 };