![]() |
VR-Forces 4.6.1 Class Documentation
|
The DtEnvironment configures the environmental effects for a scene. More...

Public Member Functions | |
| DtEnvironment (DtDe &de, DtAgentManagerInterface &sceneInterface) | |
| CTOR. | |
| virtual | ~DtEnvironment () |
| Virtual DTOR. | |
| virtual void | clear () |
| Clear all clouds, precipitation. | |
| virtual void | getRecord (makArchives::DtEnvironmentRecord &record) |
| Put the current environment conditions into a record. | |
| virtual void | setFromRecord (const makArchives::DtEnvironmentRecord &record) |
| Set the current environment conditions from a record. | |
| virtual makArchives::DtEnvironmentRecord | environmentConditionRecord (const std::string &) |
| Returns the environment record for the environment condition name. | |
| virtual void | addCloudLayer (const DtCloudLayer &layer) |
| Add a cloud layer. (It is enabled by default). | |
| virtual void | removeCloudLayer (unsigned int layerId) |
| Remove a cloud layer by index. | |
| virtual void | removeCloudLayers () |
| Remove all cloud layers for the current environment condition. | |
| virtual void | setCloudLayerEnabled (unsigned int layerId, bool enabled) |
| Set whether a cloud layer is enabled (visible). | |
| virtual float | lightLevel () const |
| Get the current prevailing ambient light value Allows thing to be activated/deactivated by light level; values gp from 0. | |
| const DtSettingsBackup * | settingsBackup () const |
| DtSettingsBackup * | settingsBackup () |
| virtual bool | getIsUnderwater () const |
| Water visibility when below water. | |
| virtual bool | isOverWater (const DtVector &localPosition, bool isVisible=true) |
| Returns whether we are currently over water. | |
| virtual float | getMaximumWaveHeight () |
| Returns maximum wave height just based on the sea state. | |
| virtual float | seaLevel () const |
| Returns the current sea level. | |
| virtual void | setOceanManager (DtOceanStateInterface *oceanManager) |
| Set the current ocean manager which fulfills the DtOceanManagerInterface. | |
| virtual void | deleteOceanManager () |
| Use to get rid of the current (usually default) ocean manager. | |
| virtual void | initializeEnvironmentSettings () |
| Initialize environment settings (cloud cover and settings from default record) | |
| virtual void | saveEnvironment (const std::string &name) |
| virtual void | setEnvironment (const std::string &name) |
| Set the current environment to the environment of the given name. | |
| virtual void | removeEnvironment (const std::string &name) |
| Remove an environment with the given name. | |
| virtual void | renameEnvironment (const std::string &oldName, const std::string &newName) |
| Rename an environment entry. | |
| virtual void | getEnvironmentNames (std::vector< std::string > &names) |
| Get the names of all the environment conditions. | |
| virtual void | setDefaultEnvironmentName (const std::string &name) |
| Set the name of the default environment conditions. | |
| virtual std::string | defaultEnvironmentName () const |
| Get the name of the default environment conditions. | |
| virtual void | setCloudCover (DtVrfWeatherCloudState cloudCover, bool autoSave=true) |
| Set / get which cloud cover to use. | |
| virtual DtVrfWeatherCloudState | cloudCover () const |
| virtual int | cloudLayerCount () const |
| Set / Get cloud additional layers. | |
| virtual const DtCloudLayer & | cloudLayer (unsigned int layerId) const |
| Get the specified cloud layer. | |
| virtual void | setCloudLayer (unsigned int layerId, const DtCloudLayer &layer) |
| Sets the layer specified by layerId to layer, if it exists. | |
| virtual bool | useCustomCloudCover () const |
| Set / get whether custom clouds are used. Not supported in 1.6. | |
| virtual void | setUseCustomCloudCover (bool enabled) |
| virtual void | setAirTurbidity (float turbidity, bool autoSave=true) |
| Set / get the air turbidity (haziness) | |
| virtual float | airTurbidity () const |
| virtual void | setVisibleDistance (float distance, bool autoSave=true) |
| Set / get the visible distance in meters. | |
| virtual float | visibleDistance () const |
| virtual void | setPrecipitationType (PrecipitationType type, bool autoSave=true) |
| Set / get the precipitation type. | |
| virtual PrecipitationType | precipitationType () const |
| virtual void | setPrecipitationIntensity (float intensity, bool autoSave=true) |
| Set / get the precipitation intensity. | |
| virtual float | precipitationIntensity () const |
| virtual void | setWindSpeed (float speed, bool autoSave=true) |
| Set / get the wind speed in meters per second. | |
| virtual float | windSpeed () const |
| virtual void | setWindDirection (float direction, bool autoSave=true) |
| Set / get the wind direction in radians from north (clockwise). | |
| virtual float | windDirection () const |
| virtual void | setAmbientAirTemperature (float temperature, bool autoSave=true) |
| Set / get the ambient air temperature in Celsius. | |
| virtual float | ambientAirTemperature () const |
| virtual void | setFogHeight (float height, bool autoSave=true) |
| Set / get the fog ceiling height in meters. | |
| virtual float | fogHeight () const |
| virtual void | setFogColor (const DtVector &color, bool autoSave=true) |
| Set / get the fog color in normalized color components. | |
| virtual DtVector | fogColor () const |
| virtual void | setSeaState (int state, bool autoSave=true) |
| Set / get the sea state according to the Beaufort Scale. | |
| virtual int | seaState () const |
| virtual void | setSeaStateDirection (float dir, bool autoSave=true) |
| Set / get the sea state direction in radians from north. | |
| virtual float | seaStateDirection () const |
| virtual void | setWindDrivenSeaState (bool enabled, bool autoSave=true) |
| Set / get if sea state is wind driven or manually driven. | |
| virtual bool | windDrivenSeaState () const |
| virtual void | setSwellState (int state, bool autoSave=true) |
| Set / get the sea-swell state according to the Douglas Scale. | |
| virtual int | swellState () const |
| virtual void | setSwellStateDirection (float dir, bool autoSave=true) |
| Set / get the sea-swell state direction in radians from north. | |
| virtual float | swellStateDirection () const |
| virtual void | setWindFetch (float distance, bool autoSave=true) |
| Set / get the ocean fetch. | |
| virtual float | windFetch () const |
| virtual void | setSeaChoppiness (float chop, bool autoSave=true) |
| Set / get the amount of chop on the sea. | |
| virtual float | seaChoppiness () const |
| void | setUnderwaterVisibilityEnabled (bool enabled, bool autoSave=true) |
| bool | underwaterVisibilityEnabled () const |
| virtual void | setUnderwaterVisibility (float distance, bool autoSave=true) |
| Set / get the maximum visibility under water in meters. | |
| virtual float | underwaterVisibility () const |
| virtual void | setWaterSurfaceTransparency (float normalizedValue, bool autoSave=true) |
| Set / get the transparency value of water surface. | |
| virtual float | waterSurfaceTransparency () const |
| virtual void | setSurgeDepth (float meters, bool autoSave=true) |
| Set / Get the surge depth in distance. | |
| virtual float | surgeDepth () const |
| virtual void | setDepthOffset (float meters, bool autoSave=true) |
| Set / Get the depth offset in distance. | |
| virtual float | depthOffset () const |
| virtual void | setAmbientWaterTemperature (float temperature, bool autoSave=true) |
| Set / get the ambient water temperature in celsius. | |
| virtual float | ambientWaterTemperature () const |
| virtual void | setWaterCurrentSpeed (float speed, bool autoSave=true) |
| Set / get the speed of water currents in meters per second. | |
| virtual float | waterCurrentSpeed () const |
| virtual void | setWaterCurrentDirection (float direction, bool autoSave=true) |
| Set / get the direction of water currents in radians from north (clockwise). | |
| virtual float | waterCurrentDirection () const |
| virtual void | setTidalOffset (float meters, bool autoSave=true) |
| Set / get the current tidal offset from mean-sea-level in meters. | |
| virtual float | tidalOffset () const |
| virtual void | setTidalDirection (bool inOut, bool autoSave=true) |
| Set / get the current direction of tidal flow (0=out, 1=in). | |
| virtual bool | tidalDirection () const |
| virtual void | setThermoclineDepth (unsigned int layer, float depth) |
| Set / get the thermocline depths. | |
| virtual float | thermoclineDepth (unsigned int layer) const |
| virtual void | setThermoclinePermeability (unsigned int layer, float permeability) |
| Set / get the thermocline permeability. | |
| virtual float | thermoclinePermeability (unsigned int layer) const |
| void | loadDefaults (bool loadOnlyFactorySettings=false) |
| void | restore () |
| Restores to backup settings from startup default. | |
| void | saveAsDefaults () |
| Save the current settings as the default settings. | |
| virtual void | exportSettings (const std::string &filename) |
| Import / export the list of named conditions (.enlx file) | |
| virtual void | importSettings (const std::string &filename) |
Public Member Functions inherited from makVrv::DtEnvironmentInterface | |
| DtEnvironmentInterface () | |
| CTOR. | |
| virtual | ~DtEnvironmentInterface () |
| Virtual DTOR. | |
Protected Types | |
| typedef std::vector< DtCloudLayer > | CloudLayersVector |
Protected Member Functions | |
| virtual void | createCloudLayers () |
| Pre-load all the cloud layers and send them to the sky object. | |
| virtual void | slot_coordinateSystemChanged () |
| Called when the current coordinate system changes. | |
| virtual void | slot_oceanLayerAdded (const DtOceanLayer &layer) |
| Called by signal when an ocean layer is added. | |
| virtual void | slot_oceanLayerToBeDeleted (const DtOceanLayer &layer) |
| Called by signal when an ocean layer is about to be removed. | |
| virtual void | slot_oceanLayerSeaLevelChanged (const DtOceanLayer &layer, double seaLevel) |
| Called by signal when an ocean layer's sea level changes. | |
| virtual void | slot_oceanLayerLodRangeChanged (const DtOceanLayer &layer, int range) |
| Called by signal when an ocean layer's lod range (the altitude at which we LOD out dynamic ocean) changes. | |
| virtual void | slot_surgeDepthChanged (double depth) |
| Called by signal when the surge depth changes. | |
| virtual void | slot_depthOffsetChanged (double offset) |
| Called by signal when the depth offset changes. | |
| virtual void | updateEnvironment () |
| Update the environment settings for the current environment. | |
| virtual void | initializeOcean () |
| Initialize the (distributed) dynamic ocean object with the current environmental values. | |
| virtual void | enableCurrentCloudCoverLayers () |
| enables selected cloud cover | |
| virtual void | processAddedCloudLayer (const DtCloudLayer &layer, int cloudIndex) |
| virtual void | autoSave () |
| virtual void | sendMarineEnvironmentToOceanObject () |
| Helper function to set the appropriate marine environment on a dynamic ocean object. | |
| virtual void | sendWeatherEnvironmentToSkyObject () |
| Helper function to set the appropriate weather environment on a sky object. | |
| virtual void | sendCloudCoverToSkyObject () |
| Helper function to set the appropriate cloud conditions on a sky object. | |
Protected Attributes | |
| DtDe & | myDe |
| DtAgentManagerInterface & | mySceneInterface |
| DtSkyObjectAgent * | mySkyObject |
| DtDynamicOceanObjectAgent * | myDynamicOceanObject |
| DtRecordSettingsBackupInterface * | mySettingsBackup |
| DtSignalConnectionManager | myConnections |
| makArchives::DtEnvironmentRecord | myCurrentSettings |
| DtEnvironmentList | myEnvironmentList |
| CloudLayersVector | myCurrentCloudLayers |
| DtOceanStateInterface * | myOceanManager |
| std::multimap < DtVrfWeatherCloudState, int > | myCoverCloudsMap |
| bool | myPreloadClouds |
Additional Inherited Members | |
Public Types inherited from makVrv::DtEnvironmentInterface | |
| enum | PrecipitationType { None = DtSkyObject::None, Rain = DtSkyObject::Rain, Snow = DtSkyObject::SnowWet } |
The DtEnvironment configures the environmental effects for a scene.
Environmental effects include clouds, precipitation, air turbidity, ambient air temperature and visibility
|
protected |
| makVrv::DtEnvironment::DtEnvironment | ( | DtDe & | de, |
| DtAgentManagerInterface & | sceneInterface | ||
| ) |
CTOR.
|
virtual |
Virtual DTOR.
|
virtual |
Clear all clouds, precipitation.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Put the current environment conditions into a record.
| [out] | record | is the record to be populated with data. |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set the current environment conditions from a record.
| [in] | record | is the record to read the data from. |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Returns the environment record for the environment condition name.
|
virtual |
Save the current environment with the given name.
| [in] | name | is the name of the environment to save. |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set the current environment to the environment of the given name.
| [in] | name | is the name of the environment to set. |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Remove an environment with the given name.
| [in] | name | is the name of the environment to remove. |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Rename an environment entry.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Get the names of all the environment conditions.
Implements makVrv::DtEnvironmentInterface.
Referenced by makVrf::DtDisabledEnvironment::getEnvironmentNames().
|
virtual |
Set the name of the default environment conditions.
| [in] | name | is the name of the default environment. |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Get the name of the default environment conditions.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get which cloud cover to use.
This chooses one of the NOAA-defined cloud conditions. cloudCover is one of: DtVrfWeatherCloudStateClear DtVrfWeatherCloudStateMostlyClear DtVrfWeatherCloudStateCloudy DtVrfWeatherCloudStatePartlyCloudy DtVrfWeatherCloudStateMostlyCloudy DtVrfWeatherCloudStateOvercast DtVrfWeatherCloudStateThunderstorm
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / Get cloud additional layers.
Get a count of the current cloud layers in the environment
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Get the specified cloud layer.
Throws DtException if the layerId >= cloudLayerCount()
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Sets the layer specified by layerId to layer, if it exists.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Add a cloud layer. (It is enabled by default).
Implements makVrv::DtEnvironmentInterface.
Remove a cloud layer by index.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Remove all cloud layers for the current environment condition.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set whether a cloud layer is enabled (visible).
This is a wrapper for getting a layer, setting its enabled flag, and then calling setCloudLayer with the modified layer
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get whether custom clouds are used. Not supported in 1.6.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the air turbidity (haziness)
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the visible distance in meters.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the precipitation type.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the precipitation intensity.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the wind speed in meters per second.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the wind direction in radians from north (clockwise).
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the ambient air temperature in Celsius.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the fog ceiling height in meters.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the fog color in normalized color components.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
Set / get the sea state according to the Beaufort Scale.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the sea state direction in radians from north.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get if sea state is wind driven or manually driven.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
Set / get the sea-swell state according to the Douglas Scale.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the sea-swell state direction in radians from north.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the ocean fetch.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the amount of chop on the sea.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / Get underwater visibility enabled.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the maximum visibility under water in meters.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the transparency value of water surface.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / Get the surge depth in distance.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / Get the depth offset in distance.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the ambient water temperature in celsius.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the speed of water currents in meters per second.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the direction of water currents in radians from north (clockwise).
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the current tidal offset from mean-sea-level in meters.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
Set / get the current direction of tidal flow (0=out, 1=in).
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
Set / get the thermocline depths.
Implements makVrv::DtEnvironmentInterface.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Set / get the thermocline permeability.
Implements makVrv::DtEnvironmentInterface.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Get the current prevailing ambient light value Allows thing to be activated/deactivated by light level; values gp from 0.
(total darkness) to 1. (noon-day sun )
|
virtual |
Load default settings.
| [in] | loadOnlyFactorySettings | flag to load factory settings. |
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Restores to backup settings from startup default.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Save the current settings as the default settings.
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Import / export the list of named conditions (.enlx file)
Implements makVrv::DtEnvironmentInterface.
|
virtual |
Implements makVrv::DtEnvironmentInterface.
|
inline |
|
inline |
|
virtual |
Water visibility when below water.
|
virtual |
Returns whether we are currently over water.
This can't be implemented correctly until we have coastal boundaries. For now, we use the returned height of an terrain intersect call - sea level is water, anything higher is not. The isVisible flag allows for an optimization when Triton ocean is used. The optimization is used by default; the isVisible flag says that the query position is close enought to an observer so that a height map should be available for use. This is often the case when doing intersections involving objects/effects that are LOD's in/out; if the object is close enough to an observer to be of interest (a rotor wash or wake, say) then it can use the height map optimization. If you do not know if the query position is close to an observer, than set isVisible to false, in which case the terrain intersection method will be used.
|
virtual |
Returns maximum wave height just based on the sea state.
|
virtual |
Returns the current sea level.
|
virtual |
Set the current ocean manager which fulfills the DtOceanManagerInterface.
|
virtual |
Use to get rid of the current (usually default) ocean manager.
|
virtual |
Initialize environment settings (cloud cover and settings from default record)
|
protectedvirtual |
Pre-load all the cloud layers and send them to the sky object.
|
protectedvirtual |
Called when the current coordinate system changes.
Implements makVrv::DtEnvironmentInterface.
|
protectedvirtual |
Called by signal when an ocean layer is added.
Implements makVrv::DtEnvironmentInterface.
|
protectedvirtual |
Called by signal when an ocean layer is about to be removed.
Implements makVrv::DtEnvironmentInterface.
|
protectedvirtual |
Called by signal when an ocean layer's sea level changes.
Implements makVrv::DtEnvironmentInterface.
|
protectedvirtual |
Called by signal when an ocean layer's lod range (the altitude at which we LOD out dynamic ocean) changes.
Implements makVrv::DtEnvironmentInterface.
|
protectedvirtual |
Called by signal when the surge depth changes.
Implements makVrv::DtEnvironmentInterface.
|
protectedvirtual |
Called by signal when the depth offset changes.
Implements makVrv::DtEnvironmentInterface.
|
protectedvirtual |
Update the environment settings for the current environment.
|
protectedvirtual |
Initialize the (distributed) dynamic ocean object with the current environmental values.
|
protectedvirtual |
enables selected cloud cover
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Helper function to set the appropriate marine environment on a dynamic ocean object.
|
protectedvirtual |
Helper function to set the appropriate weather environment on a sky object.
|
protectedvirtual |
Helper function to set the appropriate cloud conditions on a sky object.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |