![]() |
VR-Forces 5.0.1 Developer's Guide
|
Class for setting and maintaining state for user-modifiable overlay settings All of the overlay-changing calls in the UI go through this, so that saving this class provides enough information to restore all of the overlay settings to a terrain patch.
Note that for raster layers there are only currently two possible layers, Base and Overlay. When requesting information for those layers, use those exact terms
Public Member Functions | |
| DtTerrainPatch * | patch () |
| virtual | ~DtOverlaySettings () |
| void | getRecord (makArchives::DtOverlaySettingsRecord &rec) const |
| void | setFromRecord (const makArchives::DtOverlaySettingsRecord &rec) |
| std::vector< std::string > | availableRasterLayers () |
| virtual void | getTextureScale (double &x, double &y) const |
| virtual void | getTextureOffset (double &x, double &y) const |
| virtual std::string | addRasterLayer (const std::string &name="") |
| virtual bool | removeRasterLayer (const std::string &name) |
| virtual bool | renameRasterLayer (const std::string &oldName, const std::string &newName) |
Raster Texture | |
| bool | rasterTextureEnabled (const std::string &raster) const |
| void | setRasterTextureEnabled (const std::string &raster, bool enabled) |
| void | setRasterTextureWrapMode (const std::string &raster, int enabled) |
| int | rasterTextureWrapMode (const std::string &raster) const |
| void | setRasterTextureBlendMode (const std::string &, int) |
| int | rasterTextureBlendMode (const std::string &raster) const |
| bool | rasterTextureTransformIsSet (const std::string &raster) const |
| void | setRasterTextureTransformIsSet (const std::string &raster, bool enabled) |
| std::string | rasterTextureDefinition (const std::string &raster) const |
| void | setRasterTextureDefinition (const std::string &raster, const std::string &definition) |
| void | getRasterTextureScale (const std::string &raster, double &x, double &y) const |
| void | getRasterTextureOffset (const std::string &raster, double &x, double &y) const |
| void | getDatabaseOrigin (double &x, double &y, double &z) const |
| void | setRasterTextureScale (const std::string &raster, double x, double y) |
| void | setRasterTextureOffset (const std::string &raster, double x, double y) |
| void | clearRasterTexture (const std::string &raster, bool applyAtEnd=true) |
| void | setBlockApplyRasterSettings (bool) |
| bool | blockApplyRasterSettings () const |
| int | rasterTexturePosition (const std::string &) const |
| int | rasterOperation (const std::string &) |
| bool | moveRasterLayer (const std::string &, int) |
Contour Lines | |
| bool | contourEnabled () const |
| bool | contourIntermediateLinesEnabled () const |
| double | contourInterval () const |
| double | contourThickness () const |
| void | setContourEnabled (bool enabled) |
| void | setContourIntermediateLinesEnabled (bool enabled) |
| void | setContourInterval (double interval) |
| void | setContourThickness (double thickness) |
Elevation Color | |
| bool | elevationEnabled () const |
| const makArchives::DtOverlaySettingsRecord::ControlPointList & | elevationGradient () const |
| void | setElevationEnabled (bool enabled) |
| void | setElevationGradient (const makArchives::DtOverlaySettingsRecord::ControlPointList &gradient) |
Protected Member Functions | |
| DtOverlaySettings (DtTerrainPatch *patch=0) | |
| DtOverlaySettings & | operator= (const DtOverlaySettings &orig) |
| void | setPatch (DtTerrainPatch *patch) |
| void | applyAllSettings () |
| void | applyRasterTextureSettings (const std::string &raster) |
| void | applyContourLinesOverlaySettings () |
| void | applyElevationColorOverlaySettings () |
| void | applyOriginalTextureState () |
Protected Attributes | |
| DtTerrainPatch * | myPatch |
| makArchives::DtOverlaySettingsRecord | myOverlaySettingsRecord |
| bool | myBlockRasterSettings |
Friends | |
| class | DtTerrainPatch |
|
explicitprotected |
CTOR.
|
virtual |
DTOR.
|
protected |
Assignment operator Note that this does NOT change what patch is associated with the DtOverlaySettings. It only assigns all of the configuration from the source overlay settings. To set the patch afterwards, use setPatch()
|
protected |
Set associated terrain patch and apply current overlay settings to it This should only be called by the associated terrain patch to avoid situations where the patch doesn't know about it!
| DtTerrainPatch* makVrv::DtOverlaySettings::patch | ( | ) |
Get associated terrain patch.
| void makVrv::DtOverlaySettings::getRecord | ( | makArchives::DtOverlaySettingsRecord & | rec | ) | const |
Fill out a makArchives::DtOverlaySettingsRecord with the values of this object.
| void makVrv::DtOverlaySettings::setFromRecord | ( | const makArchives::DtOverlaySettingsRecord & | rec | ) |
Fill out this object with the values of a makArchives::DtOverlaySettingsRecord.
| std::vector<std::string> makVrv::DtOverlaySettings::availableRasterLayers | ( | ) |
returns a list of current available raster settings. Currently only Base and Overlay
Returns scale of underlying terrain patch (for raster placement)
Returns offset of underlying terrain patch (for raster placement)
|
virtual |
Adds a new raster layer to the layers. Returns a new unique name for the layer if the specified name is blank.
|
virtual |
Removes the specified raster layer and returns true if successful.
|
virtual |
Renames the specified raster layer and returns true if successful.
| bool makVrv::DtOverlaySettings::rasterTextureEnabled | ( | const std::string & | raster | ) | const |
Returns whether texture is enabled.
| void makVrv::DtOverlaySettings::setRasterTextureEnabled | ( | const std::string & | raster, |
| bool | enabled | ||
| ) |
Returns whether texture is enabled.
| void makVrv::DtOverlaySettings::setRasterTextureWrapMode | ( | const std::string & | raster, |
| int | enabled | ||
| ) |
Sets texture wrap mode.
| int makVrv::DtOverlaySettings::rasterTextureWrapMode | ( | const std::string & | raster | ) | const |
Returns texture wrap mode.
| void makVrv::DtOverlaySettings::setRasterTextureBlendMode | ( | const std::string & | , |
| int | |||
| ) |
Sets blend mode of texture.
| int makVrv::DtOverlaySettings::rasterTextureBlendMode | ( | const std::string & | raster | ) | const |
Returns texture blend mode.
| bool makVrv::DtOverlaySettings::rasterTextureTransformIsSet | ( | const std::string & | raster | ) | const |
Returns whether base texture is using a custom scale/offset.
| void makVrv::DtOverlaySettings::setRasterTextureTransformIsSet | ( | const std::string & | raster, |
| bool | enabled | ||
| ) |
Sets whether base texture is using a custom scale/offset.
| std::string makVrv::DtOverlaySettings::rasterTextureDefinition | ( | const std::string & | raster | ) | const |
Returns model definition name of supplied texture.
| void makVrv::DtOverlaySettings::setRasterTextureDefinition | ( | const std::string & | raster, |
| const std::string & | definition | ||
| ) |
Sets model definition name of current base texture.
| void makVrv::DtOverlaySettings::getRasterTextureScale | ( | const std::string & | raster, |
| double & | x, | ||
| double & | y | ||
| ) | const |
Returns scale of current raster texture.
| void makVrv::DtOverlaySettings::getRasterTextureOffset | ( | const std::string & | raster, |
| double & | x, | ||
| double & | y | ||
| ) | const |
Returns offset of current raster texture.
Returns the origin of the database in database coordinates.
| void makVrv::DtOverlaySettings::setRasterTextureScale | ( | const std::string & | raster, |
| double | x, | ||
| double | y | ||
| ) |
Sets scale of current base texture.
| void makVrv::DtOverlaySettings::setRasterTextureOffset | ( | const std::string & | raster, |
| double | x, | ||
| double | y | ||
| ) |
Sets offset of current base texture.
| void makVrv::DtOverlaySettings::clearRasterTexture | ( | const std::string & | raster, |
| bool | applyAtEnd = true |
||
| ) |
Clears out all raster settings. Sets flag to not apply changes. Will apply changes after all items are set. If applyAtEnd is true will apply all settings for supplied raster layer.
| void makVrv::DtOverlaySettings::setBlockApplyRasterSettings | ( | bool | ) |
Blocks/unblocks applying of raster textures.
| bool makVrv::DtOverlaySettings::blockApplyRasterSettings | ( | ) | const |
Returns whether texture is enabled.
| int makVrv::DtOverlaySettings::rasterTexturePosition | ( | const std::string & | ) | const |
Returns the position in the list of the supplied raster texture.
| int makVrv::DtOverlaySettings::rasterOperation | ( | const std::string & | ) |
Returns the next available raster layer operation number.
Moves the raster layer up or down the specified number of positions. Returns true if successful.
| bool makVrv::DtOverlaySettings::contourEnabled | ( | ) | const |
Returns whether contour lines are enabled.
| bool makVrv::DtOverlaySettings::contourIntermediateLinesEnabled | ( | ) | const |
Returns whether intermediate contour lines are enabled.
| double makVrv::DtOverlaySettings::contourInterval | ( | ) | const |
Returns current contour line interval.
| double makVrv::DtOverlaySettings::contourThickness | ( | ) | const |
Returns current contour line thickness.
| void makVrv::DtOverlaySettings::setContourEnabled | ( | bool | enabled | ) |
Sets whether contour lines are enabled.
| void makVrv::DtOverlaySettings::setContourIntermediateLinesEnabled | ( | bool | enabled | ) |
Sets whether intermediate contour lines are enabled.
| void makVrv::DtOverlaySettings::setContourInterval | ( | double | interval | ) |
Sets interval between contour lines.
| void makVrv::DtOverlaySettings::setContourThickness | ( | double | thickness | ) |
Sets thickness of contour lines.
| bool makVrv::DtOverlaySettings::elevationEnabled | ( | ) | const |
Returns whether elevation color is enabled.
| const makArchives::DtOverlaySettingsRecord::ControlPointList& makVrv::DtOverlaySettings::elevationGradient | ( | ) | const |
Returns current elevation color gradient.
| void makVrv::DtOverlaySettings::setElevationEnabled | ( | bool | enabled | ) |
Sets whether elevation color is enabled.
| void makVrv::DtOverlaySettings::setElevationGradient | ( | const makArchives::DtOverlaySettingsRecord::ControlPointList & | gradient | ) |
Sets elevation color gradient.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
friend |
|
protected |
|
protected |
|
protected |