![]() |
VR-Forces 5.0.2 Developer's Guide
|
Defines the manager class that manages the different cloud cover configurations being used by VR-Vantage. The manager automatically creates two specialized cloud covers to be used by the VR-Vantage application to implement some out-of-the-box functionality.
The first specialized cloud cover is used for visualizing the clouds that are configured for local 'weather areas' that are published by VR-Forces. The name for this cloud cover is "External"
The second specialized cloud cover is used for visualizing the clouds that belong to the 'remote environment'. The 'remote environment' is used whenever the 'Listen to Remote Environment Settings' setting is enabled. The name for this cloud cover is provided by DtEnvironmentInterface::theRemoteEnvironmentName.
The two specialized cloud covers are initialized to have no cloud layers and their 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.

Classes | |
| struct | CloudCoverData |
| struct | LayerIdData |
Public Types | |
| typedef std::vector < DtCloudLayerId > | CloudLayerIdList |
| typedef std::map< std::string, CloudCoverData > | CloudCoverCloudLayerIdMap |
Public Member Functions | |
| virtual | ~DtCloudCoverManager () |
| const CloudCoverCloudLayerIdMap & | cloudCoverMap () const |
| bool | isValidCloudCover (const std::string &cloudCover) const |
| const CloudLayerIdList & | cloudLayerList (const std::string &cloudCover) const |
| bool | isValidCloudLayer (DtCloudLayerId layerId) const |
| virtual std::string | cloudCoverForLayer (DtCloudLayerId layerId) const |
| virtual const DtCloudLayer & | cloudLayer (DtCloudLayerId layerId) const |
| virtual DtCloudLayer & | cloudLayer (DtCloudLayerId layerId) |
| virtual bool | getCloudLayerIdFromCloudCoverAndBaseMSL (const std::string &cloudCover, float baseMSLAltitude, DtCloudLayerId &result) const |
| virtual bool | cloudLayerEnabled (DtCloudLayerId layerId) const |
| virtual void | addCloudCover (const std::string &cloudCoverName) |
| virtual void | removeCloudCover (const std::string &cloudCoverName) |
| virtual void | renameCloudCover (const std::string &oldName, const std::string &newName) |
| virtual DtCloudLayerId | addCloudLayer (const std::string &cloudCoverName, const DtCloudLayer &layer) |
| virtual DtCloudLayerId | addCloudLayerByRecord (const std::string &cloudCoverName, const makArchives::DtCloudLayerRecord &layerRecord) |
| virtual bool | deleteCloudLayer (DtCloudLayerId layerToDelete) |
| virtual bool | changeCloudLayer (DtCloudLayerId layerId, const DtCloudLayer &newLayer) |
| virtual bool | updateCloudLayerUsingRecord (DtCloudLayerId layerId, const makArchives::DtCloudLayerRecord &record) |
| virtual bool | setCloudLayerPositionAndOrientation (DtCloudLayerId layerId, const DtVector &position, float orientation=0.) |
| virtual bool | setCloudLayerEnabled (DtCloudLayerId layerId, bool enabled) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtCloudCoverManager & | instance (DtDe &de) |
Public Attributes | |
| boost::signalslib::signal < void(const std::string &)> | signal_cloudCoverAdded |
| boost::signalslib::signal < void(const std::string &)> | signal_cloudCoverToBeRemoved |
| boost::signalslib::signal < void(const std::string &)> | signal_cloudCoverRemoved |
| boost::signalslib::signal < void(DtCloudLayerId, bool)> | signal_cloudLayerEnabledChanged |
| boost::signalslib::signal < void(DtCloudLayerId, const DtVector &, float)> | signal_cloudLayerPositionAndOrientationChanged |
| boost::signalslib::signal < void(DtCloudLayerId layerId, const DtCloudLayer &changedLayer)> | signal_cloudLayerToBeModified |
| boost::signalslib::signal < void(DtCloudLayerId layerId, const DtCloudLayer &oldLayer)> | signal_cloudLayerModified |
| boost::signalslib::signal < void(DtCloudLayerId newLayer, const std::string &coverName)> | signal_cloudLayerAdded |
| boost::signalslib::signal < void(DtCloudLayerId oldLayer)> | signal_cloudLayerToBeRemoved |
| boost::signalslib::signal < void(DtCloudLayerId oldLayer)> | signal_cloudLayerRemoved |
Protected Types | |
| typedef std::unordered_map < DtCloudLayerId, LayerIdData > | CloudLayerIdMap |
Protected Member Functions | |
| DtCloudCoverManager (makVrv::DtDe &) | |
| virtual void | initialize () |
| DtCloudLayerId | allocateCloudLayerId () |
| virtual void | createExternalCloudCover () |
Protected Attributes | |
| CloudLayerIdMap | myCloudLayerIdMap |
| CloudCoverCloudLayerIdMap | myCloudCoverCloudLayerIdMap |
| DtCloudLayerId | myFreeCloudLayerId |
| DtDe & | myDe |
| 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 |
Cloud Cover and Cloud Layer mutators.
Add a new cloud cover.
|
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 |