X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fenvironment%2Fvisual_enviro.hxx;h=9f6788e8260df754f71c345c41e03ef65de11757;hb=4e6159aa07f2817c09fad72db64d713e47f6f3da;hp=1c901b098734cb9005cd78ac70264463c75b2934;hpb=b05e98b1b61283f2cbf726f59a6266756e7f7809;p=simgear.git diff --git a/simgear/environment/visual_enviro.hxx b/simgear/environment/visual_enviro.hxx index 1c901b09..9f6788e8 100644 --- a/simgear/environment/visual_enviro.hxx +++ b/simgear/environment/visual_enviro.hxx @@ -23,14 +23,13 @@ #define _VISUAL_ENVIRO_HXX #include -#include STL_STRING +#include #include -SG_USING_STD(vector); -SG_USING_STD(string); +#include class SGLightning; -class SGSoundMgr; +class SGSampleGroup; /** * Simulate some echo on a weather radar. @@ -38,7 +37,8 @@ class SGSoundMgr; */ class SGWxRadarEcho { public: - SGWxRadarEcho(float _heading, float _alt, float _radius, float _dist, double _LWC, bool _lightning, int _cloudId) : + SGWxRadarEcho(float _heading, float _alt, float _radius, float _dist, + double _LWC, bool _lightning, int _cloudId ) : heading( _heading ), alt ( _alt ), radius ( _radius ), @@ -54,12 +54,12 @@ public: /** 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; + bool lightning; /** Unique identifier of cloud */ int cloudId; }; -typedef vector list_of_SGWxRadarEcho; +typedef std::vector list_of_SGWxRadarEcho; /** * Visual environment helper class. @@ -78,10 +78,10 @@ private: double last_cloud_turbulence, cloud_turbulence; bool lightning_enable_state; double elapsed_time, dt; - sgVec4 fog_color; - sgMat4 transform; + SGVec4f fog_color; + SGMatrixf 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; @@ -90,8 +90,8 @@ private: /** a list of all the radar echo. */ list_of_SGWxRadarEcho radarEcho; - static sgVec3 min_light; - static SGfloat streak_bright_nearmost_layer, + static SGVec3f min_light; + static float streak_bright_nearmost_layer, streak_bright_farmost_layer, streak_period_max, streak_period_change_per_kt, @@ -100,7 +100,7 @@ private: streak_length_change_per_kt, streak_length_max; static int streak_count_min, streak_count_max; - static SGfloat cone_base_radius, + static float cone_base_radius, cone_height; public: @@ -118,10 +118,11 @@ public: /** * Forward a few states used for renderings. */ - void startOfFrame( sgVec3 p, sgVec3 up, double lon, double lat, double alt, double delta_time); + void startOfFrame( SGVec3f p, SGVec3f up, double lon, double lat, double alt, double delta_time); void endOfFrame(void); +#if 0 /** * Whenever a cloud is drawn we check his 'impact' on the environment. * @param heading direction of cloud in radians @@ -131,7 +132,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. @@ -154,7 +155,7 @@ public: * Forward the fog color used by the rain rendering. * @param adj_fog_color color of the fog */ - void setLight(sgVec4 adj_fog_color); + void setLight(SGVec4f adj_fog_color); // this can be queried to add some turbulence for example bool is_view_in_cloud(void) const; @@ -239,14 +240,14 @@ 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 ); list_of_SGWxRadarEcho *get_radar_echo(void); - sgMat4 *get_transform(void) { return &transform; } + SGMatrixf *get_transform(void) { return &transform; } }; extern SGEnviro sgEnviro;