#include <visual_enviro.hxx>
Public Member Functions | |
| void | config (const class SGPropertyNode *precip_rendering_cfgNode) |
| Read the config from the precipitation rendering config properties. | |
| void | startOfFrame (sgVec3 p, sgVec3 up, double lon, double lat, double alt, double delta_time) |
| Forward a few states used for renderings. | |
| void | drawPrecipitation (double rain_norm, double snow_norm, double hail_norm, double pitch, double roll, double heading, double hspeed) |
| Draw rain or snow precipitation around the viewer. | |
| void | drawLightning (void) |
| Draw the lightnings spawned by cumulo nimbus. | |
| void | setLight (sgVec4 adj_fog_color) |
| Forward the fog color used by the rain rendering. | |
| void | set_clouds_CacheSize (int sizeKb) |
| Set the size of the impostor texture cache for 3D clouds. | |
| void | set_CacheResolution (int resolutionPixels) |
| Set the resolution of the impostor texture for 3D clouds. | |
| void | set_clouds_visibility (float distance) |
| Set the maximum range used when drawing clouds. | |
| void | set_clouds_density (float density) |
| Set the proportion of clouds that will be rendered to limit drop in FPS. | |
| void | set_clouds_enable_state (bool enable) |
| Enable or disable the use of 3D clouds. | |
| void | set_turbulence_enable_state (bool enable) |
| Enable or disable the use of proximity cloud turbulence. | |
| void | set_precipitation_density (float density) |
| Decrease the precipitation density to the given percentage. | |
| void | set_precipitation_enable_state (bool enable) |
| Enable or disable the rendering of precipitation around the viewer. | |
| void | set_lightning_enable_state (bool enable) |
| Enable or disable the rendering of lightning and the thunder sound. | |
| void | addLightning (double lon, double lat, double alt) |
| Spawn a new lighning at specified lon/lat. | |
| void | set_soundMgr (SGSoundMgr *mgr) |
| Forward the sound manager instance to be able to play samples. | |
Friends | |
| class | SGLightning |
Definition at line 70 of file visual_enviro.hxx.
| void SGEnviro::config | ( | const class SGPropertyNode * | precip_rendering_cfgNode | ) |
Read the config from the precipitation rendering config properties.
| precip_rendering_cfgNode | "/sim/rendering/precipitation" in fg Set from whatever info present in the subnodes passed, substituting hardwired defaults for missing fields. If NULL is given, do nothing. |
| void SGEnviro::drawPrecipitation | ( | double | rain_norm, | |
| double | snow_norm, | |||
| double | hail_norm, | |||
| double | pitch, | |||
| double | roll, | |||
| double | heading, | |||
| double | hspeed | |||
| ) |
Draw rain or snow precipitation around the viewer.
| rain_norm | rain normalized intensity given by metar class | |
| snow_norm | snow normalized intensity given by metar class | |
| hail_norm | hail normalized intensity given by metar class | |
| pitch | pitch rotation of viewer | |
| roll | roll rotation of viewer | |
| hspeed | moving horizontal speed of viewer in kt |
Definition at line 537 of file visual_enviro.cxx.
| void SGEnviro::setLight | ( | sgVec4 | adj_fog_color | ) |
Forward the fog color used by the rain rendering.
| adj_fog_color | color of the fog |
Definition at line 290 of file visual_enviro.cxx.
| void SGEnviro::set_clouds_CacheSize | ( | int | sizeKb | ) |
Set the size of the impostor texture cache for 3D clouds.
| sizeKb | size of the texture pool in Kb |
| void SGEnviro::set_CacheResolution | ( | int | resolutionPixels | ) |
Set the resolution of the impostor texture for 3D clouds.
| resolutionPixels | size of each texture in pixels (64|128|256) |
| void SGEnviro::set_clouds_visibility | ( | float | distance | ) |
Set the maximum range used when drawing clouds.
Clouds are blended from totaly transparent at max range to totaly opaque around the viewer
| distance | in meters |
| void SGEnviro::set_clouds_density | ( | float | density | ) |
Set the proportion of clouds that will be rendered to limit drop in FPS.
| density | 0..100 no clouds drawn when density == 0, all are drawn when density == 100 |
| void SGEnviro::set_clouds_enable_state | ( | bool | enable | ) |
Enable or disable the use of 3D clouds.
| enable | when false we draw the 2D layers |
| void SGEnviro::set_turbulence_enable_state | ( | bool | enable | ) |
Enable or disable the use of proximity cloud turbulence.
| enable | when true the turbulence is computed based on type of cloud around the AC |
Definition at line 260 of file visual_enviro.cxx.
| void SGEnviro::set_precipitation_density | ( | float | density | ) |
Decrease the precipitation density to the given percentage.
(Only show the given percentage of rain streaks etc.) Default precipitation density upon construction is 100.0.
| density | 0.0 to 100.0 |
Definition at line 271 of file visual_enviro.cxx.
| void SGEnviro::set_precipitation_enable_state | ( | bool | enable | ) |
Enable or disable the rendering of precipitation around the viewer.
| enable | when true we will draw precipitation depending on metar data |
Definition at line 274 of file visual_enviro.cxx.
| void SGEnviro::set_lightning_enable_state | ( | bool | enable | ) |
Enable or disable the rendering of lightning and the thunder sound.
| enable | when true we will draw lightning spwaned by cumulonimbus |
Definition at line 283 of file visual_enviro.cxx.
| void SGEnviro::addLightning | ( | double | lon, | |
| double | lat, | |||
| double | alt | |||
| ) |
Spawn a new lighning at specified lon/lat.
| lon | position of the new lightning | |
| lat | position of the new lightning | |
| alt | asl of the starting point of the lightning in meters |
Definition at line 726 of file visual_enviro.cxx.
| void SGEnviro::set_soundMgr | ( | SGSoundMgr * | mgr | ) |
Forward the sound manager instance to be able to play samples.
| mgr | a running sound manager |
Definition at line 533 of file visual_enviro.cxx.
1.5.6