]> git.mxchange.org Git - simgear.git/blobdiff - simgear/environment/visual_enviro.hxx
use auto_ptr instead
[simgear.git] / simgear / environment / visual_enviro.hxx
index 8eb8b3e991876ad6c2cc1e833eb57c793b45e285..08830c0bf6b3b8be6685a47b71c3b95b1ac82568 100644 (file)
@@ -1,9 +1,6 @@
 // Visual environment helper class
 //
 // Written by Harald JOHNSEN, started April 2005.
-// Minor changes/additions by Vivian Meazza Apr- May 2007
-//
-// Ported to OSG by Tim Moore Jun 2007
 //
 // Copyright (C) 2005  Harald JOHNSEN - hjohnsen@evc.net
 //
 #include <plib/sg.h>
 
 #include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
 #include <vector>
 
-SG_USING_STD(vector);
-SG_USING_STD(string);
+using std::vector;
+using std::string;
 
 class SGLightning;
-class SGSoundMgr;
+class SGSampleGroup;
 
 /**
  * Simulate some echo on a weather radar.
@@ -43,32 +40,24 @@ class SGSoundMgr;
  */
 class SGWxRadarEcho {
 public:
-       SGWxRadarEcho(float _bearing, float _alt, float _radius, float _dist, float _heading,
-                       double _LWC, bool _lightning, int _cloudId, bool _aircraft) :
-         bearing (_bearing),
+       SGWxRadarEcho(float _heading, float _alt, float _radius, float _dist,
+                       double _LWC, bool _lightning, int _cloudId ) :
          heading( _heading ),
          alt ( _alt ),
          radius ( _radius ),
          dist ( _dist ),
          LWC ( _LWC ),
          lightning ( _lightning ),
-         aircraft ( _aircraft ),
          cloudId ( _cloudId )
        {}
 
-       /** the heading and bearing in radian are versus north */
-       float bearing, heading;
+       /** the heading in radian is versus north */
+       float heading;
        float alt, radius, dist;
-
        /** reflectivity converted to liquid water content. */
        double LWC;
-
        /** if true then this data is for a lightning else it is for water echo. */
-       bool   lightning;
-
-       /** if true then this data is for an aircraft  */
-       bool aircraft;
-
+       bool lightning;
        /** Unique identifier of cloud */
        int cloudId;
 };
@@ -95,7 +84,7 @@ private:
        sgVec4  fog_color;
        sgMat4 transform;
        double last_lon, last_lat, last_alt;
-       SGSoundMgr      *soundMgr;
+       SGSampleGroup   *sampleGroup;
        bool            snd_active, snd_playing;
        double          snd_timer, snd_wait, snd_pos_lat, snd_pos_lon, snd_dist;
        double          min_time_before_lt;
@@ -136,6 +125,7 @@ public:
 
        void endOfFrame(void);
 
+#if 0
     /**
      * Whenever a cloud is drawn we check his 'impact' on the environment.
      * @param heading direction of cloud in radians
@@ -145,7 +135,7 @@ public:
      * @param dist  squared dist to cloud in meters
      */
        void callback_cloud(float heading, float alt, float radius, int family, float dist, int cloudId);
-
+#endif
        void drawRain(double pitch, double roll, double heading, double hspeed, double rain_norm);
     /**
      * Draw rain or snow precipitation around the viewer.
@@ -253,7 +243,7 @@ public:
      * Forward the sound manager instance to be able to play samples.
      * @param mgr a running sound manager
      */
-       void set_soundMgr(SGSoundMgr *mgr);
+       void set_sampleGroup(SGSampleGroup *sgr);
 
        void setFOV( float w, float h );
        void getFOV( float &w, float &h );