![]() |
VR-Forces 4.10 Class Documentation
|
A weather area represents localized environmental conditions such as blowing dust, blowing sand, or blowing snow. More...

Public Member Functions | |
| virtual | ~DtWeatherArea () |
| DTOR. More... | |
| DtWeatherArea ()=delete | |
| Default Constructor not implemented. More... | |
| DtWeatherArea (const DtWeatherArea &other)=delete | |
| Copy Constructor not implemented - Copy not allowed. More... | |
| DtWeatherArea & | operator= (const DtWeatherArea &other)=delete |
| Assignment Operator not implemented - Assignment not allowed. More... | |
| virtual void | setEnabled (bool enabled) |
| Enables or disables the weather area. More... | |
| virtual bool | enabled () const |
| Returns the enabled state. More... | |
| virtual bool | culled () const |
| Returns the culled state. More... | |
| virtual void | setBounds (const DtVector &bounds, float cornerRadius) |
| Sets the bounds of the area. More... | |
| virtual void | setTransform (const DtVector &position, float orientation, bool relativeToCamera=false) |
| Sets the area transform. More... | |
| virtual const osg::Vec3d & | position () const |
| Returns the area origin position in world space. More... | |
| virtual const osg::Matrixd & | rotation () const |
| Returns the area origin rotation in world space. More... | |
| virtual float | boundsX () const |
| Returns the bounds X size. More... | |
| virtual float | boundsY () const |
| Returns the bounds Y size. More... | |
| virtual float | boundsZ () const |
| Returns the bounds Z size. More... | |
| virtual float | boundsCornerRadius () const |
| Returns the bounds curner radius. More... | |
| virtual const unsigned int * | packedData (int &sizeX, int &sizeY) const |
| Returns the grid heights/blend packedData array used for terrain clamping. More... | |
| virtual void | cullUpdate (const osg::Vec3d &camPos, const osg::Matrixd &viewMatrixI, const std::vector< osg::Vec4d > &cullingPlanes, DtJobSplitter *jobSplitter) |
| Culls the area based on the current camera. More... | |
| virtual float | computeBoundsDistance2D (const osg::Vec3d &position) |
| Computes the xy distance from the given world position to the edge of the bounds. More... | |
| virtual float | computeBoundsDistance3D (const osg::Vec3d &position) |
| Computes the distance from the given world position to the edge of the bounds The bounds is a rounded rect. More... | |
| virtual bool | usesWeatherLayerType (DtWeatherLayer::LayerType layerType) const |
| Returns true if this area uses the give weather layer type. More... | |
| virtual void | setPrecipitationIntensity (const float intensity) |
| Sets a precipitation intensity for the area. More... | |
| virtual const float | precipitationIntensity () const |
| Returns the precipitation intensity for the area. More... | |
| virtual void | setPrecipitationType (const DtSkyObject::PrecipitationType type) |
| Sets a precipitation type for the area. More... | |
| virtual const DtSkyObject::PrecipitationType | precipitationType () const |
| Returns the precipitation type for the area. More... | |
| virtual void | setGroundRainAccumulation (const float depth) |
| Set the ground rain accumulation depth. More... | |
| virtual const float | groundRainAccumulation () const |
| Returns the ground rain accumulation depth. More... | |
| virtual void | setFogColor (const DtVector &color) |
| Sets a fog color for the area. More... | |
| virtual const DtVector & | fogColor () const |
| Returns the fog color for the area. More... | |
| virtual void | setVisibilityDistance (const float distance) |
| Sets a visibility distance for the area. More... | |
| virtual const float | visibilityDistance () const |
| Returns the visibility distance for the area. More... | |
| virtual void | setOvercast (const float overcast) |
| Sets a overcast percentage (lighting) for the area. More... | |
| virtual const float | overcast () const |
| Returns the overcast percentage for the area. More... | |
| virtual void | setWind (const float windDirectionRad, const float windSpeedMps) |
| Sets the current wind. More... | |
| virtual void | setLightningEnabled (const bool enabled) |
| Enables or disables lightning. More... | |
| virtual const bool | lightningEnabled () const |
| Returns true if lightning is enabled for the area. More... | |
| virtual bool | computeLocalPrecipitation (const osg::Vec3d &location, int &type, float &intensity) |
| Computes the precipitation at the given location. More... | |
| virtual bool | computeLocalGroundRainAccumulation (const osg::Vec3d &location, float &depth, float &blend) |
| Computes the ground rain accumulation at the given location. More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static float | computeBoundsDistance2D (const osg::Vec3d &position, const osg::Vec4d &bounds, const osg::Vec3d &boundsPosition, const osg::Matrixd &boundsRotation) |
| Computes the xy distance from the given world position to the edge of the bounds. More... | |
| static float | computeBoundsDistance3D (const osg::Vec3d &position, const osg::Vec4d &bounds, const osg::Vec3d &boundsPosition, const osg::Matrixd &boundsRotation) |
| Computes the distance from the given world position to the edge of the bounds The bounds is a rounded rect with transform at bottom. More... | |
Protected Member Functions | |
| DtWeatherArea (makVrv::DtDe &de) | |
| CTOR. More... | |
| virtual void | updateTransform () |
| Updates the current transform based on current settings. More... | |
| virtual void | computeBasis (const osg::Vec3d &inGeocentricPos, osg::Matrixd &rotOut) const |
| Computes a basis rotation matrix for the given geocentric position. More... | |
| virtual bool | clampPositionToTerrain (osg::Vec3d &position, float clampDistance) const |
| Clamps the given position to the terrain surface. More... | |
| virtual bool | isSphereVisible (const std::vector< osg::Vec4d > &planes, const osg::Vec3d ¢er, double radius) const |
| Tests to see if a sphere is visible using the given frustum planes. More... | |
Protected Attributes | |
| DtDe & | myDe |
| bool | myEnabled |
| bool | myCulled |
| DtVector | mySetPosition |
| float | mySetOrientation |
| bool | mySetRelativeToCamera |
| osg::Vec3d | myPosition |
| osg::Matrixd | myRotation |
| float | myBoundsX |
| float | myBoundsY |
| float | myBoundsZ |
| float | myBoundsCornerRadius |
| float | myPrecipitationBoundsScale |
| float | myPrecipitationIntensity |
| DtSkyObject::PrecipitationType | myPrecipitationType |
| float | myGroundRainAccumulation |
| bool | myLightningEnabled |
| DtVector | myFogColor |
| float | myVisibilityDistance |
| float | myOvercast |
| float | myWindDirectionRad |
| float | myWindSpeedMps |
Friends | |
| class | DtWeatherAreaFactory |
A weather area represents localized environmental conditions such as blowing dust, blowing sand, or blowing snow.
The default (base class) weather area is mainly used as a bounds for localized environmental information such as precipitation intensity. AreaTypeBlowingDust, AreaTypeBlowingSand, AreaTypeBlowingSnow are specialized weather areas that represent 1 specific environmental condition.
Weather areas are used by weather layers to define where layers are active and visible. For example, a blowing snow layer might be active within a weather area bounding volume.
This base class also provides some common utility methods for weather areas.
Various local weather states and settings are tracked by this based class, but the base most likely does not provide any visual effect.
|
virtual |
DTOR.
|
delete |
Default Constructor not implemented.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
protected |
CTOR.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
|
virtual |
Enables or disables the weather area.
| enabled | Set to true to enable the area. |
Reimplemented in makVrv::DtWeatherAreaBlowingDust, makVrv::DtWeatherAreaBlowingSand, makVrv::DtWeatherAreaBlowingSnow, and makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns the enabled state.
|
virtual |
Returns the culled state.
For areas that use culling, this will indicate if the area was culled during the last scenegraph culling pass.
|
virtual |
Sets the bounds of the area.
| bounds | The (x,y,z) of the bounds. |
| cornerRadius | The radius at each corner of the bounds. |
Reimplemented in makVrv::DtWeatherAreaBlowingDust, makVrv::DtWeatherAreaBlowingSand, makVrv::DtWeatherAreaBlowingSnow, and makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Sets the area transform.
| position | The transform position in world space. |
| oritantation | The yaw orientation in degrees (0 = north). |
| relativeToCamera | Set to true if the position is relative to the current camera. |
Reimplemented in makVrv::DtWeatherAreaBlowingDust, makVrv::DtWeatherAreaBlowingSand, makVrv::DtWeatherAreaBlowingSnow, and makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns the area origin position in world space.
|
virtual |
Returns the area origin rotation in world space.
|
virtual |
Returns the bounds X size.
|
virtual |
Returns the bounds Y size.
|
virtual |
Returns the bounds Z size.
|
virtual |
Returns the bounds curner radius.
|
virtual |
Returns the grid heights/blend packedData array used for terrain clamping.
| sizeX | Filled in output for the grid size in the x direction. |
| sizeY | Filled in output for the grid size in the y direction. |
Reimplemented in makVrv::DtWeatherAreaBlowingDust, makVrv::DtWeatherAreaBlowingSand, and makVrv::DtWeatherAreaBlowingSnow.
|
inlinevirtual |
Culls the area based on the current camera.
| cam | The current camera being drawn. |
| jobSplitter | A job splitter to add predraw jobs to. |
Reimplemented in makVrv::DtWeatherAreaBlowingDust, makVrv::DtWeatherAreaBlowingSand, makVrv::DtWeatherAreaBlowingSnow, and makVrv::DtWeatherAreaEnvironmental.
|
static |
Computes the xy distance from the given world position to the edge of the bounds.
The bounds is a rounded rect with transform at bottom. Returns 0 if inside.
| position | The world position. |
| bounds | The (width, length, height, corner radius) of the bounds. |
| boundsPosition | The bounds world position. |
| boundRotation | The bounds world rotation. |
|
static |
Computes the distance from the given world position to the edge of the bounds The bounds is a rounded rect with transform at bottom.
Returns 0 if inside.
| position | The world position. |
| bounds | The (width, length, height, corner radius) of the bounds. |
| boundsPosition | The bounds world position. |
| boundRotation | The bounds world rotation. |
|
virtual |
Computes the xy distance from the given world position to the edge of the bounds.
The bounds is a rounded rect. Returns 0 if inside.
| position | The world position. |
|
virtual |
Computes the distance from the given world position to the edge of the bounds The bounds is a rounded rect.
Returns 0 if inside.
| position | The world position. |
|
virtual |
Returns true if this area uses the give weather layer type.
| layerType | The layer type to check. |
Reimplemented in makVrv::DtWeatherAreaBlowingDust, makVrv::DtWeatherAreaBlowingSand, makVrv::DtWeatherAreaBlowingSnow, and makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Sets a precipitation intensity for the area.
| intensity | The precipitation intensity. |
Reimplemented in makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns the precipitation intensity for the area.
|
virtual |
Sets a precipitation type for the area.
| type | The precipitation type. |
Reimplemented in makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns the precipitation type for the area.
|
virtual |
Set the ground rain accumulation depth.
| depth | The ground rain accumulation depth. |
|
virtual |
Returns the ground rain accumulation depth.
|
virtual |
Sets a fog color for the area.
| color | The fog color. |
Reimplemented in makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns the fog color for the area.
|
virtual |
Sets a visibility distance for the area.
| distance | The distance. |
Reimplemented in makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns the visibility distance for the area.
|
virtual |
Sets a overcast percentage (lighting) for the area.
| overcast | The overcast percentage value. |
Reimplemented in makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns the overcast percentage for the area.
|
virtual |
Sets the current wind.
| windDirectionRad | The wind direction in radians. |
| windSpeedMps | The wind speed in meters per second. |
Reimplemented in makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Enables or disables lightning.
| enabled | Set to true to enable lightning. |
Reimplemented in makVrv::DtWeatherAreaEnvironmental.
|
virtual |
Returns true if lightning is enabled for the area.
|
virtual |
Computes the precipitation at the given location.
Returns true if location is in this weather area, otherwise false.
| location | The location to compute the precipitation at. |
| type | The computed precipitation type (DtSkyObject::PrecipitationType). |
| intensity | The computed precipitation intensity. |
|
virtual |
Computes the ground rain accumulation at the given location.
Returns true if location is in this weather area, otherwise false.
| location | The location to compute the ground rain accumulation at. |
| depth | The computed ground rain accumulation depth. |
| blend | (0.0 to 1.0) blend value based on local area perimeter. |
|
protectedvirtual |
Updates the current transform based on current settings.
|
protectedvirtual |
Computes a basis rotation matrix for the given geocentric position.
| inGeocentricPos | The geocentric reference position. |
| rotOut | The computed basis rotation transform. |
|
protectedvirtual |
Clamps the given position to the terrain surface.
Returns true if successful.
| position | The input/output position to clamp. |
| clampDistance | The above/below distance to search for a surface. |
|
protectedvirtual |
Tests to see if a sphere is visible using the given frustum planes.
| planes | The frustum planes to test the sphere against. |
| center | The sphere center position. |
| radius | the sphere radius. |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |