VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtLocalEnvironmentalsControllerObject Class Reference

A DtLocalEnvironmentalsControllerObject processes enviromental data for a localize weather area. More...

Classes

struct  CloudLayerData
 A structure used to store information about a cloud layer. More...
 
struct  CloudLayerSortComparator
 Functor for comparing cloud layers by altitude. More...
 

Public Member Functions

 DtLocalEnvironmentalsControllerObject (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtLocalEnvironmentalsControllerObject ()
 DTOR. More...
 
 DtLocalEnvironmentalsControllerObject ()=delete
 Default Constructor not implemented – default constructor not allowed. More...
 
 DtLocalEnvironmentalsControllerObject (const DtLocalEnvironmentalsControllerObject &)=delete
 Copy Constructor not implemented – Copy not allowed. More...
 
DtLocalEnvironmentalsControllerObjectoperator= (const DtLocalEnvironmentalsControllerObject &)=delete
 Assignment Operator not implemented – Copy not allowed. More...
 
virtual DtCloudLayerId addLayerToCloudCover (const DtCloudLayer &layer, const std::string &coverName)
 Add the cloud layer to the specified cloud cover (in the DtCloudCoverManager). More...
 
virtual void setZoneOrigin (double x, double y, double z)
 Set the origin of the zone. More...
 
virtual void setZoneShape (double width, double length, double height, double cornerRadius)
 Sets the shape of the zone. More...
 
virtual void setAirTurbidity (float turbidity)
 Set the air turbidity/haziness. More...
 
virtual void setAmbientAirTemperature (float temperature)
 Set the ambient air temperature, in Kelvins. More...
 
virtual void setAmbientAirPressure (float pressure)
 Set the ambient air pressure, in Pascals. More...
 
virtual void setAirTemperatureAltitude (float altitude)
 Set the air temperature altitude, in meters. More...
 
virtual void setAirPressureAltitude (float altitude)
 Set the air pressure altitude, in meters. More...
 
virtual void setAirTemperatureAltitudeIsSeaLevel (bool seaLevel)
 Set the air temperature altitude is sea level flag. More...
 
virtual void setAirPressureAltitudeIsSeaLevel (bool seaLevel)
 Set the air pressure altitude is sea level flag. More...
 
virtual void setSeaLevelWaterConcentration (float water)
 Set the sea level water concentration, in PPMV (parts per million by volume). More...
 
virtual void setLightningPresent (bool lightningPresent)
 Sets whether or not lightning is present. More...
 
virtual void setPrecipitationType (unsigned int type)
 Sets precipitation type. More...
 
virtual void setPrecipitationIntensity (float intensity)
 Sets precipitation intensity. More...
 
virtual void setTimeOfDay (int hour, int minutes, double seconds)
 Tell the scene to change the time of day. More...
 
virtual void setDateAndTimeOfDay (int year, int month, int day, int hour, int minutes, double seconds)
 Tell the scene to change the date and time of day. More...
 
virtual void setUseGlobalTimeZone (bool value)
 Tell the system to use GMT time as the means to position the sun/moon rather than always moving with the observer. More...
 
virtual void setTimeOfDayAdvancementSpeed (float speed)
 Tell the scene to change the time of day advancement speed. More...
 
virtual void setFogHeight (float value)
 Sets the fog ceiling height. More...
 
virtual void setFogColor (const DtVector &color)
 Sets the fog color. More...
 
virtual void setFogColor (float red, float green, float blue)
 Sets the fog color. More...
 
virtual void setFogColor (int red, int green, int blue)
 Sets the fog color. More...
 
virtual void removeElevationalConfiguration (float baseMSLAltitude)
 Removes an elevational configuration record by its base MSL altitude, in meters. More...
 
virtual void updateOrAddElevationalConfiguration (float baseMSLAltitude, float windSpeed, float windDirection, float visibilityDistance, unsigned int obscurant, int cloudType, float cloudDensity, float skyCoverage)
 Update an elevational configuration record which consists of 1) a base MSL altitude, in meters, 2) a wind speed, in meters per second, 3) a wind direction, in radians from True North (clockwise), 4) a visibility distance, in meters, 5) an enumerated visibility obscurant value, 6) the type of cloud present, by name, and 7) the sky coverage of the cloud, in normalized Oktas [0-1]. More...
 
virtual void setSwellState (int state)
 Set the sea state according to the Beaufort Scale. More...
 
virtual void setSwellStateDirection (float value)
 Set the sea state direction in radians from North. More...
 
virtual void setSeaState (int state)
 Set the sea state according to the Beaufort Scale. More...
 
virtual void setSeaStateDirection (float value)
 Set the sea state direction in radians from North. More...
 
virtual void setWindDrivenSeaStateEnabled (bool value)
 Set the wind driven seas enabled parameter to allow the wind to determine the sea state. More...
 
virtual void setWindFetch (float value)
 Set the ocean wind fetch. More...
 
virtual void setSeaChoppiness (float value)
 Set the sea choppiness. More...
 
virtual void setUnderwaterVisibility (float distance)
 Set the maximum visibility under water in meters. More...
 
virtual void setSurfaceTransparency (float value)
 Set the surface transparency. More...
 
virtual void setSurgeDepth (float value)
 Set the surge depth. More...
 
virtual void setAmbientWaterTemperature (float temperature)
 Set the ambient water temperature, in Kelvins. More...
 
virtual void setWaterCurrentSpeed (float speed)
 Set the speed of water currents in meters per second. More...
 
virtual void setWaterCurrentDirection (float direction)
 Set the direction of water currents in radians from north (clockwise). More...
 
virtual void setTidalOffset (float meters)
 Set the current tidal offset from mean-sea-level in meters. More...
 
virtual void setTidalDirection (bool inOut)
 Set the current direction of tidal flow (0=out, 1=in). More...
 
virtual void setThermoclineDepth (unsigned int layer, float value)
 Set a thermocline depth. More...
 
virtual void setThermoclinePermeability (unsigned int layer, float value)
 Set a thermocline permeability. More...
 
virtual void setGroundSnowAccumulation (float depth)
 Set the ground snow accumulation percentage. More...
 
virtual void setRoadSnowAccumulation (float depth)
 Set the road snow accumulation percentage. More...
 
virtual void setSnowMinimumElevation (float elevation)
 Set the snow minimum elevation. More...
 
virtual void setSnowElevationTransition (float elevation)
 Set the snow elevation transition which specifies how long it takes to go from no snow to the full snow depth. More...
 
virtual void setGroundRainAccumulation (float depth)
 Set the ground rain accumulation percentage. More...
 

Protected Types

typedef std::vector
< CloudLayerData * > 
CloudLayerSet
 This type defines a set of cloud layers. More...
 

Protected Member Functions

virtual void computeOriginBasis (DtVector &origin, DtVector &north, DtVector &east, DtVector &up)
 Computes the local origin and basis vectors from the current myOrigin. More...
 
virtual void updateOrAddCloudForElevation (float baseMSLAltitude, int cloudType, float cloudDensity, float skyCoverage, float visibilityDistance)
 Updates a the cloud associated with the elevational. More...
 
virtual void refreshCloudLayerThicknessIfNeeded ()
 Refresh the thickness of all the cloud layers for the current environment configuration, if needed, based on the base MSL altitudes of all the elevational configurations being maintained. More...
 
virtual void adjustWeatherAreaForClouds ()
 Updates the weather area bounds and lighting based on the current set of clouds. More...
 
virtual const float computeDensityFromVisibility (const float visibility) const
 Computes a exp2 falloff density based on visibility. More...
 
virtual const float computeCloudThickness (const float baseMSLAltitude) const
 Computes a cloud thickness for the given base altitude based on current elevation configuration data. More...
 

Protected Attributes

DtDemyDe
 
DtVector myOrigin
 
double myWidth
 
double myLength
 
double myHeight
 
double myCornerRadius
 
CloudLayerSet myCloudLayerSet
 
unsigned int myPrecipitationType
 
float myPrecipitationIntensity
 
float myGroundRainAccumulation
 
DtVector myFogColor
 
float myVisibilityDistance
 
float myOvercast
 
bool myLightningEnabled
 
DtUniqueID myWeatherAreaId
 

Detailed Description

A DtLocalEnvironmentalsControllerObject processes enviromental data for a localize weather area.

This is not a distributed object. Distribution is provided by objects initiated by this class.

Local environmental weather is monitored by DtWeatherStateListener and processed by DtWeatherProcessor. For each unique local weather area, an instance of this class is created by DtWeatherProcessor and local environmental data associated with this area is directed here for controlling the local weather in VRV.

This class will initiate and control local clouds and a weather area object (DtWeatherAreaObject). The weather area object is used to set precipitation, fog, lightning, and other environmental conditions.

Note that currently there many stub methods in here for future capabilities.

Member Typedef Documentation

This type defines a set of cloud layers.

Constructor & Destructor Documentation

makVrv::DtLocalEnvironmentalsControllerObject::DtLocalEnvironmentalsControllerObject ( DtDe de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtLocalEnvironmentalsControllerObject::~DtLocalEnvironmentalsControllerObject ( )
virtual

DTOR.

makVrv::DtLocalEnvironmentalsControllerObject::DtLocalEnvironmentalsControllerObject ( )
delete

Default Constructor not implemented – default constructor not allowed.

makVrv::DtLocalEnvironmentalsControllerObject::DtLocalEnvironmentalsControllerObject ( const DtLocalEnvironmentalsControllerObject )
delete

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

DtLocalEnvironmentalsControllerObject& makVrv::DtLocalEnvironmentalsControllerObject::operator= ( const DtLocalEnvironmentalsControllerObject )
delete

Assignment Operator not implemented – Copy not allowed.

virtual DtCloudLayerId makVrv::DtLocalEnvironmentalsControllerObject::addLayerToCloudCover ( const DtCloudLayer layer,
const std::string &  coverName 
)
virtual

Add the cloud layer to the specified cloud cover (in the DtCloudCoverManager).

Parameters
layerThe layer (settings) to add.
coverNameThe name of the cloud coverage to add to.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setZoneOrigin ( double  x,
double  y,
double  z 
)
virtual

Set the origin of the zone.

Parameters
xThe origin x component.
yThe origin y component.
zThe origin z component.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setZoneShape ( double  width,
double  length,
double  height,
double  cornerRadius 
)
virtual

Sets the shape of the zone.

The bounds is a rounded rect with height. Note that currently height is not acutally used but it is here for future expansion with the concept of layers. Currently height is auto-computed based on the lowest precipitation cloud bottom and the zone origin.

Parameters
widthThe bounds width.
lengthThe bounds length.
heightThe bounds height.
cornerRadiusThe bounds cornerRadius.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAirTurbidity ( float  turbidity)
virtual

Set the air turbidity/haziness.

Parameters
turbidityThe desired turbidity.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAmbientAirTemperature ( float  temperature)
virtual

Set the ambient air temperature, in Kelvins.

Parameters
temperatureThe desired temperature.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAmbientAirPressure ( float  pressure)
virtual

Set the ambient air pressure, in Pascals.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAirTemperatureAltitude ( float  altitude)
virtual

Set the air temperature altitude, in meters.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAirPressureAltitude ( float  altitude)
virtual

Set the air pressure altitude, in meters.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAirTemperatureAltitudeIsSeaLevel ( bool  seaLevel)
virtual

Set the air temperature altitude is sea level flag.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAirPressureAltitudeIsSeaLevel ( bool  seaLevel)
virtual

Set the air pressure altitude is sea level flag.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSeaLevelWaterConcentration ( float  water)
virtual

Set the sea level water concentration, in PPMV (parts per million by volume).

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setLightningPresent ( bool  lightningPresent)
virtual

Sets whether or not lightning is present.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setPrecipitationType ( unsigned int  type)
virtual

Sets precipitation type.

Parameters
typeThe DtEnvironmentInterface::PrecipitationType enumeration value.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setPrecipitationIntensity ( float  intensity)
virtual

Sets precipitation intensity.

Parameters
Thedesired precipitation intensity.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setTimeOfDay ( int  hour,
int  minutes,
double  seconds 
)
virtual

Tell the scene to change the time of day.

Parameters
hourThe time of day hour.
minutesThe time of day minutes.
secondsThe time of day seconds.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setDateAndTimeOfDay ( int  year,
int  month,
int  day,
int  hour,
int  minutes,
double  seconds 
)
virtual

Tell the scene to change the date and time of day.

Parameters
yearThe date year.
monthThe date month.
dayThe date day.
hourThe time of day hour.
minutesThe time of day minutes.
secondsThe time of day seconds.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setUseGlobalTimeZone ( bool  value)
virtual

Tell the system to use GMT time as the means to position the sun/moon rather than always moving with the observer.

This will set the value in the environment settings manager

Parameters
valueSet to true to use global time zone.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setTimeOfDayAdvancementSpeed ( float  speed)
virtual

Tell the scene to change the time of day advancement speed.

Parameters
speedThe advancement speed.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setFogHeight ( float  value)
virtual

Sets the fog ceiling height.

Parameters
valueThe fog height in meters.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setFogColor ( const DtVector color)
virtual

Sets the fog color.

Parameters
colorThe (r,g,b) color values in the range (0.0 - 1.0)
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setFogColor ( float  red,
float  green,
float  blue 
)
virtual

Sets the fog color.

Parameters
redThe red color value in the range (0.0 - 1.0)
greenThe green color value in the range (0.0 - 1.0)
blueThe blue color value in the range (0.0 - 1.0)
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setFogColor ( int  red,
int  green,
int  blue 
)
virtual

Sets the fog color.

Parameters
redThe red color value in the range (0 - 255)
greenThe green color value in the range (0 - 255)
blueThe blue color value in the range (0 - 255)
virtual void makVrv::DtLocalEnvironmentalsControllerObject::removeElevationalConfiguration ( float  baseMSLAltitude)
virtual

Removes an elevational configuration record by its base MSL altitude, in meters.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::updateOrAddElevationalConfiguration ( float  baseMSLAltitude,
float  windSpeed,
float  windDirection,
float  visibilityDistance,
unsigned int  obscurant,
int  cloudType,
float  cloudDensity,
float  skyCoverage 
)
virtual

Update an elevational configuration record which consists of 1) a base MSL altitude, in meters, 2) a wind speed, in meters per second, 3) a wind direction, in radians from True North (clockwise), 4) a visibility distance, in meters, 5) an enumerated visibility obscurant value, 6) the type of cloud present, by name, and 7) the sky coverage of the cloud, in normalized Oktas [0-1].

If the elevational configuration record doesn't exist, add a new one with the passed in attributes.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSwellState ( int  state)
virtual

Set the sea state according to the Beaufort Scale.

Parameters
stateThe swell state.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSwellStateDirection ( float  value)
virtual

Set the sea state direction in radians from North.

Parameters
valueThe direction.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSeaState ( int  state)
virtual

Set the sea state according to the Beaufort Scale.

Parameters
stateThe sea state.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSeaStateDirection ( float  value)
virtual

Set the sea state direction in radians from North.

Parameters
valueThe direction.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setWindDrivenSeaStateEnabled ( bool  value)
virtual

Set the wind driven seas enabled parameter to allow the wind to determine the sea state.

Parameters
valueSet to true to enable wind driven sea state.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setWindFetch ( float  value)
virtual

Set the ocean wind fetch.

Parameters
valueThe desired fetch.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSeaChoppiness ( float  value)
virtual

Set the sea choppiness.

Parameters
valueThe desired choppiness.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setUnderwaterVisibility ( float  distance)
virtual

Set the maximum visibility under water in meters.

Parameters
distanceThe visibility distance.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSurfaceTransparency ( float  value)
virtual

Set the surface transparency.

Parameters
valueThe surface transparency.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSurgeDepth ( float  value)
virtual

Set the surge depth.

Parameters
valueThe surge depth.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setAmbientWaterTemperature ( float  temperature)
virtual

Set the ambient water temperature, in Kelvins.

Parameters
temperatureThe ambient water temperature.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setWaterCurrentSpeed ( float  speed)
virtual

Set the speed of water currents in meters per second.

Parameters
speedThe desired speed.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setWaterCurrentDirection ( float  direction)
virtual

Set the direction of water currents in radians from north (clockwise).

Parameters
directionThe desired direction.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setTidalOffset ( float  meters)
virtual

Set the current tidal offset from mean-sea-level in meters.

Parameters
metersThe offset.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setTidalDirection ( bool  inOut)
virtual

Set the current direction of tidal flow (0=out, 1=in).

Parameters
inOutSet to false for "out", and true for "in".
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setThermoclineDepth ( unsigned int  layer,
float  value 
)
virtual

Set a thermocline depth.

Parameters
layerThe desired layer to affect.
valueThe depth.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setThermoclinePermeability ( unsigned int  layer,
float  value 
)
virtual

Set a thermocline permeability.

Parameters
layerThe desired layer to affect.
valueThe permeability.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setGroundSnowAccumulation ( float  depth)
virtual

Set the ground snow accumulation percentage.

Parameters
depthThe accumulation depth.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setRoadSnowAccumulation ( float  depth)
virtual

Set the road snow accumulation percentage.

Parameters
depthThe accumulation depth.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSnowMinimumElevation ( float  elevation)
virtual

Set the snow minimum elevation.

Parameters
elevationThe elevation at which accumulation starts to become visible.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setSnowElevationTransition ( float  elevation)
virtual

Set the snow elevation transition which specifies how long it takes to go from no snow to the full snow depth.

Parameters
elevationThe elevation at which accumulation is fully visible.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::setGroundRainAccumulation ( float  depth)
virtual

Set the ground rain accumulation percentage.

Parameters
depthThe accumulation depth.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::computeOriginBasis ( DtVector origin,
DtVector north,
DtVector east,
DtVector up 
)
protectedvirtual

Computes the local origin and basis vectors from the current myOrigin.

Parameters
originThe computed output origin.
northThe computed output north vector.
eastThe computed output east vector.
upThe computed output up vector.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::updateOrAddCloudForElevation ( float  baseMSLAltitude,
int  cloudType,
float  cloudDensity,
float  skyCoverage,
float  visibilityDistance 
)
protectedvirtual

Updates a the cloud associated with the elevational.

If no cloud is associated with the given elevational, a new one is added, otherwise the cloud parameters are updated with the new attributes.

Parameters
baseMSLAltitudeA base MSL altitude, in meters.
cloudTypeThe type of cloud (see DtCloudTypeMapper::CloudType).
cloudDensityThe cloud density.
skyCoverageThe sky coverage of the cloud, in normalized Oktas [0-1].
visibilityDistanceThe visibility distance for the layer.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::refreshCloudLayerThicknessIfNeeded ( )
protectedvirtual

Refresh the thickness of all the cloud layers for the current environment configuration, if needed, based on the base MSL altitudes of all the elevational configurations being maintained.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::adjustWeatherAreaForClouds ( )
protectedvirtual

Updates the weather area bounds and lighting based on the current set of clouds.

virtual const float makVrv::DtLocalEnvironmentalsControllerObject::computeDensityFromVisibility ( const float  visibility) const
protectedvirtual

Computes a exp2 falloff density based on visibility.

Parameters
Thevisibility to use for the caclulation.
virtual const float makVrv::DtLocalEnvironmentalsControllerObject::computeCloudThickness ( const float  baseMSLAltitude) const
protectedvirtual

Computes a cloud thickness for the given base altitude based on current elevation configuration data.

Parameters
baseMSLAltitudeThe altitude to compute from.

Member Data Documentation

DtDe& makVrv::DtLocalEnvironmentalsControllerObject::myDe
protected
DtVector makVrv::DtLocalEnvironmentalsControllerObject::myOrigin
protected
double makVrv::DtLocalEnvironmentalsControllerObject::myWidth
protected
double makVrv::DtLocalEnvironmentalsControllerObject::myLength
protected
double makVrv::DtLocalEnvironmentalsControllerObject::myHeight
protected
double makVrv::DtLocalEnvironmentalsControllerObject::myCornerRadius
protected
CloudLayerSet makVrv::DtLocalEnvironmentalsControllerObject::myCloudLayerSet
protected
unsigned int makVrv::DtLocalEnvironmentalsControllerObject::myPrecipitationType
protected
float makVrv::DtLocalEnvironmentalsControllerObject::myPrecipitationIntensity
protected
float makVrv::DtLocalEnvironmentalsControllerObject::myGroundRainAccumulation
protected
DtVector makVrv::DtLocalEnvironmentalsControllerObject::myFogColor
protected
float makVrv::DtLocalEnvironmentalsControllerObject::myVisibilityDistance
protected
float makVrv::DtLocalEnvironmentalsControllerObject::myOvercast
protected
bool makVrv::DtLocalEnvironmentalsControllerObject::myLightningEnabled
protected
DtUniqueID makVrv::DtLocalEnvironmentalsControllerObject::myWeatherAreaId
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)