VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Attributes | Protected Attributes
makVrv::DtTerrainPatchObject Class Referenceabstract

A DtTerrainPatchObject contains the methods for loading a file as a terrain. When loading a file as a terrain certain post processing steps can be taken. For example, the static trees can be extracted and replaced by dynamically generated trees.

Inheritance diagram for makVrv::DtTerrainPatchObject:
Inheritance graph
[legend]

Public Member Functions

 DtTerrainPatchObject (DtDe &de, DtUniqueID id)
 
virtual ~DtTerrainPatchObject ()
 
virtual bool isGlobalScaleTerrain () const =0
 
virtual bool getTerrainIntersection (double x, double y, double z, double vx, double vy, double vz, double &retX, double &retY, double &retZ)=0
 
virtual void clearElevationCache ()=0
 
virtual void useICO (bool enable)=0
 
virtual void setMaxPagedLODs (unsigned int maxPagedLODs)=0
 
virtual void postExtractionProcessing ()=0
 
virtual void toggleVisibility (bool visibility)=0
 
virtual void setTerrainDefinition (const std::string &modelDefinitionName)
 
const std::string & terrainDefinitionName () const
 
virtual void enableOverlay (int type, const std::string &definition)=0
 
virtual void disableOverlay (int type)=0
 
virtual void disableAllOverlays ()=0
 
virtual void setOverlayScale (int type, double x, double y)=0
 
virtual void setOverlayOffset (int type, double x, double y)=0
 
virtual void setWrapMode (int type, int clamp)=0
 
virtual void setBlendMode (int type, int clamp)=0
 
virtual void setRasterLayerPosition (int type, int pos)=0
 
virtual void setLayerEnabled (const std::string &rule, bool status)=0
 
virtual void extractNodes (const std::string &rule, bool isRegEx)=0
 
virtual void extractOceanNodes (const std::string &rule, bool isRegEx)=0
 
virtual void extractSpeedTreeNodes (const std::string &rule, bool isRegEx, const std::string &modelDefinition)=0
 
virtual void realizeExtractedSpeedTrees (const DtVectorTreeRecords &trees)=0
 
virtual void setTerrainTreeScaleRandomization (bool isRandomized)=0
 
virtual void setTerrainTreeMinScale (double minScale)=0
 
virtual void setTerrainTreeMaxScale (double maxScale)=0
 
virtual void setTerrainTreeOrientationRandomization (bool isRandomized)=0
 
virtual void setIsMinimapOnly (bool isForMinimap)=0
 
virtual bool isMinimapOnly () const =0
 
virtual void setIsPageable (bool isPageable)=0
 
virtual bool isPageable () const =0
 
virtual void setPageableCenterPosition (const DtVector &pageableCenter)=0
 
virtual DtVector pageableCenterPosition () const =0
 
virtual void setPageableRadius (double radius)=0
 
virtual double pageableRadius () const =0
 
virtual void setPageOutDistance (double pageOutDistance)=0
 
virtual double pageOutDistance () const =0
 
virtual std::string overlayDefinition (int type)=0
 
virtual std::vector< doubleoverlayScale (int type)=0
 
virtual std::vector< doubleoverlayOffset (int type)=0
 
virtual DtTerrainOverlayOperation defaultOverlay (int type)=0
 
virtual DtTerrainOverlayOperation currentOverlay (int type)=0
 
virtual void getTerrainExtents (DtVector &nw, DtVector &ne, DtVector &sw, DtVector &se) const =0
 
virtual void getBoundingBoxMinMax (DtVector &min, DtVector &max) const =0
 
virtual DtVector getDatabaseOrigin () const =0
 
virtual int countNodes (const std::string &rule) const =0
 
virtual bool getExtractedNodePosition (const std::string &rule, unsigned int index, double &x, double &y, double &z) const =0
 
virtual bool getExtractedNodeOrientation (const std::string &rule, unsigned int index, double &x, double &y, double &z, double &w) const =0
 
virtual void moveNode (DtSceneObject *object, DtModel *model, const std::string &rule, unsigned int index)=0
 
virtual DtUniqueID uniqueID () const
 

Static Public Attributes

static const double TheEarthRadius
 

Protected Attributes

DtDemyDe
 
DtUniqueID myUniqueID
 
std::string myTerrainDefinitionName
 

Constructor & Destructor Documentation

makVrv::DtTerrainPatchObject::DtTerrainPatchObject ( DtDe de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtTerrainPatchObject::~DtTerrainPatchObject ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtTerrainPatchObject::setTerrainDefinition ( const std::string &  modelDefinitionName)
virtual

The model definition will be loaded and post processing will occur.

Reimplemented in makVrv::DtOsgTerrainPatchObject.

const std::string& makVrv::DtTerrainPatchObject::terrainDefinitionName ( ) const

Accessor for the terrain definition name.

virtual void makVrv::DtTerrainPatchObject::enableOverlay ( int  type,
const std::string &  definition 
)
pure virtual

Enable a specific type of overlay.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::disableOverlay ( int  type)
pure virtual

Disable a specific type of overlay.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::disableAllOverlays ( )
pure virtual

Disable all overlays.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setOverlayScale ( int  type,
double  x,
double  y 
)
pure virtual

Set the overlay scale.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setOverlayOffset ( int  type,
double  x,
double  y 
)
pure virtual

Set the overlay offset.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setWrapMode ( int  type,
int  clamp 
)
pure virtual

Set the texture wrap mode.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setBlendMode ( int  type,
int  clamp 
)
pure virtual

Set the texture blend mode.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setRasterLayerPosition ( int  type,
int  pos 
)
pure virtual

Set raster layer position in the operations list.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setLayerEnabled ( const std::string &  rule,
bool  status 
)
pure virtual

Toggle layers on or off by rule regexp.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::extractNodes ( const std::string &  rule,
bool  isRegEx 
)
pure virtual

Move nodes via a rule.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::extractOceanNodes ( const std::string &  rule,
bool  isRegEx 
)
pure virtual

Extract ocean nodes to the static ocean root.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::extractSpeedTreeNodes ( const std::string &  rule,
bool  isRegEx,
const std::string &  modelDefinition 
)
pure virtual

Extract props as speed trees.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::realizeExtractedSpeedTrees ( const DtVectorTreeRecords trees)
pure virtual

Send Tree Records to the speed tree manager.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setTerrainTreeScaleRandomization ( bool  isRandomized)
pure virtual

Should speed tree be randomized on the terrain.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setTerrainTreeMinScale ( double  minScale)
pure virtual

Set the minimum scale for randomization of scale.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setTerrainTreeMaxScale ( double  maxScale)
pure virtual

Set the maximum scale for randomization of scale.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setTerrainTreeOrientationRandomization ( bool  isRandomized)
pure virtual

Should speed trees be randomly oriented.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setIsMinimapOnly ( bool  isForMinimap)
pure virtual

Should this patch object be placed under the special minimap modelset?

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual bool makVrv::DtTerrainPatchObject::isMinimapOnly ( ) const
pure virtual

The model definition will be loaded and post processing will occur.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setIsPageable ( bool  isPageable)
pure virtual

Should this patch object be pageable or not?

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual bool makVrv::DtTerrainPatchObject::isPageable ( ) const
pure virtual

Should this patch object be pageable or not?

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setPageableCenterPosition ( const DtVector pageableCenter)
pure virtual

The center position to use when setting up the Paged LOD for this terrain patch. This is only used if setIsPageable(true). If this is not defined when the pageable terrain patch is loaded, then the center position is calculated based on the model for the terrain patch.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual DtVector makVrv::DtTerrainPatchObject::pageableCenterPosition ( ) const
pure virtual

The center position to use when setting up the Paged LOD for this terrain patch. This is only used if setIsPageable(true). If this is not defined when the pageable terrain patch is loaded, then the center position is calculated based on the model for the terrain patch.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setPageableRadius ( double  radius)
pure virtual

The radius to use when setting up the Paged LOD for this terrain patch. This is only used if setIsPageable(true). If this is not defined when the pageable terrain patch is loaded, then the center position is calculated based on the model for the terrain patch.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual double makVrv::DtTerrainPatchObject::pageableRadius ( ) const
pure virtual

The radius to use when setting up the Paged LOD for this terrain patch. This is only used if setIsPageable(true). If this is not defined when the pageable terrain patch is loaded, then the center position is calculated based on the model for the terrain patch.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::setPageOutDistance ( double  pageOutDistance)
pure virtual

The page out distance to use when setting up the Paged LOD for this terrain patch. This is only used if setIsPageable(true). If this is not defined when the pageable terrain patch is loaded, then the page out distance is set to be three times the pageableRadius.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual double makVrv::DtTerrainPatchObject::pageOutDistance ( ) const
pure virtual

The page out distance to use when setting up the Paged LOD for this terrain patch. This is only used if setIsPageable(true). If this is not defined when the pageable terrain patch is loaded, then the page out distance is set to be three times the pageableRadius.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual std::string makVrv::DtTerrainPatchObject::overlayDefinition ( int  type)
pure virtual

Non bound methods:

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual std::vector<double> makVrv::DtTerrainPatchObject::overlayScale ( int  type)
pure virtual

Non bound methods:

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual std::vector<double> makVrv::DtTerrainPatchObject::overlayOffset ( int  type)
pure virtual

Non bound methods:

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual DtTerrainOverlayOperation makVrv::DtTerrainPatchObject::defaultOverlay ( int  type)
pure virtual

Non bound methods:

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual DtTerrainOverlayOperation makVrv::DtTerrainPatchObject::currentOverlay ( int  type)
pure virtual

Non bound methods:

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::getTerrainExtents ( DtVector nw,
DtVector ne,
DtVector sw,
DtVector se 
) const
pure virtual

Return the corners of the terrain, useful for calculating draping parameters.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::getBoundingBoxMinMax ( DtVector min,
DtVector max 
) const
pure virtual

Returns the min/max bounding points of the terrain.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual DtVector makVrv::DtTerrainPatchObject::getDatabaseOrigin ( ) const
pure virtual

Return the origin of the database in database coordinates.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual int makVrv::DtTerrainPatchObject::countNodes ( const std::string &  rule) const
pure virtual

Count nodes via a rule. This checks the current terrain contents without modifying it.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual bool makVrv::DtTerrainPatchObject::getExtractedNodePosition ( const std::string &  rule,
unsigned int  index,
double x,
double y,
double z 
) const
pure virtual

Get the extracted node position.

Return values
falseif the node is not found.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual bool makVrv::DtTerrainPatchObject::getExtractedNodeOrientation ( const std::string &  rule,
unsigned int  index,
double x,
double y,
double z,
double w 
) const
pure virtual

Get the extracted node orientation (quaternion).

Return values
falseif the node is not found.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::moveNode ( DtSceneObject object,
DtModel model,
const std::string &  rule,
unsigned int  index 
)
pure virtual

Non bound methods:

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual DtUniqueID makVrv::DtTerrainPatchObject::uniqueID ( ) const
virtual

DtUniqueID Accessor.

virtual bool makVrv::DtTerrainPatchObject::isGlobalScaleTerrain ( ) const
pure virtual

Is the terrain a global scale.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual bool makVrv::DtTerrainPatchObject::getTerrainIntersection ( double  x,
double  y,
double  z,
double  vx,
double  vy,
double  vz,
double retX,
double retY,
double retZ 
)
pure virtual

Get a terrain intersection. If no intersect found, returns false.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::clearElevationCache ( )
pure virtual

If the patch object is using an elevation cache, clear it (otherwise do nothing). Use after making a large number of successive calls, such as while extracting props from a shape file.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::useICO ( bool  enable)
pure virtual
virtual void makVrv::DtTerrainPatchObject::setMaxPagedLODs ( unsigned int  maxPagedLODs)
pure virtual
virtual void makVrv::DtTerrainPatchObject::postExtractionProcessing ( )
pure virtual

pure virtual function called when the extraction is done so that post extraction processes can be run.

Implemented in makVrv::DtOsgTerrainPatchObject.

virtual void makVrv::DtTerrainPatchObject::toggleVisibility ( bool  visibility)
pure virtual

/brief Toggle the visibility of this terrain patch object. /param visibility Whether show the terrain patch or not.

Implemented in makVrv::DtOsgTerrainPatchObject.

Member Data Documentation

const double makVrv::DtTerrainPatchObject::TheEarthRadius
static

The Radius of the earth, used to calculate if a terrain has global scale.

DtDe& makVrv::DtTerrainPatchObject::myDe
protected
DtUniqueID makVrv::DtTerrainPatchObject::myUniqueID
protected
std::string makVrv::DtTerrainPatchObject::myTerrainDefinitionName
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)