![]() |
VR-Forces 4.10 Class Documentation
|
Defines the manager class that manages the different cloud cover configurations being used by VR-Vantage. More...

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 CloudCoverCloudLayerIdMap & | cloudCoverMap () 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 CloudLayerIdList & | cloudLayerList (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 DtCloudLayer & | cloudLayer (DtCloudLayerId layerId) const |
| Get the cloud layer for the specified layer id - const version. More... | |
| virtual DtCloudLayer & | cloudLayer (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 DtCloudCoverManager & | instance (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 |
| DtDe & | myDe |
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.
| typedef std::vector<DtCloudLayerId> makVrv::DtCloudCoverManager::CloudLayerIdList |
A simple list of cloud layer ids.
Each cloud layer added through the API is assigned a unique cloud layer id
| typedef std::map<std::string, CloudCoverData> makVrv::DtCloudCoverManager::CloudCoverCloudLayerIdMap |
This map is updated as cloud layers are added or removed.
|
protected |
This map is created when a data file is read and updated if cloud layers are added or removed.
|
virtual |
|
protected |
CTOR.
|
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 |
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 |
Get the cloud layer for the specified layer id - const version.
This method throws DtInvalidInput if the layer does not exist.
|
virtual |
Get the cloud layer for the specified layer id.
This method throws DtInvalidInput if the layer does not exist.
|
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 |
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 |
Cloud Cover and Cloud Layer mutators.
Add a new cloud cover.
|
virtual |
Remove an existing cloud cover (and all its associated layers).
|
virtual |
Rename an existing cloud cover.
|
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 |
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 |
Delete the cloud layer specified by layerToDelete.
Returns false if the layer is not found.
|
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 |
|
virtual |
Modify the position of an existing cloud layer.
Note that position and orientation are updated together.
|
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.
|
protectedvirtual |
Set up the 'External' cloud cover.
|
protected |
Return the next available cloud layer id.
|
protectedvirtual |
Add information about the 'External' cloud cover to the manager.
| 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
|
protected |
|
protected |
|
protected |
|
protected |