VR-Forces Developer's Guide
 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.

For each unique local weather area, there will be an instance of this class. Agents for this class are generally created by the DtEnvironmentStatusManager. Classes based from DtEnvironmentStateInterceptorBase use the DtEnvironmentStatusManager to send local environmental weather changes/data to this class via the agents.

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.

Classes

struct  CloudLayerData
 
struct  CloudLayerSortComparator
 

Public Member Functions

 DtLocalEnvironmentalsControllerObject (DtDe &de, DtUniqueID id)
 
virtual ~DtLocalEnvironmentalsControllerObject ()
 
 DtLocalEnvironmentalsControllerObject ()=delete
 
 DtLocalEnvironmentalsControllerObject (const DtLocalEnvironmentalsControllerObject &)=delete
 
DtLocalEnvironmentalsControllerObjectoperator= (const DtLocalEnvironmentalsControllerObject &)=delete
 
virtual DtCloudLayerId addLayerToCloudCover (const DtCloudLayer &layer, const std::string &coverName)
 
virtual void setZoneOrigin (double x, double y, double z)
 
virtual void setZoneShape (double width, double length, double height, double cornerRadius)
 
virtual void setAirTurbidity (float turbidity)
 
virtual void setAmbientAirTemperature (float temperature)
 
virtual void setAmbientAirPressure (float pressure)
 
virtual void setAirTemperatureAltitude (float altitude)
 
virtual void setAirPressureAltitude (float altitude)
 
virtual void setAirTemperatureAltitudeIsSeaLevel (bool seaLevel)
 
virtual void setAirPressureAltitudeIsSeaLevel (bool seaLevel)
 
virtual void setSeaLevelWaterConcentration (float water)
 
virtual void setLightningPresent (bool lightningPresent)
 
virtual void setBlowingParticulateMatter (unsigned int type)
 
virtual void setPrecipitationType (unsigned int type)
 
virtual void setPrecipitationIntensity (float intensity)
 
virtual void setTimeOfDay (int hour, int minutes, double seconds)
 
virtual void setDateAndTimeOfDay (int year, int month, int day, int hour, int minutes, double seconds)
 
virtual void setUseGlobalTimeZone (bool value)
 
virtual void setTimeOfDayAdvancementSpeed (float speed)
 
virtual void setFogHeight (float value)
 
virtual void setFogColor (const DtVector &color)
 
virtual void setFogColor (float red, float green, float blue)
 
virtual void setFogColor (int red, int green, int blue)
 
virtual void removeElevationalConfiguration (float baseMSLAltitude)
 
virtual void updateOrAddElevationalConfiguration (float baseMSLAltitude, float windSpeed, float windDirection, float visibilityDistance, unsigned int obscurant, int cloudType, float cloudDensity, float skyCoverage)
 
virtual void setSwellState (int state)
 
virtual void setSwellStateDirection (float value)
 
virtual void setSeaState (int state)
 
virtual void setSeaStateDirection (float value)
 
virtual void setWindDrivenSeaStateEnabled (bool value)
 
virtual void setWindFetch (float value)
 
virtual void setSeaChoppiness (float value)
 
virtual void setUnderwaterVisibility (float distance)
 
virtual void setSurfaceTransparency (float value)
 
virtual void setSurgeDepth (float value)
 
virtual void setAmbientWaterTemperature (float temperature)
 
virtual void setWaterCurrentSpeed (float speed)
 
virtual void setWaterCurrentDirection (float direction)
 
virtual void setTidalOffset (float meters)
 
virtual void setTidalDirection (bool inOut)
 
virtual void setThermoclineDepth (unsigned int layer, float value)
 
virtual void setThermoclinePermeability (unsigned int layer, float value)
 
virtual void setGroundSnowAccumulation (float depth)
 
virtual void setRoadSnowAccumulation (float depth)
 
virtual void setSnowMinimumElevation (float elevation)
 
virtual void setSnowElevationTransition (float elevation)
 
virtual void setGroundRainAccumulation (float depth)
 

Protected Types

typedef std::vector
< CloudLayerData * > 
CloudLayerSet
 

Protected Member Functions

virtual bool ensureWeatherAreaCreated ()
 
virtual void computeOriginBasis (DtVector &origin, DtVector &north, DtVector &east, DtVector &up)
 
virtual int mapBlowingParticulateMatterToCloudType (unsigned int type) const
 
virtual void updateOrAddCloudForElevation (float baseMSLAltitude, int cloudType, float cloudDensity, float skyCoverage, float visibilityDistance)
 
virtual bool hasCloud (float baseMSLAltitude, int cloudType, float cloudDensity, float skyCoverage, float visibilityDistance) const
 
virtual void removeAllCloudsAtElevation (float baseMSLAltitude)
 
virtual void refreshCloudLayerThicknessIfNeeded ()
 
virtual void adjustWeatherAreaForClouds ()
 
virtual const float computeDensityFromVisibility (const float visibility) const
 
virtual const float computeCloudThickness (const float baseMSLAltitude) const
 
virtual void slot_coordinateSystemChanged ()
 

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
 
float myWindDirection
 
float myWindSpeed
 
bool myLightningEnabled
 
unsigned int myBlowingParticulateMatter
 
DtUniqueID myWeatherAreaId
 
DtSignalConnectionManager myConnections
 
DtCoordinateConvertermyCoordinateConverter = nullptr
 

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 in the database coordinate system.

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::setBlowingParticulateMatter ( unsigned int  type)
virtual

Set the blowing particulate matter type.

Parameters
typeThe DtEnvironment::BlowingParticulateMatterType enumeration value.
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 swell conditions based on the Douglas sea scale.

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

Set the direction, in radians from True North, of sea swells.

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

Set the sea state conditions based on the Douglas sea scale.

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

Set the sea state direction in radians from True 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 bool makVrv::DtLocalEnvironmentalsControllerObject::ensureWeatherAreaCreated ( )
protectedvirtual

Creates the weather area if it does not exist. If newly created, all current weather parameters are set for the area. Returns true if already exists otherwise it returns false.

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 int makVrv::DtLocalEnvironmentalsControllerObject::mapBlowingParticulateMatterToCloudType ( unsigned int  type) const
protectedvirtual

Maps a blowing particulate matter type (makArchives::BlowingParticulateMatterType) to a cloud type (DtCloudTypeMapper::CloudType) used specifically for blowing particulate matter such as dust, sand, and snow.

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 bool makVrv::DtLocalEnvironmentalsControllerObject::hasCloud ( float  baseMSLAltitude,
int  cloudType,
float  cloudDensity,
float  skyCoverage,
float  visibilityDistance 
) const
protectedvirtual

Checks if there is a cloud that matches the given parameters.

virtual void makVrv::DtLocalEnvironmentalsControllerObject::removeAllCloudsAtElevation ( float  baseMSLAltitude)
protectedvirtual

removes any clouds at the given elevation.

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.
virtual void makVrv::DtLocalEnvironmentalsControllerObject::slot_coordinateSystemChanged ( )
protectedvirtual

slot for when the coordinate system changes

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
float makVrv::DtLocalEnvironmentalsControllerObject::myWindDirection
protected
float makVrv::DtLocalEnvironmentalsControllerObject::myWindSpeed
protected
bool makVrv::DtLocalEnvironmentalsControllerObject::myLightningEnabled
protected
unsigned int makVrv::DtLocalEnvironmentalsControllerObject::myBlowingParticulateMatter
protected
DtUniqueID makVrv::DtLocalEnvironmentalsControllerObject::myWeatherAreaId
protected
DtSignalConnectionManager makVrv::DtLocalEnvironmentalsControllerObject::myConnections
protected
DtCoordinateConverter* makVrv::DtLocalEnvironmentalsControllerObject::myCoordinateConverter = nullptr
protected

local clone of the current system wide coordinate system converter. for thread safety.


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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)