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

The logic for displaying/editing the environment conditions. More...

Inheritance diagram for makVrv::DtEnvironmentConditionsLogic:
Inheritance graph
[legend]

Public Member Functions

 DtEnvironmentConditionsLogic (DtDe &de, DtEnvironmentInterface &environment, DtEnvironmentConditionsInterface &iface, DtPersistenceControlsInterface &persistanceIface)
 CTOR.
virtual ~DtEnvironmentConditionsLogic ()
 DTOR.

Protected Member Functions

virtual void sendEnvironmentToGUI ()
 Populate the widget with current environment settings.
virtual void sendRemoteWeatherToGUI ()
 Populate the widget with remote weather settings.
virtual void sendPersistenceToGUI ()
 Populate the widget with persistence settings.
Slots for handling reading/writing configuration.
virtual void on_import ()
 Handle a request to import the environment from a configuration file.
virtual void on_export ()
 Handle a request to export the current environment to a configuration file.
virtual void importSettings (const std::string &file)
 Import the environment from a configuration file.
virtual void exportSettings (const std::string &file)
 Export the current environment to a configuration file.
virtual void restoreDefaultSettings ()
 Handle a request to restore the environment previous settings.
virtual void restoreFactorySettings ()
 Handle a request to restore the environment to factory settings.
Slots for handling settings changed driven from the simulation.
virtual void atmosphericParametersChanged ()
 Handle any atmospheric change.
virtual void precipitationSettingsChanged ()
 Handle any precipitation change.
virtual void cloudCoverChanged (DtVrfWeatherCloudState cloudCover)
 Handle a change to cloud cover.
virtual void cloudLayerAdded (int index, const DtCloudLayer &clouds)
 Handle when a cloud layer is added.
virtual void addCloudLayer (const DtCloudLayer &clouds)
 Utility to convert the coordinates of the cloud layer then add the cloud layer to the GUI.
virtual void cloudLayerDestroyed (int index)
 Handle when a cloud layer is destroyed.
virtual void cloudLayerChanged (int index, const DtCloudLayer &clouds)
 Handle when a cloud layer is changed.
virtual void fogHeightChanged (float altitude)
 Handle a change to fog ceiling height.
virtual void fogColorChanged (const DtVector &color)
 Handle a change to fog color.
virtual void windSpeedChanged (float speed)
 Handle a change to wind speed.
virtual void windDirectionChanged (float radians)
 Handle a change to wind direction.
virtual void seaStateChanged (unsigned int state)
 Handle a change to sea state.
virtual void seaStateDirectionChanged (float radians)
 Handle a change to sea state direction.
virtual void windDrivenSeaStateChanged (bool enabled)
 Handle a change to the wind-driven sea state flag.
virtual void swellStateChanged (unsigned int state)
 Handle a change to swell state.
virtual void swellStateDirectionChanged (float radians)
 Handle a change to swell state direction.
virtual void windFetchChanged (float distance)
 Handle a change to wind fetch.
virtual void seaChoppinessChanged (float chop)
 Handle a change to sea choppiness.
virtual void underwaterVisibilityChanged (double distance)
 Handle a change to underwater visibility.
virtual void waterSurfaceTransparencyChanged (double transparency)
 Handle a change to coastal-water transparency.
virtual void surgeDepthChanged (double depth)
 Handle a change to surge depth.
virtual void depthOffsetChanged (double offset)
 Handle a change to the depth offset.
virtual void tidalCurrentSpeedChanged (double speed)
 Handle any atmospheric change.
virtual void tidalCurrentDirectionChanged (double direction)
 Handle any atmospheric change.
virtual void displayUnitsChanged (int type, int unit)
 Handle a change to displayed units.
Slots for handling settings changed driven from the GUI.
virtual void onSelectEnvironmentConditions (const DtUnicode &name)
virtual void onAddEnvironmentConditions (const DtUnicode &name)
 Handle when a new environment condition is added.
virtual void onRemoveEnvironmentConditions (const DtUnicode &name)
 Handle when a environment condition should be removed.
virtual void onSaveEnvironmentConditions (const DtUnicode &name)
 Handle when the current environment condition should be saved.
virtual void onSetDefaultEnvironmentConditions (const DtUnicode &name)
 Handle when a default environment condition should be set.
virtual void onChangeWindSpeed (double speed)
virtual void onChangeWindDirection (double degree)
 Handle a change to wind direction.
virtual void onChangePrecipitationType (int type)
 Handle a change to precipitation type.
virtual void onChangePrecipitationIntensity (double value)
 Handle a change to precipitation intensity.
virtual void onChangeVisibility (double distance)
 Handle a change to visibility.
virtual void onChangeCloudCover (DtVrfWeatherCloudState cloudCover)
 Handle a change to cloud cover.
virtual void onRequestNewCloudLayer ()
 Handle a request to add a new cloud layer.
virtual void onAddNewCloudLayer (const DtCloudLayer &clouds)
 Handle a request to add a new cloud layer.
virtual void onRequestedEditCloudLayer (int index)
 Handle a request to edit cloud layer.
virtual void onChangeCloudLayer (int index, const DtCloudLayer &clouds)
 Handle a change to an existing cloud layer.
virtual void onDeleteCloudLayer (int index)
 Handle a request to delete cloud layer.
virtual void onEnableCloudLayer (unsigned int index, bool enabled)
 Handle a change to enable/disable a cloud layer.
virtual void onChangeFogHeight (double height)
virtual void onChangeFogColor (double red, double green, double blue)
 Handle a change to fog color.
virtual void onChangeSwellState (int index)
virtual void onChangeSwellStateDirection (double degree)
 Handle a change to swell state direction.
virtual void onEnableWindDrivenSeaState (bool enabled)
 Handle a change to the wind-driven sea-state flag.
virtual void onChangeSeaState (int index)
 Handle a change to sea-state.
virtual void onChangeSeaStateDirection (double degree)
 Handle a change to sea-state direction.
virtual void onChangeSeaSurfaceTransparency (double alpha)
virtual void onChangeUnderWaterVisibility (double distance)
 Handle a change to the underwater visibility distance.
virtual void onChangeSeaChoppiness (double chop)
 Handle a change to the water surface choppiness.
virtual void onChangeWindFetch (double distance)
 Handle a change to the ocean fetch.
virtual void onChangeSurgeDepth (double distance)
 Handle a change to the surge depth.
virtual void onChangeDepthOffset (double offset)
 Handle a change to the depth offset.
virtual void onChangeTidalCurrentSpeed (double speed)
virtual void onChangeTidalCurrentDirection (double direction)
virtual void onChangeRemoteSettings (bool enable)
virtual void onRequestRemoteSettings ()
 Handle a request for remote weather update.

Protected Attributes

DtDemyDe
DtSignalConnectionManager mySignals
DtEnvironmentInterfacemyEnvironment
DtEnvironmentConditionsInterfacemyInterface
DtPersistenceControlsInterfacemyPersistenceInterface

Detailed Description

The logic for displaying/editing the environment conditions.

Constructor & Destructor Documentation

makVrv::DtEnvironmentConditionsLogic::DtEnvironmentConditionsLogic ( DtDe de,
DtEnvironmentInterface environment,
DtEnvironmentConditionsInterface iface,
DtPersistenceControlsInterface persistanceIface 
)

CTOR.

virtual makVrv::DtEnvironmentConditionsLogic::~DtEnvironmentConditionsLogic ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtEnvironmentConditionsLogic::on_import ( )
protectedvirtual

Handle a request to import the environment from a configuration file.

virtual void makVrv::DtEnvironmentConditionsLogic::on_export ( )
protectedvirtual

Handle a request to export the current environment to a configuration file.

virtual void makVrv::DtEnvironmentConditionsLogic::importSettings ( const std::string &  file)
protectedvirtual

Import the environment from a configuration file.

Parameters
[in]fileis the name of the configuration file.
virtual void makVrv::DtEnvironmentConditionsLogic::exportSettings ( const std::string &  file)
protectedvirtual

Export the current environment to a configuration file.

Parameters
[in]fileis the name of the configuration file.
virtual void makVrv::DtEnvironmentConditionsLogic::restoreDefaultSettings ( )
protectedvirtual

Handle a request to restore the environment previous settings.

virtual void makVrv::DtEnvironmentConditionsLogic::restoreFactorySettings ( )
protectedvirtual

Handle a request to restore the environment to factory settings.

virtual void makVrv::DtEnvironmentConditionsLogic::atmosphericParametersChanged ( )
protectedvirtual

Handle any atmospheric change.

virtual void makVrv::DtEnvironmentConditionsLogic::precipitationSettingsChanged ( )
protectedvirtual

Handle any precipitation change.

virtual void makVrv::DtEnvironmentConditionsLogic::cloudCoverChanged ( DtVrfWeatherCloudState  cloudCover)
protectedvirtual

Handle a change to cloud cover.

Parameters
[in]typeof cloud cover
virtual void makVrv::DtEnvironmentConditionsLogic::cloudLayerAdded ( int  index,
const DtCloudLayer clouds 
)
protectedvirtual

Handle when a cloud layer is added.

Parameters
[in]indexis the index of the cloud layer.
[in]cloudsis the cloud layer to add.
virtual void makVrv::DtEnvironmentConditionsLogic::addCloudLayer ( const DtCloudLayer clouds)
protectedvirtual

Utility to convert the coordinates of the cloud layer then add the cloud layer to the GUI.

Parameters
[in]cloudsis the cloud layer to add.
virtual void makVrv::DtEnvironmentConditionsLogic::cloudLayerDestroyed ( int  index)
protectedvirtual

Handle when a cloud layer is destroyed.

Parameters
[in]indexis the index of the cloud layer.
virtual void makVrv::DtEnvironmentConditionsLogic::cloudLayerChanged ( int  index,
const DtCloudLayer clouds 
)
protectedvirtual

Handle when a cloud layer is changed.

Parameters
[in]indexis the index of the cloud layer.
[in]cloudsis the data about the cloud layer.
virtual void makVrv::DtEnvironmentConditionsLogic::fogHeightChanged ( float  altitude)
protectedvirtual

Handle a change to fog ceiling height.

Parameters
[in]altitudeis the fog ceiling height in meters.
virtual void makVrv::DtEnvironmentConditionsLogic::fogColorChanged ( const DtVector color)
protectedvirtual

Handle a change to fog color.

Parameters
[in]coloris the fog color in normalized values.
virtual void makVrv::DtEnvironmentConditionsLogic::windSpeedChanged ( float  speed)
protectedvirtual

Handle a change to wind speed.

Parameters
[in]speedis the wind speed.
virtual void makVrv::DtEnvironmentConditionsLogic::windDirectionChanged ( float  radians)
protectedvirtual

Handle a change to wind direction.

Parameters
[in]radiansis the direction the wind blows from.
virtual void makVrv::DtEnvironmentConditionsLogic::seaStateChanged ( unsigned int  state)
protectedvirtual

Handle a change to sea state.

Parameters
[in]stateis the Douglas Sea State.
virtual void makVrv::DtEnvironmentConditionsLogic::seaStateDirectionChanged ( float  radians)
protectedvirtual

Handle a change to sea state direction.

Parameters
[in]radiansis the direction in radians clockwise from north.
virtual void makVrv::DtEnvironmentConditionsLogic::windDrivenSeaStateChanged ( bool  enabled)
protectedvirtual

Handle a change to the wind-driven sea state flag.

Parameters
[in]enabledis the flag for wind-driven sea state.
virtual void makVrv::DtEnvironmentConditionsLogic::swellStateChanged ( unsigned int  state)
protectedvirtual

Handle a change to swell state.

Parameters
[in]stateis the Douglas Swell State.
virtual void makVrv::DtEnvironmentConditionsLogic::swellStateDirectionChanged ( float  radians)
protectedvirtual

Handle a change to swell state direction.

Parameters
[in]radiansis the direction in radians clockwise from north.
virtual void makVrv::DtEnvironmentConditionsLogic::windFetchChanged ( float  distance)
protectedvirtual

Handle a change to wind fetch.

Parameters
[in]distanceis the wind fetch in meters.
virtual void makVrv::DtEnvironmentConditionsLogic::seaChoppinessChanged ( float  chop)
protectedvirtual

Handle a change to sea choppiness.

Parameters
[in]chopis a normalized value of choppiness.
virtual void makVrv::DtEnvironmentConditionsLogic::underwaterVisibilityChanged ( double  distance)
protectedvirtual

Handle a change to underwater visibility.

Parameters
[in]distanceis the underwater visibility in meters.
virtual void makVrv::DtEnvironmentConditionsLogic::waterSurfaceTransparencyChanged ( double  transparency)
protectedvirtual

Handle a change to coastal-water transparency.

Parameters
[in]transparencyis a normalized value of transparency.
virtual void makVrv::DtEnvironmentConditionsLogic::surgeDepthChanged ( double  depth)
protectedvirtual

Handle a change to surge depth.

Parameters
[in]depthis the surge depth in meters.
virtual void makVrv::DtEnvironmentConditionsLogic::depthOffsetChanged ( double  offset)
protectedvirtual

Handle a change to the depth offset.

Parameters
[in]offsetis the depth offset in meters.
virtual void makVrv::DtEnvironmentConditionsLogic::tidalCurrentSpeedChanged ( double  speed)
protectedvirtual

Handle any atmospheric change.

virtual void makVrv::DtEnvironmentConditionsLogic::tidalCurrentDirectionChanged ( double  direction)
protectedvirtual

Handle any atmospheric change.

virtual void makVrv::DtEnvironmentConditionsLogic::displayUnitsChanged ( int  type,
int  unit 
)
protectedvirtual

Handle a change to displayed units.

Parameters
[in]typeis the type of unit changed.
[in]unitis the new active display unit for the type.
virtual void makVrv::DtEnvironmentConditionsLogic::onSelectEnvironmentConditions ( const DtUnicode name)
protectedvirtual

Handle an environment condition selection change.

Parameters
[in]nameis the name of the environment condition to select.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onAddEnvironmentConditions ( const DtUnicode name)
protectedvirtual

Handle when a new environment condition is added.

Parameters
[in]nameis the name of the environment condition to add.
Note
Adding a new condition does not automatically select it.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onRemoveEnvironmentConditions ( const DtUnicode name)
protectedvirtual

Handle when a environment condition should be removed.

Parameters
[in]nameis the name of the environment condition to remove.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onSaveEnvironmentConditions ( const DtUnicode name)
protectedvirtual

Handle when the current environment condition should be saved.

Parameters
[in]nameis the name to save the current conditions as.
virtual void makVrv::DtEnvironmentConditionsLogic::onSetDefaultEnvironmentConditions ( const DtUnicode name)
protectedvirtual

Handle when a default environment condition should be set.

Parameters
[in]nameis the name of the default environment conditions.
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeWindSpeed ( double  speed)
protectedvirtual

Handle a change to wind speed.

Parameters
[in]speedis the speed of the wind (in commanded units).

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeWindDirection ( double  degree)
protectedvirtual

Handle a change to wind direction.

Parameters
[in]degreeis the direction of the wind.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangePrecipitationType ( int  type)
protectedvirtual

Handle a change to precipitation type.

Parameters
[in]typeis the type of precipitation (None, Rain, Snow).

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangePrecipitationIntensity ( double  value)
protectedvirtual

Handle a change to precipitation intensity.

Parameters
[in]valueis the intensity of precipitation (0.0 - 100.0).

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeVisibility ( double  distance)
protectedvirtual

Handle a change to visibility.

Parameters
[in]distanceis the visible distance (in commanded units).

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeCloudCover ( DtVrfWeatherCloudState  cloudCover)
protectedvirtual

Handle a change to cloud cover.

Parameters
[in]thenew cloud cover

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onRequestNewCloudLayer ( )
protectedvirtual

Handle a request to add a new cloud layer.

Parameters
[in]cloudsis the cloud layer data.
virtual void makVrv::DtEnvironmentConditionsLogic::onAddNewCloudLayer ( const DtCloudLayer clouds)
protectedvirtual

Handle a request to add a new cloud layer.

Parameters
[in]cloudsis the cloud layer data.
virtual void makVrv::DtEnvironmentConditionsLogic::onRequestedEditCloudLayer ( int  index)
protectedvirtual

Handle a request to edit cloud layer.

Parameters
[in]indexis the index of the cloud layer.
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeCloudLayer ( int  index,
const DtCloudLayer clouds 
)
protectedvirtual

Handle a change to an existing cloud layer.

Parameters
[in]indexis the index of the cloud layer.
[in]cloudsis the cloud layer data.
virtual void makVrv::DtEnvironmentConditionsLogic::onDeleteCloudLayer ( int  index)
protectedvirtual

Handle a request to delete cloud layer.

Parameters
[in]indexis the index of the cloud layer.
virtual void makVrv::DtEnvironmentConditionsLogic::onEnableCloudLayer ( unsigned int  index,
bool  enabled 
)
protectedvirtual

Handle a change to enable/disable a cloud layer.

Parameters
[in]indexis the index of the cloud layer.
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeFogHeight ( double  height)
protectedvirtual

Handle a change to fog height.

Parameters
[in]heightis the ceiling height (in commanded units).
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeFogColor ( double  red,
double  green,
double  blue 
)
protectedvirtual

Handle a change to fog color.

Parameters
[in]redis the normalized color component from 0.0 to 1.0.
[in]greenis the normalized color component from 0.0 to 1.0.
[in]blueis the normalized color component from 0.0 to 1.0.
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeSwellState ( int  index)
protectedvirtual

Handle a change to sea-swell state.

Parameters
[in]indexis the index of the sea-swell.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeSwellStateDirection ( double  degree)
protectedvirtual

Handle a change to swell state direction.

Parameters
[in]degreeis the direction of the swell state.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onEnableWindDrivenSeaState ( bool  enabled)
protectedvirtual

Handle a change to the wind-driven sea-state flag.

Parameters
[in]enabledis the flag for wind-driven sea-state.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeSeaState ( int  index)
protectedvirtual

Handle a change to sea-state.

Parameters
[in]indexis the index of the sea-state.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeSeaStateDirection ( double  degree)
protectedvirtual

Handle a change to sea-state direction.

Parameters
[in]degreeis the direction of the sea-state.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeSeaSurfaceTransparency ( double  alpha)
protectedvirtual

Handle a change to surface transparency.

Parameters
[in]alphais the amount of alpha for the sea-surface (0.0 - 1.0).

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeUnderWaterVisibility ( double  distance)
protectedvirtual

Handle a change to the underwater visibility distance.

Parameters
[in]distanceis the visible distance underwater.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeSeaChoppiness ( double  chop)
protectedvirtual

Handle a change to the water surface choppiness.

Parameters
[in]chopis the amount of choppiness (0.0 - 1.0).

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeWindFetch ( double  distance)
protectedvirtual

Handle a change to the ocean fetch.

Parameters
[in]distanceis the is the distance for sea fetch.
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeSurgeDepth ( double  distance)
protectedvirtual

Handle a change to the surge depth.

Parameters
[in]distanceis the is the distance for surge depth.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::onChangeDepthOffset ( double  offset)
protectedvirtual

Handle a change to the depth offset.

Parameters
[in]offsetis the is the depth offset distance.
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeTidalCurrentSpeed ( double  speed)
protectedvirtual

Handle a change to surface transparency.

Parameters
[in]alphais the amount of alpha for the sea-surface (0.0 - 1.0).
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeTidalCurrentDirection ( double  direction)
protectedvirtual

Handle a change to surface transparency.

Parameters
[in]alphais the amount of alpha for the sea-surface (0.0 - 1.0).
virtual void makVrv::DtEnvironmentConditionsLogic::onChangeRemoteSettings ( bool  enable)
protectedvirtual

Handle a change to remote weather controls.

Parameters
[in]valueis the enabled state for listening to remote weather.
virtual void makVrv::DtEnvironmentConditionsLogic::onRequestRemoteSettings ( )
protectedvirtual

Handle a request for remote weather update.

virtual void makVrv::DtEnvironmentConditionsLogic::sendEnvironmentToGUI ( )
protectedvirtual

Populate the widget with current environment settings.

Reimplemented in makVrf::DtVrfEnvironmentConditionsWeatherLogic.

virtual void makVrv::DtEnvironmentConditionsLogic::sendRemoteWeatherToGUI ( )
protectedvirtual

Populate the widget with remote weather settings.

virtual void makVrv::DtEnvironmentConditionsLogic::sendPersistenceToGUI ( )
protectedvirtual

Populate the widget with persistence settings.

Member Data Documentation

DtDe& makVrv::DtEnvironmentConditionsLogic::myDe
protected
DtSignalConnectionManager makVrv::DtEnvironmentConditionsLogic::mySignals
protected
DtEnvironmentInterface& makVrv::DtEnvironmentConditionsLogic::myEnvironment
protected
DtEnvironmentConditionsInterface& makVrv::DtEnvironmentConditionsLogic::myInterface
protected
DtPersistenceControlsInterface& makVrv::DtEnvironmentConditionsLogic::myPersistenceInterface
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)