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

A DtOsgTerrainPatchObject 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::DtOsgTerrainPatchObject:
Inheritance graph
[legend]

Classes

struct  ExtractSpeedTreeOp
 

Public Types

enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 

Public Member Functions

 DtOsgTerrainPatchObject (DtDe &de, DtUniqueID elementId)
 
virtual ~DtOsgTerrainPatchObject ()
 
virtual void setTerrainDefinition (const std::string &modelDefinitionName)
 
virtual void slot_atcGlobalTerrainEnableChanged ()
 
virtual void slot_terrainInstancesReadyToRender (const DtPagedTilesIndirectManager &pagedTilesIndirectManager)
 
virtual void enableOverlay (int type, const std::string &definition)
 
virtual void disableOverlay (int type)
 
virtual void disableAllOverlays ()
 
virtual void setOverlayScale (int type, double x, double y)
 
virtual void setWrapMode (int type, int)
 
virtual void setBlendMode (int type, int)
 
virtual void setOverlayOffset (int type, double x, double y)
 
virtual void setLayerEnabled (const std::string &rule, bool status)
 
virtual void setRasterLayerPosition (int type, int pos)
 
virtual std::string overlayDefinition (int type)
 
virtual std::vector< doubleoverlayScale (int type)
 
virtual std::vector< doubleoverlayOffset (int type)
 
virtual DtTerrainOverlayOperation defaultOverlay (int type)
 
virtual DtTerrainOverlayOperation currentOverlay (int type)
 
virtual void getBoundingBoxMinMax (DtVector &min, DtVector &max) const
 
virtual void getTerrainExtents (DtVector &nw, DtVector &ne, DtVector &sw, DtVector &se) const
 
virtual DtVector getDatabaseOrigin () const
 
virtual void getBoundingBoxCenter (float &x, float &y, float &z) const
 
osg::Group * terrainGroupNode ()
 
virtual void extractNodes (const std::string &ruleset, bool isRegEx) override
 
virtual void extractOceanNodes (const std::string &ruleset, bool isRegEx) override
 
virtual void extractSpeedTreeNodes (const std::string &rule, bool isRegEx, const std::string &modelDefinition) override
 
virtual void realizeExtractedSpeedTrees (const DtVectorTreeRecords &trees)
 
virtual bool haveExtractedOcean () const
 
virtual bool canExtractOceanInIndirect (void) const
 
virtual int countNodes (const std::string &rule) const
 
virtual bool getExtractedNodePosition (const std::string &rule, unsigned int index, double &x, double &y, double &z) const
 
virtual bool getExtractedNodeOrientation (const std::string &rule, unsigned int index, double &x, double &y, double &z, double &w) const
 
virtual void moveNode (DtSceneObject *object, DtModel *model, const std::string &rule, unsigned int index)
 
virtual osg::Node * findNode (const std::string &rule, unsigned int index)
 
virtual bool isGlobalScaleTerrain () const
 
virtual bool getTerrainIntersection (double x, double y, double z, double vx, double vy, double vz, double &retX, double &retY, double &retZ)
 
virtual void clearElevationCache ()
 
bool isOsgEarth () const
 
osgEarth::MapNode * mapNode ()
 
const osgEarth::MapNode * mapNode () const
 
void installOsgEarthFeatureDataCallback (const std::string &featureName, DtOsgEarthFeatureDataBroker::Callback *callback)
 
virtual const
DtTextureVisitor::TextureMap
foundTextures () const
 
virtual void setOsgEarthMaterialValues (float ambient, float diffuse, float specular, float shininess)
 
virtual void getOsgEarthMaterialValues (float &ambient, float &diffuse, float &specular, float &shininess)
 
DtMetaFileManager::LinkageValueVecterrainPatchMetaFileFeatures ()
 
std::vector
< DtVirtualBaseClass * > & 
terrainAttachments ()
 
virtual void setTerrainTreeScaleRandomization (bool isRandomized)
 
virtual bool isTerrainTreeScaleRandomizationEnabled () const
 
virtual void setTerrainTreeMinScale (double minScale)
 
virtual double terrainTreeMinScale () const
 
virtual void setTerrainTreeMaxScale (double maxScale)
 
virtual double terrainTreeMaxScale () const
 
virtual void setTerrainTreeOrientationRandomization (bool isRandomized)
 
virtual bool isTerrainTreeOrientationRandomizationEnabled () const
 
bool isDestructing ()
 
virtual void useICO (bool enable)
 
virtual void setMaxPagedLODs (unsigned int maxPagedLODs)
 
virtual void updateMaxPagedLODs ()
 
virtual void slot_channelCreated ()
 
virtual void slot_windowCreated ()
 
virtual void slot_channelToBeDestroyed ()
 
virtual bool alphaToCoverageEnabled ()
 
virtual void postExtractionProcessing ()
 
virtual bool indirectEnabled ()
 
virtual void toggleVisibility (bool visibility)
 
virtual
DtOsgEarthFeatureDataBroker
getOsgEarthFeatureDataBroker ()
 
virtual bool isMetaFlight (void) const
 
virtual void setIsMinimapOnly (bool isForMinimap)
 
virtual bool isMinimapOnly () const
 
virtual void setIsPageable (bool isPageable)
 
virtual bool isPageable () const
 
virtual void setPageableCenterPosition (const DtVector &pageableCenter)
 
virtual DtVector pageableCenterPosition () const
 
virtual void setPageableRadius (double radius)
 
virtual double pageableRadius () const
 
virtual void setPageOutDistance (double pageOutDistance)
 
virtual double pageOutDistance () const
 
- Public Member Functions inherited from makVrv::DtTerrainPatchObject
 DtTerrainPatchObject (DtDe &de, DtUniqueID id)
 
virtual ~DtTerrainPatchObject ()
 
const std::string & terrainDefinitionName () const
 
virtual DtUniqueID uniqueID () const
 

Static Public Member Functions

static void authorizeBingImageryLayer (osgEarth::BingImageLayer *bingImageLayer, bool openLayer=true)
 

Protected Types

typedef osg::ref_ptr< osg::Node > RefNode
 

Protected Member Functions

void removeChildNodesAndCache ()
 
void clearStateGraphForAllChannels (void)
 
void removeEmptyParent (osg::Node *node)
 
void updateBounds ()
 
virtual void updatePageablePropertiesBasedOnNode (osg::Node *node)
 
virtual bool getElevation (double lonRadians, double latRadians, double &retElevation)
 
virtual void slot_perPixelLightingChanged (bool newVal)
 
virtual void slot_usePixelShaderForOsgEarthModelsChanged ()
 
virtual void slot_postUpdate ()
 
virtual void setOsgEarthMaterial (float ambient, float diffuse, float specular, float shininess)
 
virtual void setOsgEarthMaterialOnNode (osg::Node &node, float ambient, float diffuse, float specular, float shininess)
 
virtual void setOsgEarthMaterialOnStateSet (osg::StateSet &ss, float ambient, float diffuse, float specular, float shininess)
 
virtual void slot_terrainPaged ()
 
osgEarth::Util::ElevationQuery * getOrCreateElevationQuery ()
 
void installOsgEarthFeatureDataProcessors ()
 
virtual void configureOsgEarthFeatureGeometryCompiler ()
 
virtual void setupMapNodeIntersectFlag ()
 
virtual void setGlobalWindSpeed (float metersPerSecond)
 
virtual void setGlobalWindDirection (float radians)
 
virtual void setupMapNode (void)
 
virtual void setupOsgEarthBlendingForHbao (osgEarth::Map *map)
 
virtual void setupOsgEarthLayersForHeightmapRendering (osgEarth::Map *map)
 
virtual void setupNonMapNode (osg::ref_ptr< osg::Node > node)
 
virtual void slot_coordinateSystemChanged ()
 
virtual void extractNodesExecute (osg::Node *node, const std::string &ruleset, bool isRegEx)
 
virtual void extractOceanNodesExecute (osg::Node *node, const std::string &ruleset, bool isRegEx)
 
virtual void extractSpeedTreeNodesExecute (osg::Node *node, const std::string &rule, bool isRegEx, const std::string &modelDefinition)
 
virtual void postExtractionProcessingExecute (void)
 
virtual void parseDynamicTerrain (void)
 
virtual void executeExtractionOperationsDeferred (osg::Node *node)
 
virtual void setupOsgEarthTextureLimits ()
 

Static Protected Member Functions

static void graphBoundingBox (const osg::Node *node, osg::BoundingBox &bbox)
 

Protected Attributes

osg::ref_ptr< DtTerrainPatchGroupmyRoot
 
osg::ref_ptr< DtFastGroupmyTerrainGroup
 
osg::ref_ptr< osgEarth::MapNode > myMapNode
 
DtOsgTerrainOverlayManager myOverlayManager
 
DtTextureVisitor::TextureMap myFoundTextureMap
 
bool myGlobalFlag
 
bool myHaveExtractedOcean
 
bool myPerPixelLightingChanged
 
volatile bool myTerrainPagedThisFrame
 
bool myPendingPerPixelLightingValue
 
bool myOsgEarthMaterialChanged
 
float myPendingOsgEarthMaterialAmbient
 
float myPendingOsgEarthMaterialDiffuse
 
float myPendingOsgEarthMaterialSpecular
 
float myPendingOsgEarthMaterialShininess
 
DtSignalConnectionManager myConnections
 
DtMetaFileManager::LinkageValueVec myTerrainPatchMetaFileFeatures
 
std::vector< DtVirtualBaseClass * > myTerrainAttachments
 
osgEarth::Util::ElevationQuery * myElevationQuery
 
osg::ref_ptr
< DtOsgEarthFeatureDataBroker
myOsgEarthFeatureDataBroker
 
bool myTerrainTreeScaleRandomizationEnabled
 
float myTerrainTreeMinScale
 
float myTerrainTreeMaxScale
 
bool myTerrainTreeOrientationRandomizationEnabled
 
bool myDestructing
 
DtOsgNodesExtractormyExtractedNodesLogic
 
DtDynamicTerrainWorld::FeatureHandle myDynamicTerrainHandle
 
AlphaToCoverageState myAlphaToCoverageState
 
bool myIndirectEnabled
 
unsigned int myMaxPagedLods
 
DtOsgLightPointManagermyLightPointManager
 
DtPagedTilesIndirectManagermyPagedTilesIndirectManager
 
boost::signalslib::connection myPagedTilesIndirectManagerConnection
 
std::vector< RefNodemyIndirectedNodes
 
std::string myActualFilename
 
osg::ref_ptr< osgEarth::Wind > myGlobalWind
 
bool myIsMinimapOnly
 
bool myIsPageable
 
DtVector myPageableCenterPosition
 
double myPageableRadius
 
double myPageOutDistance
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 
const osg::Node * myMetaflightGroupNode = nullptr
 
osg::Node * myPagedLod = nullptr
 
std::unordered_map
< std::string, bool
myExtractNodesOps
 
std::vector< ExtractSpeedTreeOpmyExtractSpeedTreeOps
 
std::unordered_map
< std::string, bool
myExtractOceanNodesOps
 
- Protected Attributes inherited from makVrv::DtTerrainPatchObject
DtDemyDe
 
DtUniqueID myUniqueID
 
std::string myTerrainDefinitionName
 

Private Member Functions

 DtOsgTerrainPatchObject (const DtOsgTerrainPatchObject &)
 
DtOsgTerrainPatchObjectoperator= (const DtOsgTerrainPatchObject &)
 

Friends

class DtOsgNodesExtractor
 
class DtPagedTilesIndirectManager
 

Additional Inherited Members

- Static Public Attributes inherited from makVrv::DtTerrainPatchObject
static const double TheEarthRadius
 

Member Typedef Documentation

Member Enumeration Documentation

The possible states alpha to coverage on a terrain patch.

Enumerator
USE_GLOBAL 
FORCE_OFF 
FORCE_ON 

Constructor & Destructor Documentation

makVrv::DtOsgTerrainPatchObject::DtOsgTerrainPatchObject ( DtDe de,
DtUniqueID  elementId 
)

CTOR.

virtual makVrv::DtOsgTerrainPatchObject::~DtOsgTerrainPatchObject ( )
virtual

DTOR.

makVrv::DtOsgTerrainPatchObject::DtOsgTerrainPatchObject ( const DtOsgTerrainPatchObject )
private

Not implemented.

Member Function Documentation

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

Distributed methods:

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

Reimplemented from makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::slot_atcGlobalTerrainEnableChanged ( )
virtual

slot to listen in on a2c settings changes

virtual void makVrv::DtOsgTerrainPatchObject::slot_terrainInstancesReadyToRender ( const DtPagedTilesIndirectManager pagedTilesIndirectManager)
virtual

slot to listen in on when instances in paged tiles indirect manager are ready to render (were rendered at least once)

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

Enable specified overlay with specified definition.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::disableOverlay ( int  type)
virtual

Disable specified overlay.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::disableAllOverlays ( )
virtual

Disable all overlays.

Implements makVrv::DtTerrainPatchObject.

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

Set scale of specified overlay.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setWrapMode ( int  type,
int   
)
virtual

Set wrap mode of specified overlay. Default is REPEAT.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setBlendMode ( int  type,
int   
)
virtual

Set blend mode of specified overlay. Default is MODULATE.

Implements makVrv::DtTerrainPatchObject.

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

Set offset of specified overlay.

Implements makVrv::DtTerrainPatchObject.

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

Toggle layers on or off by rule regexp.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setRasterLayerPosition ( int  type,
int  pos 
)
virtual

Sets the position of the raster layer to draw.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setIsMinimapOnly ( bool  isForMinimap)
virtual

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

Implements makVrv::DtTerrainPatchObject.

virtual bool makVrv::DtOsgTerrainPatchObject::isMinimapOnly ( ) const
virtual

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

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setIsPageable ( bool  isPageable)
virtual

Should this patch object be pageable or not? NOTE: Changing the pageable status of a terrain patch requires that the terrain patch is reloaded.

Implements makVrv::DtTerrainPatchObject.

virtual bool makVrv::DtOsgTerrainPatchObject::isPageable ( ) const
virtual

Should this patch object be pageable or not? NOTE: Changing the pageable status of a terrain patch requires that the terrain patch is reloaded.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setPageableCenterPosition ( const DtVector pageableCenter)
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.

Implements makVrv::DtTerrainPatchObject.

virtual DtVector makVrv::DtOsgTerrainPatchObject::pageableCenterPosition ( ) const
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.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setPageableRadius ( double  radius)
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.

Implements makVrv::DtTerrainPatchObject.

virtual double makVrv::DtOsgTerrainPatchObject::pageableRadius ( ) const
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.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setPageOutDistance ( double  pageOutDistance)
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.

Implements makVrv::DtTerrainPatchObject.

virtual double makVrv::DtOsgTerrainPatchObject::pageOutDistance ( ) const
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.

Implements makVrv::DtTerrainPatchObject.

virtual std::string makVrv::DtOsgTerrainPatchObject::overlayDefinition ( int  type)
virtual

Local functions.

Implements makVrv::DtTerrainPatchObject.

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

Non bound methods:

Implements makVrv::DtTerrainPatchObject.

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

Non bound methods:

Implements makVrv::DtTerrainPatchObject.

virtual DtTerrainOverlayOperation makVrv::DtOsgTerrainPatchObject::defaultOverlay ( int  type)
virtual

Non bound methods:

Implements makVrv::DtTerrainPatchObject.

virtual DtTerrainOverlayOperation makVrv::DtOsgTerrainPatchObject::currentOverlay ( int  type)
virtual

Non bound methods:

Implements makVrv::DtTerrainPatchObject.

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

Returns the min/max bounding points of the terrain.

Implements makVrv::DtTerrainPatchObject.

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

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

Implements makVrv::DtTerrainPatchObject.

virtual DtVector makVrv::DtOsgTerrainPatchObject::getDatabaseOrigin ( ) const
virtual

Return the origin of the database in database coordinates.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::getBoundingBoxCenter ( float &  x,
float &  y,
float &  z 
) const
virtual

Get the bounding box center of the terrain patch.

osg::Group* makVrv::DtOsgTerrainPatchObject::terrainGroupNode ( )
virtual void makVrv::DtOsgTerrainPatchObject::extractNodes ( const std::string &  ruleset,
bool  isRegEx 
)
overridevirtual

Move nodes via a ruleset.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::extractOceanNodes ( const std::string &  ruleset,
bool  isRegEx 
)
overridevirtual

Extract ocean nodes to the static ocean root.

Implements makVrv::DtTerrainPatchObject.

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

Extract osg nodes from the terrain patch and replace them as speed trees.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::realizeExtractedSpeedTrees ( const DtVectorTreeRecords trees)
virtual

Send Tree Records to the speed tree manager.

Implements makVrv::DtTerrainPatchObject.

virtual bool makVrv::DtOsgTerrainPatchObject::haveExtractedOcean ( ) const
virtual

Does this patch have extracted ocean nodes?

virtual bool makVrv::DtOsgTerrainPatchObject::canExtractOceanInIndirect ( void  ) const
virtual
virtual int makVrv::DtOsgTerrainPatchObject::countNodes ( const std::string &  rule) const
virtual

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

Implements makVrv::DtTerrainPatchObject.

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

Get the extracted node position.

Return values
falseif the node is not found.

Implements makVrv::DtTerrainPatchObject.

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

Get the extracted node orientation.

Return values
falseif the node is not found.

Implements makVrv::DtTerrainPatchObject.

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

Moves a node to the model and sets the location of an object by its location.

Implements makVrv::DtTerrainPatchObject.

virtual osg::Node* makVrv::DtOsgTerrainPatchObject::findNode ( const std::string &  rule,
unsigned int  index 
)
virtual

Get a particular node found with a rule & it's index.

virtual bool makVrv::DtOsgTerrainPatchObject::isGlobalScaleTerrain ( ) const
virtual

Get if the terrain patch is a global scale.

Implements makVrv::DtTerrainPatchObject.

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

Get a terrain intersection.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::clearElevationCache ( )
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.

Implements makVrv::DtTerrainPatchObject.

bool makVrv::DtOsgTerrainPatchObject::isOsgEarth ( ) const

Returns whether the terrain 'patch' is really osg earth streamed terrain.

osgEarth::MapNode* makVrv::DtOsgTerrainPatchObject::mapNode ( )

Returns the underlying osgEarth Map Node if any.

const osgEarth::MapNode* makVrv::DtOsgTerrainPatchObject::mapNode ( ) const
void makVrv::DtOsgTerrainPatchObject::installOsgEarthFeatureDataCallback ( const std::string &  featureName,
DtOsgEarthFeatureDataBroker::Callback callback 
)
virtual const DtTextureVisitor::TextureMap& makVrv::DtOsgTerrainPatchObject::foundTextures ( ) const
virtual

Returns the list of (unique) found textures.

virtual void makVrv::DtOsgTerrainPatchObject::setOsgEarthMaterialValues ( float  ambient,
float  diffuse,
float  specular,
float  shininess 
)
virtual
virtual void makVrv::DtOsgTerrainPatchObject::getOsgEarthMaterialValues ( float &  ambient,
float &  diffuse,
float &  specular,
float &  shininess 
)
virtual
DtMetaFileManager::LinkageValueVec& makVrv::DtOsgTerrainPatchObject::terrainPatchMetaFileFeatures ( )

Return the list of node names/annotations and corresponding JSON info.

std::vector<DtVirtualBaseClass*>& makVrv::DtOsgTerrainPatchObject::terrainAttachments ( )

Get the list of tickables for this model (created by .meta files)

virtual void makVrv::DtOsgTerrainPatchObject::setTerrainTreeScaleRandomization ( bool  isRandomized)
virtual

Should speed tree scale be randomized on the terrain.

Implements makVrv::DtTerrainPatchObject.

virtual bool makVrv::DtOsgTerrainPatchObject::isTerrainTreeScaleRandomizationEnabled ( ) const
virtual

Is speed tree random scale enabled.

virtual void makVrv::DtOsgTerrainPatchObject::setTerrainTreeMinScale ( double  minScale)
virtual

Set the minimum scale for randomization of scale.

Implements makVrv::DtTerrainPatchObject.

virtual double makVrv::DtOsgTerrainPatchObject::terrainTreeMinScale ( ) const
virtual

Get the minimum scale for randomization of scale.

virtual void makVrv::DtOsgTerrainPatchObject::setTerrainTreeMaxScale ( double  maxScale)
virtual

Set the maximum scale for randomization of scale.

Implements makVrv::DtTerrainPatchObject.

virtual double makVrv::DtOsgTerrainPatchObject::terrainTreeMaxScale ( ) const
virtual

Get the maximum scale for randomization of scale.

virtual void makVrv::DtOsgTerrainPatchObject::setTerrainTreeOrientationRandomization ( bool  isRandomized)
virtual

Should speed trees be randomly oriented.

Implements makVrv::DtTerrainPatchObject.

virtual bool makVrv::DtOsgTerrainPatchObject::isTerrainTreeOrientationRandomizationEnabled ( ) const
virtual

Is speed tree random orientation enabled.

bool makVrv::DtOsgTerrainPatchObject::isDestructing ( )

Is the DtOsgTerrainPatchObject in the destructor.

virtual void makVrv::DtOsgTerrainPatchObject::useICO ( bool  enable)
virtual

Enable/Disable Incremental Compile Option. This calls into the windowmanager which controls ICO.

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::setMaxPagedLODs ( unsigned int  maxPagedLODs)
virtual

Set the target max number of paged lods for this terrain (patch)

Implements makVrv::DtTerrainPatchObject.

virtual void makVrv::DtOsgTerrainPatchObject::updateMaxPagedLODs ( )
virtual

send the current max paged lods down to the channel manager

virtual void makVrv::DtOsgTerrainPatchObject::slot_channelCreated ( )
virtual

handle the signal for channel created so that the terrain can send the max paged lods down to the channel manager

virtual void makVrv::DtOsgTerrainPatchObject::slot_windowCreated ( )
virtual

handle the signal for window is created so that the terrain can send the max paged lods down to the channel manager

virtual void makVrv::DtOsgTerrainPatchObject::slot_channelToBeDestroyed ( )
virtual

handle the signal for channel to be destroyed so that the terrain can send the max paged lods down to the channel manager

virtual bool makVrv::DtOsgTerrainPatchObject::alphaToCoverageEnabled ( )
virtual

Gets whether or not alpha to coverage is enabled for this terrain patch.

virtual void makVrv::DtOsgTerrainPatchObject::postExtractionProcessing ( )
virtual

called by the terrain patch after the extraction operations used to indirect a non paging terrain patch.

Implements makVrv::DtTerrainPatchObject.

virtual bool makVrv::DtOsgTerrainPatchObject::indirectEnabled ( )
virtual

get whether or not indirect is enabled for this terrain patch. Based on setting at load.

virtual void makVrv::DtOsgTerrainPatchObject::toggleVisibility ( bool  visibility)
virtual

Toggle the visibility of this terrain patch object.

Parameters
visibilityWhether show the terrain patch or not.

Implements makVrv::DtTerrainPatchObject.

static void makVrv::DtOsgTerrainPatchObject::authorizeBingImageryLayer ( osgEarth::BingImageLayer *  bingImageLayer,
bool  openLayer = true 
)
static

Authorize a Bing Imagery Layer using a MAK provided key.

Parameters
bingImageLayerThe bing imagery layer to authorize.
Note
If the layer is open, this function will close and re-open the layer for changes to take affect. This function also updates the CachePolicy for the layer to be compliant with Bing's terms of usage. A compliant CachePolicy expires cached data after 24 hours.
virtual DtOsgEarthFeatureDataBroker* makVrv::DtOsgTerrainPatchObject::getOsgEarthFeatureDataBroker ( )
virtual

get the feature data broker for this terrain patch

virtual bool makVrv::DtOsgTerrainPatchObject::isMetaFlight ( void  ) const
virtual

is mft?

DtOsgTerrainPatchObject& makVrv::DtOsgTerrainPatchObject::operator= ( const DtOsgTerrainPatchObject )
private
void makVrv::DtOsgTerrainPatchObject::removeChildNodesAndCache ( )
protected

Unload the terrain.

void makVrv::DtOsgTerrainPatchObject::clearStateGraphForAllChannels ( void  )
protected

clear osg's internal state graph

static void makVrv::DtOsgTerrainPatchObject::graphBoundingBox ( const osg::Node *  node,
osg::BoundingBox &  bbox 
)
staticprotected
void makVrv::DtOsgTerrainPatchObject::removeEmptyParent ( osg::Node *  node)
protected
void makVrv::DtOsgTerrainPatchObject::updateBounds ( )
protected
virtual void makVrv::DtOsgTerrainPatchObject::updatePageablePropertiesBasedOnNode ( osg::Node *  node)
protectedvirtual
virtual bool makVrv::DtOsgTerrainPatchObject::getElevation ( double  lonRadians,
double  latRadians,
double retElevation 
)
protectedvirtual

get an osg earth elevation

virtual void makVrv::DtOsgTerrainPatchObject::slot_perPixelLightingChanged ( bool  newVal)
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::slot_usePixelShaderForOsgEarthModelsChanged ( )
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::slot_postUpdate ( )
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::setOsgEarthMaterial ( float  ambient,
float  diffuse,
float  specular,
float  shininess 
)
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::setOsgEarthMaterialOnNode ( osg::Node &  node,
float  ambient,
float  diffuse,
float  specular,
float  shininess 
)
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::setOsgEarthMaterialOnStateSet ( osg::StateSet &  ss,
float  ambient,
float  diffuse,
float  specular,
float  shininess 
)
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::slot_terrainPaged ( )
protectedvirtual
osgEarth::Util::ElevationQuery* makVrv::DtOsgTerrainPatchObject::getOrCreateElevationQuery ( )
protected

Returns the patch's elevation query object, creating it on.

void makVrv::DtOsgTerrainPatchObject::installOsgEarthFeatureDataProcessors ( )
protected
virtual void makVrv::DtOsgTerrainPatchObject::configureOsgEarthFeatureGeometryCompiler ( )
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::setupMapNodeIntersectFlag ( )
protectedvirtual

utility function for setting up the osgEarth terrain skin only intersection flag on the terrain engine.

virtual void makVrv::DtOsgTerrainPatchObject::setGlobalWindSpeed ( float  metersPerSecond)
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::setGlobalWindDirection ( float  radians)
protectedvirtual
virtual void makVrv::DtOsgTerrainPatchObject::setupMapNode ( void  )
protectedvirtual

set up map node, if the definition contains a map node

virtual void makVrv::DtOsgTerrainPatchObject::setupOsgEarthBlendingForHbao ( osgEarth::Map *  map)
protectedvirtual

custom blend for hbao

virtual void makVrv::DtOsgTerrainPatchObject::setupOsgEarthLayersForHeightmapRendering ( osgEarth::Map *  map)
protectedvirtual

modify layer flags for visiblity in heightmap rendering

virtual void makVrv::DtOsgTerrainPatchObject::setupNonMapNode ( osg::ref_ptr< osg::Node >  node)
protectedvirtual

set up map node, if the definition does not contain a map node

virtual void makVrv::DtOsgTerrainPatchObject::slot_coordinateSystemChanged ( )
protectedvirtual

slot for when the coordinate system changes

virtual void makVrv::DtOsgTerrainPatchObject::extractNodesExecute ( osg::Node *  node,
const std::string &  ruleset,
bool  isRegEx 
)
protectedvirtual

actual execution

virtual void makVrv::DtOsgTerrainPatchObject::extractOceanNodesExecute ( osg::Node *  node,
const std::string &  ruleset,
bool  isRegEx 
)
protectedvirtual

actual execution

virtual void makVrv::DtOsgTerrainPatchObject::extractSpeedTreeNodesExecute ( osg::Node *  node,
const std::string &  rule,
bool  isRegEx,
const std::string &  modelDefinition 
)
protectedvirtual

actual execution

virtual void makVrv::DtOsgTerrainPatchObject::postExtractionProcessingExecute ( void  )
protectedvirtual

actual execution

virtual void makVrv::DtOsgTerrainPatchObject::parseDynamicTerrain ( void  )
protectedvirtual

internal

virtual void makVrv::DtOsgTerrainPatchObject::executeExtractionOperationsDeferred ( osg::Node *  node)
protectedvirtual

For paged osgs only. Called via DtPagedTilesIndirectManager from a background thread It is likely possible to do this via ordering the various signals for loaded/paged in properly.

virtual void makVrv::DtOsgTerrainPatchObject::setupOsgEarthTextureLimits ( )
protectedvirtual

called once when terrain is loaded called also when limits change

Friends And Related Function Documentation

friend class DtOsgNodesExtractor
friend
friend class DtPagedTilesIndirectManager
friend

Member Data Documentation

osg::ref_ptr<DtTerrainPatchGroup> makVrv::DtOsgTerrainPatchObject::myRoot
protected

The OSG Hierarchy starts with myRoot and has one child: myTerrainGroup.

osg::ref_ptr<DtFastGroup> makVrv::DtOsgTerrainPatchObject::myTerrainGroup
protected

The myTerrainGroup node holds all the terrain polygons except for reforested trees.

osg::ref_ptr<osgEarth::MapNode> makVrv::DtOsgTerrainPatchObject::myMapNode
protected
DtOsgTerrainOverlayManager makVrv::DtOsgTerrainPatchObject::myOverlayManager
protected
DtTextureVisitor::TextureMap makVrv::DtOsgTerrainPatchObject::myFoundTextureMap
protected
bool makVrv::DtOsgTerrainPatchObject::myGlobalFlag
protected
bool makVrv::DtOsgTerrainPatchObject::myHaveExtractedOcean
protected
bool makVrv::DtOsgTerrainPatchObject::myPerPixelLightingChanged
protected
volatile bool makVrv::DtOsgTerrainPatchObject::myTerrainPagedThisFrame
protected
bool makVrv::DtOsgTerrainPatchObject::myPendingPerPixelLightingValue
protected
bool makVrv::DtOsgTerrainPatchObject::myOsgEarthMaterialChanged
protected
float makVrv::DtOsgTerrainPatchObject::myPendingOsgEarthMaterialAmbient
protected
float makVrv::DtOsgTerrainPatchObject::myPendingOsgEarthMaterialDiffuse
protected
float makVrv::DtOsgTerrainPatchObject::myPendingOsgEarthMaterialSpecular
protected
float makVrv::DtOsgTerrainPatchObject::myPendingOsgEarthMaterialShininess
protected
DtSignalConnectionManager makVrv::DtOsgTerrainPatchObject::myConnections
protected
DtMetaFileManager::LinkageValueVec makVrv::DtOsgTerrainPatchObject::myTerrainPatchMetaFileFeatures
protected
std::vector<DtVirtualBaseClass*> makVrv::DtOsgTerrainPatchObject::myTerrainAttachments
protected
osgEarth::Util::ElevationQuery* makVrv::DtOsgTerrainPatchObject::myElevationQuery
protected

Object used to sample the elevation model at various resolutions.

osg::ref_ptr<DtOsgEarthFeatureDataBroker> makVrv::DtOsgTerrainPatchObject::myOsgEarthFeatureDataBroker
protected

notifies subscribers of feature data loading via an osgEarth layer.

bool makVrv::DtOsgTerrainPatchObject::myTerrainTreeScaleRandomizationEnabled
protected

Tree randomization settings.

float makVrv::DtOsgTerrainPatchObject::myTerrainTreeMinScale
protected
float makVrv::DtOsgTerrainPatchObject::myTerrainTreeMaxScale
protected
bool makVrv::DtOsgTerrainPatchObject::myTerrainTreeOrientationRandomizationEnabled
protected
bool makVrv::DtOsgTerrainPatchObject::myDestructing
protected

keeps track of when the object is in the destructor.

DtOsgNodesExtractor* makVrv::DtOsgTerrainPatchObject::myExtractedNodesLogic
protected
DtDynamicTerrainWorld::FeatureHandle makVrv::DtOsgTerrainPatchObject::myDynamicTerrainHandle
protected
AlphaToCoverageState makVrv::DtOsgTerrainPatchObject::myAlphaToCoverageState
protected
bool makVrv::DtOsgTerrainPatchObject::myIndirectEnabled
protected
unsigned int makVrv::DtOsgTerrainPatchObject::myMaxPagedLods
protected
DtOsgLightPointManager& makVrv::DtOsgTerrainPatchObject::myLightPointManager
protected
DtPagedTilesIndirectManager* makVrv::DtOsgTerrainPatchObject::myPagedTilesIndirectManager
protected
boost::signalslib::connection makVrv::DtOsgTerrainPatchObject::myPagedTilesIndirectManagerConnection
protected

connection to listen in on when instances were added to the terrain skin only for non-metaflight

std::vector<RefNode> makVrv::DtOsgTerrainPatchObject::myIndirectedNodes
protected
std::string makVrv::DtOsgTerrainPatchObject::myActualFilename
protected
osg::ref_ptr<osgEarth::Wind> makVrv::DtOsgTerrainPatchObject::myGlobalWind
protected
bool makVrv::DtOsgTerrainPatchObject::myIsMinimapOnly
protected
bool makVrv::DtOsgTerrainPatchObject::myIsPageable
protected
DtVector makVrv::DtOsgTerrainPatchObject::myPageableCenterPosition
protected
double makVrv::DtOsgTerrainPatchObject::myPageableRadius
protected
double makVrv::DtOsgTerrainPatchObject::myPageOutDistance
protected
DtCoordinateSystem* makVrv::DtOsgTerrainPatchObject::myCoordinateSystem = nullptr
protected

local clone of the system wide coordinate system. for thread safety.

const osg::Node* makVrv::DtOsgTerrainPatchObject::myMetaflightGroupNode = nullptr
protected
osg::Node* makVrv::DtOsgTerrainPatchObject::myPagedLod = nullptr
protected
std::unordered_map<std::string, bool> makVrv::DtOsgTerrainPatchObject::myExtractNodesOps
protected

used to defer extraction of nodes (only for paged osgs)

std::vector<ExtractSpeedTreeOp> makVrv::DtOsgTerrainPatchObject::myExtractSpeedTreeOps
protected
std::unordered_map<std::string, bool> makVrv::DtOsgTerrainPatchObject::myExtractOceanNodesOps
protected

used to defer extraction of ocean (only for paged osgs)


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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)