SGEnviro Class Reference
Visual environment helper class.
More...
#include <visual_enviro.hxx>
List of all members.
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_sampleGroup (SGSampleGroup *sgr) |
| Forward the sound manager instance to be able to play samples.
|
Friends |
class | SGLightning |
Detailed Description
Visual environment helper class.
Definition at line 70 of file visual_enviro.hxx.
Member Function Documentation
void SGEnviro::addLightning |
( |
double |
lon, |
|
|
double |
lat, |
|
|
double |
alt | |
|
) |
| | |
Spawn a new lighning at specified lon/lat.
- Parameters:
-
| 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 728 of file visual_enviro.cxx.
void SGEnviro::config |
( |
const class SGPropertyNode * |
precip_rendering_cfgNode |
) |
|
Read the config from the precipitation rendering config properties.
- Parameters:
-
| 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.
- Parameters:
-
| 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 539 of file visual_enviro.cxx.
void SGEnviro::set_CacheResolution |
( |
int |
resolutionPixels |
) |
|
Set the resolution of the impostor texture for 3D clouds.
- Parameters:
-
| resolutionPixels | size of each texture in pixels (64|128|256) |
void SGEnviro::set_clouds_CacheSize |
( |
int |
sizeKb |
) |
|
Set the size of the impostor texture cache for 3D clouds.
- Parameters:
-
| sizeKb | size of the texture pool in Kb |
void SGEnviro::set_clouds_density |
( |
float |
density |
) |
|
Set the proportion of clouds that will be rendered to limit drop in FPS.
- Parameters:
-
| 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.
- Parameters:
-
| enable | when false we draw the 2D layers |
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
- Parameters:
-
void SGEnviro::set_lightning_enable_state |
( |
bool |
enable |
) |
|
Enable or disable the rendering of lightning and the thunder sound.
- Parameters:
-
| enable | when true we will draw lightning spwaned by cumulonimbus |
Definition at line 285 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.
- Parameters:
-
Definition at line 273 of file visual_enviro.cxx.
void SGEnviro::set_precipitation_enable_state |
( |
bool |
enable |
) |
|
Enable or disable the rendering of precipitation around the viewer.
- Parameters:
-
| enable | when true we will draw precipitation depending on metar data |
Definition at line 276 of file visual_enviro.cxx.
void SGEnviro::set_sampleGroup |
( |
SGSampleGroup * |
sgr |
) |
|
Forward the sound manager instance to be able to play samples.
- Parameters:
-
| mgr | a running sound manager |
Definition at line 535 of file visual_enviro.cxx.
void SGEnviro::set_turbulence_enable_state |
( |
bool |
enable |
) |
|
Enable or disable the use of proximity cloud turbulence.
- Parameters:
-
| enable | when true the turbulence is computed based on type of cloud around the AC |
Definition at line 262 of file visual_enviro.cxx.
void SGEnviro::setLight |
( |
sgVec4 |
adj_fog_color |
) |
|
Forward the fog color used by the rain rendering.
- Parameters:
-
| adj_fog_color | color of the fog |
Definition at line 292 of file visual_enviro.cxx.
The documentation for this class was generated from the following files: