![]() |
VR-Forces Developer's Guide
|
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:

Classes | |
| class | TerrainPatchFile |
Public Member Functions | |
| virtual void | addFilePaths (const std::vector< std::string > &filePaths) |
| virtual bool | terrainPatchAddStatus (const std::string &filePath, AddTerrainPatchStatus &status) const |
| virtual void | removeFilePaths (const std::vector< std::string > &filePaths) |
| virtual void | removeAllFilePaths () |
| virtual std::vector< std::string > | filePathsToAdd () const |
| virtual void | setDdsFlip (const std::string &filePath, bool ddsFlip) |
| virtual void | setAlphaToCoverage (const std::string &filePath, AlphaToCoverageState a2cState) |
| virtual void | setIndirectEnabled (const std::string &filePath, bool enabled) |
| virtual void | setIsPageable (const std::string &filePath, bool isPageable) |
| virtual void | addTerrainPatches () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtAddTerrainPatchManager & | instance (DtDe &de) |
| static void | registerInstance (DtDe &de, DtAddTerrainPatchManager *instance) |
| static DtAddTerrainPatchManager::TerrainCoordinateSystemEnum | coordSysStrToEnum (const std::string &coordSys) |
| static DtUnicode | statusDisplayText (AddTerrainPatchStatus addStatus) |
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, bool isPageable) > | signal_isPageableUpdated |
| 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) | |
| virtual bool | isOsgEarthTerrain (const std::string &fileName) |
| virtual bool | processTerrainPatchHeader (const std::string &filePath, AddTerrainPatchStatus &msg) |
| virtual void | slot_terrainPatchCreated (DtTerrainPatchObject &terrainPatchObject) |
| virtual void | slot_terrainPatchAboutToBeDeleted (DtTerrainPatchObject &terrainPatchObject) |
| virtual void | enforceOnlyOneOsgEarthTerrainPatchConstraint () |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | myConnections |
| bool | myOsgEarthTerrainPatchToBeAdded |
| bool | myTerrainHasOsgEarthTerrainPatch |
| std::map< std::string, TerrainPatchFile > | myFilesToAdd |
|
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 |
Set whether or not the terrain patch to be loaded with the passed in file path is pageable or not. 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, bool isPageable) > makVrv::DtAddTerrainPatchManager::signal_isPageableUpdated |
| 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 |