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 Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtCloudCoverManager Class Reference

Defines the manager class that manages the different cloud cover configurations being used by VR-Vantage. More...

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

Classes

struct  CloudCoverData
 This is the data we track for each cloud cover. More...
 
struct  LayerIdData
 This is the data we'll keep in a map for each layer id. More...
 

Public Types

typedef std::vector
< DtCloudLayerId
CloudLayerIdList
 A simple list of cloud layer ids. More...
 
typedef std::map< std::string,
CloudCoverData
CloudCoverCloudLayerIdMap
 This map is updated as cloud layers are added or removed. More...
 

Public Member Functions

virtual ~DtCloudCoverManager ()
 
const CloudCoverCloudLayerIdMapcloudCoverMap () const
 Cloud Cover and Cloud Layer Accessors. More...
 
bool isValidCloudCover (const std::string &cloudCover) const
 Returns true if the cloud cover exists, false otherwise. More...
 
const CloudLayerIdListcloudLayerList (const std::string &cloudCover) const
 Get the list of cloud layer ids for the specified cloud cover. More...
 
bool isValidCloudLayer (DtCloudLayerId layerId) const
 Returns true if the cloud layer exists, false otherwise. More...
 
virtual std::string cloudCoverForLayer (DtCloudLayerId layerId) const
 Return the name of the cloud cover the cloud layer with the provided layer id is a part of. More...
 
virtual const DtCloudLayercloudLayer (DtCloudLayerId layerId) const
 Get the cloud layer for the specified layer id - const version. More...
 
virtual DtCloudLayercloudLayer (DtCloudLayerId layerId)
 Get the cloud layer for the specified layer id. More...
 
virtual bool getCloudLayerIdFromCloudCoverAndBaseMSL (const std::string &cloudCover, float baseMSLAltitude, DtCloudLayerId &result) const
 Get a list of cloud layer ids whose cloud layers are at the base MSL altitude, in meters, provided and are part of the cloud cover with the provided name. More...
 
virtual bool cloudLayerEnabled (DtCloudLayerId layerId) const
 Get the enable state of a cloud layer within it's cloud cover. More...
 
virtual void addCloudCover (const std::string &cloudCoverName)
 Cloud Cover and Cloud Layer mutators. More...
 
virtual void removeCloudCover (const std::string &cloudCoverName)
 Remove an existing cloud cover (and all its associated layers). More...
 
virtual void renameCloudCover (const std::string &oldName, const std::string &newName)
 Rename an existing cloud cover. More...
 
virtual DtCloudLayerId addCloudLayer (const std::string &cloudCoverName, const DtCloudLayer &layer)
 Add a cloud layer to the specified cloud cover. More...
 
virtual DtCloudLayerId addCloudLayerByRecord (const std::string &cloudCoverName, const makArchives::DtCloudLayerRecord &layerRecord)
 Add a cloud layer to the specified cloud cover, using its record. More...
 
virtual bool deleteCloudLayer (DtCloudLayerId layerToDelete)
 Delete the cloud layer specified by layerToDelete. More...
 
virtual bool changeCloudLayer (DtCloudLayerId layerId, const DtCloudLayer &newLayer)
 Change the specified layer id to match the new layer. More...
 
virtual bool updateCloudLayerUsingRecord (DtCloudLayerId layerId, const makArchives::DtCloudLayerRecord &record)
 
virtual bool setCloudLayerPositionAndOrientation (DtCloudLayerId layerId, const DtVector &position, float orientation=0.)
 Modify the position of an existing cloud layer. More...
 
virtual bool setCloudLayerEnabled (DtCloudLayerId layerId, bool enabled)
 Set the enable state of a cloud layer within it's cloud cover. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static DtCloudCoverManagerinstance (DtDe &de)
 Get an instance of the cloud cover manager. More...
 

Public Attributes

boost::signalslib::signal
< void(const std::string &)> 
signal_cloudCoverAdded
 BOOST SIGNALS used to let clients know what has transpired in this manager. More...
 
boost::signalslib::signal
< void(const std::string &)> 
signal_cloudCoverToBeRemoved
 signal_cloudCoverToBeRemoved is raised just before a cloud cover is removed More...
 
boost::signalslib::signal
< void(const std::string &)> 
signal_cloudCoverRemoved
 signal_cloudCoverRemoved is raised immediately after a cloud cover is removed More...
 
boost::signalslib::signal
< void(DtCloudLayerId, bool)> 
signal_cloudLayerEnabledChanged
 signal_cloudLayerEnabledChanged is raised when the enabled state of a cloud layer within its cloud cover is enabled or disabled More...
 
boost::signalslib::signal
< void(DtCloudLayerId, const
DtVector &, float)> 
signal_cloudLayerPositionAndOrientationChanged
 signal_cloudLayerPositionChanged is raised when a cloud layer's position is modified More...
 
boost::signalslib::signal
< void(DtCloudLayerId layerId,
const DtCloudLayer
&changedLayer)> 
signal_cloudLayerToBeModified
 signal_cloudLayerToBeModified is raised when a cloud layer is about to be changed. More...
 
boost::signalslib::signal
< void(DtCloudLayerId layerId,
const DtCloudLayer &oldLayer)> 
signal_cloudLayerModified
 signal_cloudLayerModified is raised when a cloud layer has changed. More...
 
boost::signalslib::signal
< void(DtCloudLayerId newLayer,
const std::string &coverName)> 
signal_cloudLayerAdded
 signal_cloudLayerAdded is raised when a cloud layer is added to a cloud cover More...
 
boost::signalslib::signal
< void(DtCloudLayerId oldLayer)> 
signal_cloudLayerToBeRemoved
 signal_cloudLayerToBeRemoved is raised when a cloud layer is about to be removed from a cloud cover More...
 
boost::signalslib::signal
< void(DtCloudLayerId oldLayer)> 
signal_cloudLayerRemoved
 signal_cloudLayerRemoved is raise when a cloud layer is removed from a cloud cover More...
 

Protected Types

typedef std::unordered_map
< DtCloudLayerId, LayerIdData
CloudLayerIdMap
 This map is created when a data file is read and updated if cloud layers are added or removed. More...
 

Protected Member Functions

 DtCloudCoverManager (makVrv::DtDe &)
 CTOR. More...
 
virtual void initialize ()
 Set up the 'External' cloud cover. More...
 
DtCloudLayerId allocateCloudLayerId ()
 Return the next available cloud layer id. More...
 
virtual void createExternalCloudCover ()
 Add information about the 'External' cloud cover to the manager. More...
 

Protected Attributes

CloudLayerIdMap myCloudLayerIdMap
 
CloudCoverCloudLayerIdMap myCloudCoverCloudLayerIdMap
 
DtCloudLayerId myFreeCloudLayerId
 
DtDemyDe
 

Detailed Description

Defines the manager class that manages the different cloud cover configurations being used by VR-Vantage.

The manager also creates and supports a special always-visualized cloud cover called "External" that contains dynamic cloud layers visualized using a local cloud layer tactical created in VR-Forces and published via VR-Link. The 'External' cloud cover is initialized to have no cloud layers and its configuration is never written to disk, like other cloud covers. API users may use the cloud cover manager to add cloud layers to existing cloud covers.

There is a cloud cover for every environment configuration maintained by VR-Vantage. The cloud cover name matches the name of the environment configuration.

Member Typedef Documentation

A simple list of cloud layer ids.

Each cloud layer added through the API is assigned a unique cloud layer id

This map is updated as cloud layers are added or removed.

This map is created when a data file is read and updated if cloud layers are added or removed.

Constructor & Destructor Documentation

virtual makVrv::DtCloudCoverManager::~DtCloudCoverManager ( )
virtual
makVrv::DtCloudCoverManager::DtCloudCoverManager ( makVrv::DtDe )
protected

CTOR.

Member Function Documentation

static DtCloudCoverManager& makVrv::DtCloudCoverManager::instance ( DtDe de)
static

Get an instance of the cloud cover manager.

const CloudCoverCloudLayerIdMap& makVrv::DtCloudCoverManager::cloudCoverMap ( ) const

Cloud Cover and Cloud Layer Accessors.

Returns the entire map of cloud covers and associated cloud layers

bool makVrv::DtCloudCoverManager::isValidCloudCover ( const std::string &  cloudCover) const

Returns true if the cloud cover exists, false otherwise.

const CloudLayerIdList& makVrv::DtCloudCoverManager::cloudLayerList ( const std::string &  cloudCover) const

Get the list of cloud layer ids for the specified cloud cover.

This method throws DtInvalidInput if the cloud cover does not exist.

bool makVrv::DtCloudCoverManager::isValidCloudLayer ( DtCloudLayerId  layerId) const

Returns true if the cloud layer exists, false otherwise.

virtual std::string makVrv::DtCloudCoverManager::cloudCoverForLayer ( DtCloudLayerId  layerId) const
virtual

Return the name of the cloud cover the cloud layer with the provided layer id is a part of.

This method returns the empty string if the provided layer id is not a part of any cloud cover being maintained.

virtual const DtCloudLayer& makVrv::DtCloudCoverManager::cloudLayer ( DtCloudLayerId  layerId) const
virtual

Get the cloud layer for the specified layer id - const version.

This method throws DtInvalidInput if the layer does not exist.

virtual DtCloudLayer& makVrv::DtCloudCoverManager::cloudLayer ( DtCloudLayerId  layerId)
virtual

Get the cloud layer for the specified layer id.

This method throws DtInvalidInput if the layer does not exist.

virtual bool makVrv::DtCloudCoverManager::getCloudLayerIdFromCloudCoverAndBaseMSL ( const std::string &  cloudCover,
float  baseMSLAltitude,
DtCloudLayerId result 
) const
virtual

Get a list of cloud layer ids whose cloud layers are at the base MSL altitude, in meters, provided and are part of the cloud cover with the provided name.

virtual bool makVrv::DtCloudCoverManager::cloudLayerEnabled ( DtCloudLayerId  layerId) const
virtual

Get the enable state of a cloud layer within it's cloud cover.

This method return false if the provided cloud layer id is not found.

virtual void makVrv::DtCloudCoverManager::addCloudCover ( const std::string &  cloudCoverName)
virtual

Cloud Cover and Cloud Layer mutators.

Add a new cloud cover.

virtual void makVrv::DtCloudCoverManager::removeCloudCover ( const std::string &  cloudCoverName)
virtual

Remove an existing cloud cover (and all its associated layers).

virtual void makVrv::DtCloudCoverManager::renameCloudCover ( const std::string &  oldName,
const std::string &  newName 
)
virtual

Rename an existing cloud cover.

virtual DtCloudLayerId makVrv::DtCloudCoverManager::addCloudLayer ( const std::string &  cloudCoverName,
const DtCloudLayer layer 
)
virtual

Add a cloud layer to the specified cloud cover.

Returns the cloud layer id if added. Returns DtCloudLayerIdUndefined if the cloud layer could not be added.

virtual DtCloudLayerId makVrv::DtCloudCoverManager::addCloudLayerByRecord ( const std::string &  cloudCoverName,
const makArchives::DtCloudLayerRecord layerRecord 
)
virtual

Add a cloud layer to the specified cloud cover, using its record.

Returns the cloud layer id if added. Returns DtCloudLayerIdUndefined if the cloud layer could not be added.

virtual bool makVrv::DtCloudCoverManager::deleteCloudLayer ( DtCloudLayerId  layerToDelete)
virtual

Delete the cloud layer specified by layerToDelete.

Returns false if the layer is not found.

virtual bool makVrv::DtCloudCoverManager::changeCloudLayer ( DtCloudLayerId  layerId,
const DtCloudLayer newLayer 
)
virtual

Change the specified layer id to match the new layer.

Returns false if the layer id is not found. This will cause the existing Silverlining layer to be replaced by a new one with the new layer's parameters. For cloud layers that need to be populated with clouds (what Silverlining calls 'seeding' such a change can cause a stall. Note that if you just want to change the position of a cloud layer, use setCloudLayerPosition instead, as this will modify the existing cloud layer instead of replacing it.

virtual bool makVrv::DtCloudCoverManager::updateCloudLayerUsingRecord ( DtCloudLayerId  layerId,
const makArchives::DtCloudLayerRecord record 
)
virtual
virtual bool makVrv::DtCloudCoverManager::setCloudLayerPositionAndOrientation ( DtCloudLayerId  layerId,
const DtVector position,
float  orientation = 0. 
)
virtual

Modify the position of an existing cloud layer.

Note that position and orientation are updated together.

virtual bool makVrv::DtCloudCoverManager::setCloudLayerEnabled ( DtCloudLayerId  layerId,
bool  enabled 
)
virtual

Set the enable state of a cloud layer within it's cloud cover.

Note that this only affects the current sky if the specified cloud layer is part of the current cloud cover. This method returns false if the provided cloud layer id is not found, true otherwise.

virtual void makVrv::DtCloudCoverManager::initialize ( )
protectedvirtual

Set up the 'External' cloud cover.

DtCloudLayerId makVrv::DtCloudCoverManager::allocateCloudLayerId ( )
protected

Return the next available cloud layer id.

virtual void makVrv::DtCloudCoverManager::createExternalCloudCover ( )
protectedvirtual

Add information about the 'External' cloud cover to the manager.

Member Data Documentation

boost::signalslib::signal<void(const std::string&)> makVrv::DtCloudCoverManager::signal_cloudCoverAdded

BOOST SIGNALS used to let clients know what has transpired in this manager.

signal_cloudCoverAdded is raised when a new cloud cover is added

boost::signalslib::signal<void(const std::string&)> makVrv::DtCloudCoverManager::signal_cloudCoverToBeRemoved

signal_cloudCoverToBeRemoved is raised just before a cloud cover is removed

boost::signalslib::signal<void(const std::string&)> makVrv::DtCloudCoverManager::signal_cloudCoverRemoved

signal_cloudCoverRemoved is raised immediately after a cloud cover is removed

boost::signalslib::signal<void(DtCloudLayerId, bool)> makVrv::DtCloudCoverManager::signal_cloudLayerEnabledChanged

signal_cloudLayerEnabledChanged is raised when the enabled state of a cloud layer within its cloud cover is enabled or disabled

boost::signalslib::signal<void(DtCloudLayerId, const DtVector&, float)> makVrv::DtCloudCoverManager::signal_cloudLayerPositionAndOrientationChanged

signal_cloudLayerPositionChanged is raised when a cloud layer's position is modified

boost::signalslib::signal<void(DtCloudLayerId layerId, const DtCloudLayer& changedLayer)> makVrv::DtCloudCoverManager::signal_cloudLayerToBeModified

signal_cloudLayerToBeModified is raised when a cloud layer is about to be changed.

The new layer state is provided, and the original can be looked up if needed from the layer id

boost::signalslib::signal<void(DtCloudLayerId layerId, const DtCloudLayer& oldLayer)> makVrv::DtCloudCoverManager::signal_cloudLayerModified

signal_cloudLayerModified is raised when a cloud layer has changed.

The old layer state is provided, and the new one can be looked up if needed from the layer id

boost::signalslib::signal<void(DtCloudLayerId newLayer, const std::string& coverName)> makVrv::DtCloudCoverManager::signal_cloudLayerAdded

signal_cloudLayerAdded is raised when a cloud layer is added to a cloud cover

boost::signalslib::signal<void(DtCloudLayerId oldLayer)> makVrv::DtCloudCoverManager::signal_cloudLayerToBeRemoved

signal_cloudLayerToBeRemoved is raised when a cloud layer is about to be removed from a cloud cover

boost::signalslib::signal<void(DtCloudLayerId oldLayer)> makVrv::DtCloudCoverManager::signal_cloudLayerRemoved

signal_cloudLayerRemoved is raise when a cloud layer is removed from a cloud cover

CloudLayerIdMap makVrv::DtCloudCoverManager::myCloudLayerIdMap
protected
CloudCoverCloudLayerIdMap makVrv::DtCloudCoverManager::myCloudCoverCloudLayerIdMap
protected
DtCloudLayerId makVrv::DtCloudCoverManager::myFreeCloudLayerId
protected
DtDe& makVrv::DtCloudCoverManager::myDe
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)