![]() |
VR-Forces 5.0.2 Developer's Guide
|
Used by the weather system to define an environmental area. These areas can contain items such as precipitation and fog.
A environment weather area is created using the following: DtWeatherAreaFactory::instance(myDe).create(DtWeatherAreaFactory::AreaTypeEnvironmental)

Public Member Functions | |
| virtual | ~DtWeatherAreaEnvironmental () |
| DtWeatherAreaEnvironmental ()=delete | |
| DtWeatherAreaEnvironmental (const DtWeatherAreaEnvironmental &other)=delete | |
| DtWeatherAreaEnvironmental & | operator= (const DtWeatherAreaEnvironmental &other)=delete |
| virtual void | setEnabled (bool enabled) |
| virtual void | setBounds (const DtVector &bounds, float cornerRadius) |
| virtual void | setTransform (const DtVector &position, float orientation, bool relativeToCamera=false) |
| virtual void | cullUpdate (const osg::Vec3d &camPos, const std::vector< osg::Vec4d > &cullingPlanes, DtJobSplitter *jobSplitter, const osg::Camera *camera) override |
| virtual void | setPrecipitationIntensity (const float intensity) |
| virtual void | setPrecipitationType (const DtSkyObject::PrecipitationType type) |
| virtual void | setFogColor (const DtVector &color) |
| virtual void | setVisibilityDistance (const float distance) |
| virtual void | setOvercast (const float overcast) |
| virtual void | setGlobalWind (const float windDirectionRad, const float windSpeedMps) |
| virtual void | setLightningEnabled (const bool enabled) |
| virtual void | cloudLayerAdded (DtCloudLayerId layerId, int cloudType) |
| virtual void | cloudLayerRemoved (DtCloudLayerId layerId) |
Public Member Functions inherited from makVrv::DtWeatherArea | |
| virtual | ~DtWeatherArea () |
| DtWeatherArea ()=delete | |
| DtWeatherArea (const DtWeatherArea &other)=delete | |
| DtWeatherArea & | operator= (const DtWeatherArea &other)=delete |
| virtual bool | enabled () const |
| virtual bool | culled () const |
| virtual const osg::Vec3d & | position () const |
| virtual const osg::Matrixd & | rotation () const |
| virtual float | boundsX () const |
| virtual float | boundsY () const |
| virtual float | boundsZ () const |
| virtual float | boundsCornerRadius () const |
| virtual const unsigned int * | packedData (int &sizeX, int &sizeY) const |
| virtual void | drawWeatherLayerEffects (DtWeatherEffect::DrawData &drawData) |
| virtual float | computeBoundsDistance2d (const osg::Vec3d &position) |
| virtual float | computeBoundsDistance3d (const osg::Vec3d &position) |
| virtual float | computeBoundsDistance2dAndTop (const osg::Vec3d &position) |
| virtual const float | precipitationIntensity () const |
| virtual const DtSkyObject::PrecipitationType | precipitationType () const |
| virtual void | setGroundRainAccumulation (const float depth) |
| virtual const float | groundRainAccumulation () const |
| virtual const DtVector & | fogColor () const |
| virtual const float | visibilityDistance () const |
| virtual const float | overcast () const |
| virtual void | setWind (const float windDirectionRad, const float windSpeedMps) |
| virtual const bool | lightningEnabled () const |
| virtual bool | computeLocalPrecipitation (const osg::Vec3d &location, int &type, float &intensity) |
| virtual bool | computeLocalGroundRainAccumulation (const osg::Vec3d &location, float &depth, float &blend) |
| virtual void | addWeatherLayer (DtWeatherLayer::LayerType layerType) |
| virtual void | removeWeatherLayer (DtWeatherLayer::LayerType layerType) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Protected Member Functions | |
| DtWeatherAreaEnvironmental (makVrv::DtDe &de) | |
| virtual void | computePrecipitationShaftBounds (osg::Vec3d &position, DtVector &bounds, float &cornerRadius) |
| virtual void | computeHeightFogBounds (DtVector &bounds, double &cornerRadius) |
| virtual void | onAreaChanged () |
| virtual float | computeFogDensity (const float precipitaionIintensity, const float distance) const |
| virtual void | computePrecipitationShaftBaseColor (DtVector &color) |
| virtual void | initPrecipitationItems (DtWeatherAreaGroup *areaGroup, bool lightning) |
| virtual void | updateHeightFogLighting () |
| virtual void | slot_simulationUpdate () |
| virtual void | slot_coordinateSystemChanged () |
Protected Member Functions inherited from makVrv::DtWeatherArea | |
| DtWeatherArea (makVrv::DtDe &de) | |
| virtual void | updateTransform () |
| virtual void | computeBasis (const osg::Vec3d &inGeocentricPos, osg::Matrixd &rotOut) const |
| virtual bool | clampPositionToTerrain (osg::Vec3d &position, float clampDistance) const |
| virtual bool | isSphereVisible (const std::vector< osg::Vec4d > &planes, const osg::Vec3d ¢er, double radius) const |
| virtual bool | isPositionBelowSealevel (const DtVector &position) const |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | myConnections |
| DtUniqueID | myPrecipitationShaftId |
| DtUniqueID | myHeightFogId |
| DtUniqueID | myLightningId |
| DtVector | myHeightFogColor |
| std::vector< DtCloudLayerId > | myWindCloudLayers |
| DtCoordinateSystem * | myCoordinateSystem = nullptr |
Protected Attributes inherited from makVrv::DtWeatherArea | |
| 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 |
| std::vector< DtWeatherLayer * > | myWeatherLayers |
| DtIntersector * | myIntersector = nullptr |
Friends | |
| class | DtWeatherAreaFactory |
Additional Inherited Members | |
Static Public Member Functions inherited from makVrv::DtWeatherArea | |
| static float | computeBoundsDistance2d (const osg::Vec3d &position, const osg::Vec4d &bounds, const osg::Vec3d &boundsPosition, const osg::Matrixd &boundsRotation) |
| static float | computeBoundsDistance3d (const osg::Vec3d &position, const osg::Vec4d &bounds, const osg::Vec3d &boundsPosition, const osg::Matrixd &boundsRotation) |
| static float | computeBoundsDistance2dAndTop (const osg::Vec3d &position, const osg::Vec4d &bounds, const osg::Vec3d &boundsPosition, const osg::Matrixd &boundsRotation) |
|
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 from makVrv::DtWeatherArea.
|
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 from makVrv::DtWeatherArea.
|
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 from makVrv::DtWeatherArea.
|
overridevirtual |
Culls the area based on the current camera. Sets the culled state of any weather layers associated with this area.
| camPos | The current position of the camera being drawn. |
| cullingPlanes | The frustum planes used for culling. |
| jobSplitter | A job splitter to add predraw jobs to. |
| camera | The current camera being drawn. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Sets a precipitation intensity for the area.
| intensity | The precipitation intensity. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Sets a precipitation type for the area. This will in turn enable visual environmental effects such as height fog and precipitation shafts which are modified by environmental conditions such as visibility and fog color.
Note that this does not create particle droplets close to the eye such as rain drops, as those effects are handled by Silverlining.
| type | The precipitation type. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Sets a fog color for the area.
| color | The fog color. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Sets a visibility distance for the area.
| distance | The distance. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Sets a overcast (lighting) for the area.
| overcast | The overcast value. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Sets the current global wind.
| windDirectionRad | The wind direction in radians. |
| windSpeedMps | The wind speed in meters per second. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Enables or disables lightning.
| enabled | Set to true to enable lightning. |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Called when a cloud layer has been added to the area.
| layerId | The layer id for the cloud. |
| cloudType | The cloud type (see DtCloudTypeMapper). |
Reimplemented from makVrv::DtWeatherArea.
|
virtual |
Called when a cloud layer has been removed from the area.
| layerId | The layer id for the cloud. |
Reimplemented from makVrv::DtWeatherArea.
|
protectedvirtual |
Computes the bounds specifically for a precipitation haft.
| position | The computed output bounds origin. |
| bounds | The computed output (width, length, height) bounds. |
| cornerRadius | The computed output bounds corner radius. |
|
protectedvirtual |
Computes the bounds for height fog to visually match the current area bounds.
| bounds | The computed output (width, length, height) bounds. |
| cornerRadius | The computed output bounds corner radius. |
|
protectedvirtual |
Called when the area bounds or transform has changed.
|
protectedvirtual |
Computes a fog density from the given precipitation intensity and visibility distance values.
| intensity | The precipitation intensity. |
| distance | The visibility distance. |
|
protectedvirtual |
Computes a precipitation shaft base color based on current overcast value.
| color | The computed output rgb (0.0 - 1.0 scale). |
|
protectedvirtual |
Initializes environmental items used by precipitation. see setPrecipitationType for more details.
| areaGroup | The area group to add items to. |
| lightning | If lightning should be included. |
|
protectedvirtual |
Updates active height fog color based on the current lighting conditions.
|
protectedvirtual |
Signal handler to run a simulation update.
|
protectedvirtual |
slot for when the coordinate system changes
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
local clone of the system wide coordinate system. for thread safety.