![]() |
VR-Forces 4.1 Class Documentation
|
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. More...
Public Member Functions | |
| DtTerrainPatch * | patch () |
| Get associated terrain patch. | |
| ~DtOverlaySettings () | |
| DTOR. | |
| void | getRecord (makArchives::DtOverlaySettingsRecord &rec) const |
| Fill out a makArchives::DtOverlaySettingsRecord with the values of this object. | |
| void | setFromRecord (const makArchives::DtOverlaySettingsRecord &rec) |
| Fill out this object with the values of a makArchives::DtOverlaySettingsRecord. | |
| std::vector< std::string > | availableRasterLayers () |
| returns a list of current available raster settings. Currently only Base and Overlay | |
| virtual void | getTextureScale (double &x, double &y) const |
| Returns scale of underlying terrain patch (for raster placement) | |
| virtual void | getTextureOffset (double &x, double &y) const |
| Returns offset of underlying terrain patch (for raster placement) | |
| virtual std::string | addRasterLayer (const std::string &name="") |
| Adds a new raster layer to the layers. | |
| virtual bool | removeRasterLayer (const std::string &name) |
| Removes the specified raster layer and returns true if successful. | |
| virtual bool | renameRasterLayer (const std::string &oldName, const std::string &newName) |
| Renames the specified raster layer and returns true if successful. | |
Raster Texture | |
| bool | rasterTextureEnabled (const std::string &raster) const |
| Returns whether texture is enabled. | |
| void | setRasterTextureEnabled (const std::string &raster, bool enabled) |
| Returns whether texture is enabled. | |
| void | setRasterTextureWrapMode (const std::string &raster, int enabled) |
| Sets texture wrap mode. | |
| int | rasterTextureWrapMode (const std::string &raster) const |
| Returns texture wrap mode. | |
| void | setRasterTextureBlendMode (const std::string &, int) |
| Sets blend mode of texture. | |
| int | rasterTextureBlendMode (const std::string &raster) const |
| Returns texture blend mode. | |
| bool | rasterTextureTransformIsSet (const std::string &raster) const |
| Returns whether base texture is using a custom scale/offset. | |
| void | setRasterTextureTransformIsSet (const std::string &raster, bool enabled) |
| Sets whether base texture is using a custom scale/offset. | |
| std::string | rasterTextureDefinition (const std::string &raster) const |
| Returns model definition name of supplied texture. | |
| void | setRasterTextureDefinition (const std::string &raster, const std::string &definition) |
| Sets model definition name of current base texture. | |
| void | getRasterTextureScale (const std::string &raster, double &x, double &y) const |
| Returns scale of current raster texture. | |
| void | getRasterTextureOffset (const std::string &raster, double &x, double &y) const |
| Returns offset of current raster texture. | |
| void | getDatabaseOrigin (double &x, double &y, double &z) const |
| Returns the origin of the database in database coordinates. | |
| void | setRasterTextureScale (const std::string &raster, double x, double y) |
| Sets scale of current base texture. | |
| void | setRasterTextureOffset (const std::string &raster, double x, double y) |
| Sets offset of current base texture. | |
| void | clearRasterTexture (const std::string &raster, bool applyAtEnd=true) |
| Clears out all raster settings. | |
| void | setBlockApplyRasterSettings (bool) |
| Blocks/unblocks applying of raster textures. | |
| bool | blockApplyRasterSettings () const |
| Returns whether texture is enabled. | |
| int | rasterTexturePosition (const std::string &) const |
| Returns the position in the list of the supplied raster texture. | |
| int | rasterOperation (const std::string &) |
| Returns the next available raster layer operation number. | |
| bool | moveRasterLayer (const std::string &, int) |
| Moves the raster layer up or down the specified number of positions. Returns true if successful. | |
Contour Lines | |
| bool | contourEnabled () const |
| Returns whether contour lines are enabled. | |
| bool | contourIntermediateLinesEnabled () const |
| Returns whether intermediate contour lines are enabled. | |
| double | contourInterval () const |
| Returns current contour line interval. | |
| double | contourThickness () const |
| Returns current contour line thickness. | |
| void | setContourEnabled (bool enabled) |
| Sets whether contour lines are enabled. | |
| void | setContourIntermediateLinesEnabled (bool enabled) |
| Sets whether intermediate contour lines are enabled. | |
| void | setContourInterval (double interval) |
| Sets interval between contour lines. | |
| void | setContourThickness (double thickness) |
| Sets thickness of contour lines. | |
Elevation Color | |
| bool | elevationEnabled () const |
| Returns whether elevation color is enabled. | |
| const makArchives::DtOverlaySettingsRecord::ControlPointList & | elevationGradient () const |
| Returns current elevation color gradient. | |
| void | setElevationEnabled (bool enabled) |
| Sets whether elevation color is enabled. | |
| void | setElevationGradient (const makArchives::DtOverlaySettingsRecord::ControlPointList &gradient) |
| Sets elevation color gradient. | |
Protected Member Functions | |
| DtOverlaySettings (DtTerrainPatch *patch=0) | |
| CTOR. | |
| DtOverlaySettings & | operator= (const DtOverlaySettings &orig) |
| Assignment operator Note that this does NOT change what patch is associated with the DtOverlaySettings. | |
| void | setPatch (DtTerrainPatch *patch) |
| 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! | |
| void | applyAllSettings () |
| void | applyRasterTextureSettings (const std::string &raster) |
| void | applyContourLinesOverlaySettings () |
| void | applyElevationColorOverlaySettings () |
Protected Attributes | |
| DtTerrainPatch * | myPatch |
| makArchives::DtOverlaySettingsRecord | myOverlaySettingsRecord |
| bool | myBlockRasterSettings |
Friends | |
| class | DtTerrainPatch |
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
|
explicitprotected |
CTOR.
| makVrv::DtOverlaySettings::~DtOverlaySettings | ( | ) |
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
|
virtual |
Returns scale of underlying terrain patch (for raster placement)
|
virtual |
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.
| void makVrv::DtOverlaySettings::getDatabaseOrigin | ( | double & | x, |
| double & | y, | ||
| double & | z | ||
| ) | const |
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.
| bool makVrv::DtOverlaySettings::moveRasterLayer | ( | const std::string & | , |
| int | |||
| ) |
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 |
|
friend |
|
protected |
|
protected |
|
protected |