#include <cloud.hxx>
Public Types | |
| enum | Coverage |
| This is the list of available cloud coverages/textures. | |
Public Member Functions | |
| SGCloudLayer (const string &tex_path) | |
| Constructor. | |
| ~SGCloudLayer (void) | |
| Destructor. | |
| float | getSpan_m () const |
| get the cloud span (in meters) | |
| void | setSpan_m (float span_m) |
| set the cloud span | |
| float | getElevation_m () const |
| get the layer elevation (in meters) | |
| void | setElevation_m (float elevation_m, bool set_span=true) |
| set the layer elevation. | |
| float | getThickness_m () const |
| get the layer thickness | |
| void | setThickness_m (float thickness_m) |
| set the layer thickness. | |
| float | getTransition_m () const |
| get the transition/boundary layer depth in meters. | |
| void | setTransition_m (float transition_m) |
| set the transition layer size in meters | |
| Coverage | getCoverage () const |
| get coverage type | |
| void | setCoverage (Coverage coverage) |
| set coverage type | |
| void | setDirection (float dir) |
| set the cloud movement direction | |
| float | getDirection () |
| get the cloud movement direction | |
| void | setSpeed (float sp) |
| set the cloud movement speed | |
| float | getSpeed () |
| get the cloud movement speed | |
| void | setAlpha (float alpha) |
| set the alpha component of the cloud base color. | |
| void | rebuild () |
| build the cloud object | |
| bool | repaint (sgVec3 fog_color) |
| repaint the cloud colors based on the specified fog_color | |
| bool | reposition (sgVec3 p, sgVec3 up, double lon, double lat, double alt, double dt=0.0) |
| reposition the cloud layer at the specified origin and orientation. | |
| void | draw (bool top, float *sun_color) |
| draw the cloud layer | |
| SGCloudField * | get_layer3D (void) |
| return the 3D layer cloud associated with this 2D layer | |
Static Public Attributes | |
| static bool | enable_bump_mapping |
Definition at line 47 of file cloud.hxx.
| SGCloudLayer::SGCloudLayer | ( | const string & | tex_path | ) |
| void SGCloudLayer::setSpan_m | ( | float | span_m | ) |
set the cloud span
| span_m | the cloud span in meters |
Definition at line 251 of file cloud.cxx.
References rebuild().
Referenced by setElevation_m().
| void SGCloudLayer::setElevation_m | ( | float | elevation_m, | |
| bool | set_span = true | |||
| ) |
set the layer elevation.
Note that this specifies the bottom of the cloud layer. The elevation of the top of the layer is elevation_m + thickness_m.
| elevation_m | the layer elevation in meters | |
| set_span | defines whether it is allowed to adjust the span |
Definition at line 266 of file cloud.cxx.
References setSpan_m().
| void SGCloudLayer::setThickness_m | ( | float | thickness_m | ) |
| float SGCloudLayer::getTransition_m | ( | ) | const |
| void SGCloudLayer::setTransition_m | ( | float | transition_m | ) |
| void SGCloudLayer::setCoverage | ( | Coverage | coverage | ) |
| void SGCloudLayer::setDirection | ( | float | dir | ) | [inline] |
| void SGCloudLayer::setSpeed | ( | float | sp | ) | [inline] |
| void SGCloudLayer::setAlpha | ( | float | alpha | ) | [inline] |
| bool SGCloudLayer::repaint | ( | sgVec3 | fog_color | ) |
repaint the cloud colors based on the specified fog_color
| fog_color | the fog color |
Definition at line 610 of file cloud.cxx.
References enable_bump_mapping, and ssgColourArray::get().
Referenced by rebuild().
| bool SGCloudLayer::reposition | ( | sgVec3 | p, | |
| sgVec3 | up, | |||
| double | lon, | |||
| double | lat, | |||
| double | alt, | |||
| double | dt = 0.0 | |||
| ) |
reposition the cloud layer at the specified origin and orientation.
| p | position vector | |
| up | the local up vector | |
| lon | specifies a rotation about the Z axis | |
| lat | specifies a rotation about the new Y axis | |
| spin | specifies a rotation about the new Z axis (and orients the sunrise/set effects) | |
| dt | the time elapsed since the last call |
Definition at line 654 of file cloud.cxx.
References enable_bump_mapping, ssgTexCoordArray::get(), SGCloudField::reposition(), ssgTransform::setTransform(), and SG_LOG.
1.5.1