SGCloudLayer Class Reference
A class layer to model a single cloud layer.
More...
#include <cloud.hxx>
List of all members.
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
|
void | set_enable3dClouds (bool enable) |
| Enable/disable 3D clouds in this layer.
|
bool | repaint (const SGVec3f &fog_color) |
| repaint the cloud colors based on the specified fog_color
|
bool | reposition (const SGVec3f &p, const SGVec3f &up, double lon, double lat, double alt, double dt=0.0) |
| reposition the cloud layer at the specified origin and orientation.
|
SGCloudField * | get_layer3D (void) |
| return the 3D layer cloud associated with this 2D layer
|
Detailed Description
A class layer to model a single cloud layer.
Definition at line 50 of file cloud.hxx.
Constructor & Destructor Documentation
SGCloudLayer::SGCloudLayer |
( |
const string & |
tex_path |
) |
|
Constructor.
- Parameters:
-
| tex_path | the path to the set of cloud textures |
Definition at line 132 of file cloud.cxx.
Member Function Documentation
float SGCloudLayer::getTransition_m |
( |
|
) |
const |
get the transition/boundary layer depth in meters.
This allows gradual entry/exit from the cloud layer via adjusting visibility.
Definition at line 259 of file cloud.cxx.
bool SGCloudLayer::repaint |
( |
const SGVec3f & |
fog_color |
) |
|
repaint the cloud colors based on the specified fog_color
- Parameters:
-
Definition at line 603 of file cloud.cxx.
bool SGCloudLayer::reposition |
( |
const SGVec3f & |
p, |
|
|
const SGVec3f & |
up, |
|
|
double |
lon, |
|
|
double |
lat, |
|
|
double |
alt, |
|
|
double |
dt = 0.0 | |
|
) |
| | |
reposition the cloud layer at the specified origin and orientation.
- Parameters:
-
| 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 620 of file cloud.cxx.
void SGCloudLayer::setAlpha |
( |
float |
alpha |
) |
[inline] |
set the alpha component of the cloud base color.
Normally this should be 1.0, but you can set it anywhere in the range of 0.0 to 1.0 to fade a cloud layer in or out.
- Parameters:
-
| alpha | cloud alpha value (0.0 to 1.0) |
Definition at line 156 of file cloud.hxx.
void SGCloudLayer::setCoverage |
( |
Coverage |
coverage |
) |
|
set coverage type
- Parameters:
-
| coverage | the coverage type |
Definition at line 277 of file cloud.cxx.
void SGCloudLayer::setDirection |
( |
float |
dir |
) |
[inline] |
set the cloud movement direction
- Parameters:
-
| dir | the cloud movement direction |
Definition at line 130 of file cloud.hxx.
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.
- Parameters:
-
| elevation_m | the layer elevation in meters |
| set_span | defines whether it is allowed to adjust the span |
Definition at line 234 of file cloud.cxx.
void SGCloudLayer::setSpan_m |
( |
float |
span_m |
) |
|
set the cloud span
- Parameters:
-
| span_m | the cloud span in meters |
Definition at line 219 of file cloud.cxx.
void SGCloudLayer::setSpeed |
( |
float |
sp |
) |
[inline] |
set the cloud movement speed
- Parameters:
-
| sp | the cloud movement speed |
Definition at line 142 of file cloud.hxx.
void SGCloudLayer::setThickness_m |
( |
float |
thickness_m |
) |
|
set the layer thickness.
- Parameters:
-
| thickness_m | the layer thickness in meters. |
Definition at line 253 of file cloud.cxx.
void SGCloudLayer::setTransition_m |
( |
float |
transition_m |
) |
|
set the transition layer size in meters
- Parameters:
-
| transition_m | the transition layer size in meters |
Definition at line 265 of file cloud.cxx.
The documentation for this class was generated from the following files: