]> 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 0cf5e52cad12e06d7b90c6ca714612b1c0482120..9f2870dfa8655a941740fcb61ee1ee0570340118 100644 (file)
 #include <simgear/math/point3d.hxx>
 #include <simgear/scene/model/model.hxx>
 #include <simgear/scene/model/placement.hxx>
+#include <simgear/structure/ssgSharedPtr.hxx>
 
-class ssgBranch;
+
+class ssgBase;
 
 
 /*****************************************************************
@@ -47,15 +49,15 @@ public:
        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);
+    virtual void RegisterTransmission(int code)=0;
        
-       inline Point3D GetPos() { return(_pos); }
+       inline const Point3D& GetPos() const { return(_pos); }
        
-       virtual string GetCallsign();
+       virtual const string& GetCallsign()=0;
        
 protected:
 
@@ -65,7 +67,7 @@ protected:
     double _pitch;     //degrees
 
     char* _model_path; //Path to the 3D model
-       ssgBranch* _model;      // Pointer to the model
+    ssgSharedPtr<ssgBranch> _model;    // Pointer to the model
     SGModelPlacement _aip;
 
     void Transform();