VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtOverlaySettings Class Reference

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

DtTerrainPatchpatch ()
 Get associated terrain patch. More...
 
virtual ~DtOverlaySettings ()
 DTOR. More...
 
void getRecord (makArchives::DtOverlaySettingsRecord &rec) const
 Fill out a makArchives::DtOverlaySettingsRecord with the values of this object. More...
 
void setFromRecord (const makArchives::DtOverlaySettingsRecord &rec)
 Fill out this object with the values of a makArchives::DtOverlaySettingsRecord. More...
 
std::vector< std::string > availableRasterLayers ()
 returns a list of current available raster settings. Currently only Base and Overlay More...
 
virtual void getTextureScale (double &x, double &y) const
 Returns scale of underlying terrain patch (for raster placement) More...
 
virtual void getTextureOffset (double &x, double &y) const
 Returns offset of underlying terrain patch (for raster placement) More...
 
virtual std::string addRasterLayer (const std::string &name="")
 Adds a new raster layer to the layers. More...
 
virtual bool removeRasterLayer (const std::string &name)
 Removes the specified raster layer and returns true if successful. More...
 
virtual bool renameRasterLayer (const std::string &oldName, const std::string &newName)
 Renames the specified raster layer and returns true if successful. More...
 
Raster Texture
bool rasterTextureEnabled (const std::string &raster) const
 Returns whether texture is enabled. More...
 
void setRasterTextureEnabled (const std::string &raster, bool enabled)
 Returns whether texture is enabled. More...
 
void setRasterTextureWrapMode (const std::string &raster, int enabled)
 Sets texture wrap mode. More...
 
int rasterTextureWrapMode (const std::string &raster) const
 Returns texture wrap mode. More...
 
void setRasterTextureBlendMode (const std::string &, int)
 Sets blend mode of texture. More...
 
int rasterTextureBlendMode (const std::string &raster) const
 Returns texture blend mode. More...
 
bool rasterTextureTransformIsSet (const std::string &raster) const
 Returns whether base texture is using a custom scale/offset. More...
 
void setRasterTextureTransformIsSet (const std::string &raster, bool enabled)
 Sets whether base texture is using a custom scale/offset. More...
 
std::string rasterTextureDefinition (const std::string &raster) const
 Returns model definition name of supplied texture. More...
 
void setRasterTextureDefinition (const std::string &raster, const std::string &definition)
 Sets model definition name of current base texture. More...
 
void getRasterTextureScale (const std::string &raster, double &x, double &y) const
 Returns scale of current raster texture. More...
 
void getRasterTextureOffset (const std::string &raster, double &x, double &y) const
 Returns offset of current raster texture. More...
 
void getDatabaseOrigin (double &x, double &y, double &z) const
 Returns the origin of the database in database coordinates. More...
 
void setRasterTextureScale (const std::string &raster, double x, double y)
 Sets scale of current base texture. More...
 
void setRasterTextureOffset (const std::string &raster, double x, double y)
 Sets offset of current base texture. More...
 
void clearRasterTexture (const std::string &raster, bool applyAtEnd=true)
 Clears out all raster settings. More...
 
void setBlockApplyRasterSettings (bool)
 Blocks/unblocks applying of raster textures. More...
 
bool blockApplyRasterSettings () const
 
int rasterTexturePosition (const std::string &) const
 Returns the position in the list of the supplied raster texture. More...
 
int rasterOperation (const std::string &)
 Returns the next available raster layer operation number. More...
 
bool moveRasterLayer (const std::string &, int)
 Moves the raster layer up or down the specified number of positions. Returns true if successful. More...
 
Contour Lines
bool contourEnabled () const
 Returns whether contour lines are enabled. More...
 
bool contourIntermediateLinesEnabled () const
 Returns whether intermediate contour lines are enabled. More...
 
double contourInterval () const
 Returns current contour line interval. More...
 
double contourThickness () const
 Returns current contour line thickness. More...
 
void setContourEnabled (bool enabled)
 Sets whether contour lines are enabled. More...
 
void setContourIntermediateLinesEnabled (bool enabled)
 Sets whether intermediate contour lines are enabled. More...
 
void setContourInterval (double interval)
 Sets interval between contour lines. More...
 
void setContourThickness (double thickness)
 Sets thickness of contour lines. More...
 
Elevation Color
bool elevationEnabled () const
 Returns whether elevation color is enabled. More...
 
const
makArchives::DtOverlaySettingsRecord::ControlPointList
elevationGradient () const
 Returns current elevation color gradient. More...
 
void setElevationEnabled (bool enabled)
 Sets whether elevation color is enabled. More...
 
void setElevationGradient (const makArchives::DtOverlaySettingsRecord::ControlPointList &gradient)
 Sets elevation color gradient. More...
 

Protected Member Functions

 DtOverlaySettings (DtTerrainPatch *patch=0)
 CTOR. More...
 
DtOverlaySettingsoperator= (const DtOverlaySettings &orig)
 Assignment operator Note that this does NOT change what patch is associated with the DtOverlaySettings. More...
 
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! More...
 
void applyAllSettings ()
 
void applyRasterTextureSettings (const std::string &raster)
 
void applyContourLinesOverlaySettings ()
 
void applyElevationColorOverlaySettings ()
 
void applyOriginalTextureState ()
 

Protected Attributes

DtTerrainPatchmyPatch
 
makArchives::DtOverlaySettingsRecord myOverlaySettingsRecord
 
bool myBlockRasterSettings
 

Friends

class DtTerrainPatch
 

Detailed Description

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

Constructor & Destructor Documentation

makVrv::DtOverlaySettings::DtOverlaySettings ( DtTerrainPatch patch = 0)
explicitprotected

CTOR.

virtual makVrv::DtOverlaySettings::~DtOverlaySettings ( )
virtual

DTOR.

Member Function Documentation

DtOverlaySettings& makVrv::DtOverlaySettings::operator= ( const DtOverlaySettings orig)
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()

void makVrv::DtOverlaySettings::setPatch ( DtTerrainPatch patch)
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 void makVrv::DtOverlaySettings::getTextureScale ( double x,
double y 
) const
virtual

Returns scale of underlying terrain patch (for raster placement)

virtual void makVrv::DtOverlaySettings::getTextureOffset ( double x,
double y 
) const
virtual

Returns offset of underlying terrain patch (for raster placement)

virtual std::string makVrv::DtOverlaySettings::addRasterLayer ( const std::string &  name = "")
virtual

Adds a new raster layer to the layers.

Returns a new unique name for the layer if the specified name is blank

virtual bool makVrv::DtOverlaySettings::removeRasterLayer ( const std::string &  name)
virtual

Removes the specified raster layer and returns true if successful.

virtual bool makVrv::DtOverlaySettings::renameRasterLayer ( const std::string &  oldName,
const std::string &  newName 
)
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
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.

void makVrv::DtOverlaySettings::applyAllSettings ( )
protected
void makVrv::DtOverlaySettings::applyRasterTextureSettings ( const std::string &  raster)
protected
void makVrv::DtOverlaySettings::applyContourLinesOverlaySettings ( )
protected
void makVrv::DtOverlaySettings::applyElevationColorOverlaySettings ( )
protected
void makVrv::DtOverlaySettings::applyOriginalTextureState ( )
protected

Friends And Related Function Documentation

friend class DtTerrainPatch
friend

Member Data Documentation

DtTerrainPatch* makVrv::DtOverlaySettings::myPatch
protected
makArchives::DtOverlaySettingsRecord makVrv::DtOverlaySettings::myOverlaySettingsRecord
protected
bool makVrv::DtOverlaySettings::myBlockRasterSettings
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)