![]() |
VR-Forces 4.10 Class Documentation
|
The add terrain patch manager is used to add one or more terrain patches to the current terrain. More...

Classes | |
| class | TerrainPatchFile |
| A class that maintains the terrain patch records and add status for a terrain patch file. More... | |
Public Types | |
| enum | AlphaToCoverageState { AlphaToCoverageState::USE_GLOBAL, AlphaToCoverageState::FORCE_OFF, AlphaToCoverageState::FORCE_ON } |
| The possible states of alpha to coverage for a terrain patch. More... | |
| enum | TerrainCoordinateSystemEnum { TerrainCoordinateSystemEnum::None, TerrainCoordinateSystemEnum::Geocentric, TerrainCoordinateSystemEnum::UTM, TerrainCoordinateSystemEnum::Lambert, TerrainCoordinateSystemEnum::FlatEarth, TerrainCoordinateSystemEnum::Cartesian } |
| An enumeration for the possible coordinate systems for the terrain. More... | |
| enum | AddTerrainPatchStatus { AddTerrainPatchStatus::NoError, AddTerrainPatchStatus::LimitedSupportFileType, AddTerrainPatchStatus::UnsupportedFileType, AddTerrainPatchStatus::ProcessHeaderFailed, AddTerrainPatchStatus::MoreThanOneOsgEarthTerrainPatch } |
| An enumeration for the possible statuses a terrain patch can have when being added. More... | |
Public Member Functions | |
| virtual void | addFilePaths (const std::vector< std::string > &filePaths) |
| Add the passed in file paths to the working list of terrain patches to add to the terrain. More... | |
| virtual bool | terrainPatchAddStatus (const std::string filePath, AddTerrainPatchStatus &status) const |
| Get the add status of a file path, by reference, from the working list of terrain patches to add to the terrain. More... | |
| virtual void | removeFilePaths (const std::vector< std::string > &filePaths) |
| Remove the passed in file paths from the working list of terrain patches to add to the terrain. More... | |
| virtual void | removeAllFilePaths () |
| Clear the working list of terrain patches to add to the terrain. More... | |
| virtual std::vector< std::string > | filePathsToAdd () const |
| Returns a vector of the current working list of file path strings to add. More... | |
| virtual void | setDdsFlip (const std::string &filePath, bool ddsFlip) |
| Set whether or not to flip any DDS textures that are present for the one or more terrain patches to be loaded with the passed in file path. More... | |
| virtual void | setAlphaToCoverage (const std::string &filePath, AlphaToCoverageState a2cState) |
| Set the alpha to coverage state to use for the one or more terrain patches to be loaded with the passed in file path. More... | |
| virtual void | setIndirectEnabled (const std::string &filePath, bool enabled) |
| Set whether or not to enable indirect rendering for the one or more terrain patches to be loaded with the passed in file path. More... | |
| virtual void | addTerrainPatches () |
| Adds the working list of terrain patches to add to the terrain. 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 DtAddTerrainPatchManager & | instance (DtDe &de) |
| Returns a reference to the DtAddTerrainPatchManager instance. More... | |
| static void | registerInstance (DtDe &de, DtAddTerrainPatchManager *instance) |
| Register a new dockable manager instance and replace the default. More... | |
| static DtAddTerrainPatchManager::TerrainCoordinateSystemEnum | coordSysStrToEnum (const std::string &coordSys) |
| Helper method for getting the enum for a coordinate system string. More... | |
| static DtUnicode | statusDisplayText (AddTerrainPatchStatus addStatus) |
| Return a readable string of the passed in status enumeration value. More... | |
Public Attributes | |
| boost::signalslib::signal < void(std::map< std::string, TerrainPatchFile > filesToAdd)> | signal_terrainPatchesToAddUpdated |
| boost::signalslib::signal < void(const std::string &filePath, bool flipDds)> | signal_ddsFlipEnabledUpdated |
| boost::signalslib::signal < void(const std::string &filePath, bool indirectEnabled)> | signal_indirectRenderingEnabledUpdated |
| boost::signalslib::signal < void(const std::string &filePath, AlphaToCoverageState a2cState)> | signal_alphaToCoverageStateUpdated |
| boost::signalslib::signal < void(const std::string &coordSysType, const std::string &coordSysParams)> | signal_coordinateSystemUpdated |
Protected Member Functions | |
| DtAddTerrainPatchManager (DtDe &de) | |
| CTOR. More... | |
| virtual bool | isOsgEarthTerrain (const std::string &fileName) |
| Determine if a terrain file is an osg earth terrain. More... | |
| virtual bool | processTerrainPatchHeader (const std::string &filePath, AddTerrainPatchStatus &msg) |
| Parse the header for the provided file by looking for a corresponding registered DtHeaderParser, based on extension. More... | |
| virtual void | slot_terrainPatchCreated (DtTerrainPatchObject &terrainPatchObject) |
| Used to determine if a osgEarth terrain patch has been added to the terrain and updates the internal myTerrainHasOsgEarthTerrainPatch flag. More... | |
| virtual void | slot_terrainPatchAboutToBeDeleted (DtTerrainPatchObject &terrainPatchObject) |
| Used to determine if a osgEarth terrain patch has been removed from the terrain and updates the internal myTerrainHasOsgEarthTerrainPatch flag. More... | |
| virtual void | enforceOnlyOneOsgEarthTerrainPatchConstraint () |
| Updates the AddTerrainPatchStatus of the entire working list of terrain patches to add to the terrain to enforce the following constraint: More... | |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | myConnections |
| bool | myOsgEarthTerrainPatchToBeAdded |
| bool | myTerrainHasOsgEarthTerrainPatch |
| std::map< std::string, TerrainPatchFile > | myFilesToAdd |
The add terrain patch manager is used to add one or more terrain patches to the current terrain.
The manager is used by the add terrain patch dialog and the terrain editor to add one or more terrain patches while ensuring:
|
protected |
CTOR.
|
virtual |
Add the passed in file paths to the working list of terrain patches to add to the terrain.
Depending on the format, each file can specify one or more terrain patches and the file is processed to determine whether or not it is valid and if the format is supported or not.
|
virtual |
Get the add status of a file path, by reference, from the working list of terrain patches to add to the terrain.
This function returns false if the passed in filePath is not in the working list of terrain patches to add to the terrain and leaves the status parameter unchanged. Otherwise, this function returns true and updates the status parameter with the add status of the passed in filePath.
|
virtual |
Remove the passed in file paths from the working list of terrain patches to add to the terrain.
|
virtual |
Clear the working list of terrain patches to add to the terrain.
|
virtual |
Returns a vector of the current working list of file path strings to add.
|
virtual |
Set whether or not to flip any DDS textures that are present for the one or more terrain patches to be loaded with the passed in file path.
This function does nothing if the passed in file path does not exist in the current working list of file paths to process or if the file path cannot be processed.
|
virtual |
Set the alpha to coverage state to use for the one or more terrain patches to be loaded with the passed in file path.
This function does nothing if the passed in file path does not exist in the current working list of file paths to process or if the file path cannot be processed.
|
virtual |
Set whether or not to enable indirect rendering for the one or more terrain patches to be loaded with the passed in file path.
This function does nothing if the passed in file path does not exist in the current working list of file paths to process or if the file path cannot be processed.
|
virtual |
Adds the working list of terrain patches to add to the terrain.
This function clears the working list of terrain patches after they have been added. This function does not add terrain patches that were not processed successfully.
|
static |
Returns a reference to the DtAddTerrainPatchManager instance.
|
static |
Register a new dockable manager instance and replace the default.
|
static |
Helper method for getting the enum for a coordinate system string.
|
static |
Return a readable string of the passed in status enumeration value.
|
protectedvirtual |
Determine if a terrain file is an osg earth terrain.
|
protectedvirtual |
Parse the header for the provided file by looking for a corresponding registered DtHeaderParser, based on extension.
The parser is used to retrieve the terrain patches to add for that file and for retrieving terrain specific settings, if any. The terrain specific settings include the coordinate system to use and the offset for the coordinate system's origin. If a corresponding parser is not registered with the DtHeaderParserFactory, the terrain patch will be loaded with default values. The function returns the status of adding a file path as one or more terrain patches via the msg reference parameter.
|
protectedvirtual |
Used to determine if a osgEarth terrain patch has been added to the terrain and updates the internal myTerrainHasOsgEarthTerrainPatch flag.
|
protectedvirtual |
Used to determine if a osgEarth terrain patch has been removed from the terrain and updates the internal myTerrainHasOsgEarthTerrainPatch flag.
|
protectedvirtual |
Updates the AddTerrainPatchStatus of the entire working list of terrain patches to add to the terrain to enforce the following constraint:
| boost::signalslib::signal<void(std::map<std::string, TerrainPatchFile> filesToAdd)> makVrv::DtAddTerrainPatchManager::signal_terrainPatchesToAddUpdated |
| boost::signalslib::signal<void(const std::string& filePath, bool flipDds)> makVrv::DtAddTerrainPatchManager::signal_ddsFlipEnabledUpdated |
| boost::signalslib::signal<void(const std::string& filePath, bool indirectEnabled)> makVrv::DtAddTerrainPatchManager::signal_indirectRenderingEnabledUpdated |
| boost::signalslib::signal<void(const std::string& filePath, AlphaToCoverageState a2cState)> makVrv::DtAddTerrainPatchManager::signal_alphaToCoverageStateUpdated |
| boost::signalslib::signal<void(const std::string& coordSysType, const std::string& coordSysParams)> makVrv::DtAddTerrainPatchManager::signal_coordinateSystemUpdated |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |