![]() |
VR-Forces Development_Version Class Documentation
|
A DtOsgTerrainPatchObject contains the methods for loading a file as a terrain. More...

Public Member Functions | |
| DtOsgTerrainPatchObject (DtDe &de, DtUniqueID elementId) | |
| CTOR. | |
| virtual | ~DtOsgTerrainPatchObject () |
| DTOR. | |
| virtual void | setTerrainDefinition (const std::string &modelDefinitionName) |
| Distributed methods: | |
| virtual void | enableOverlay (int type, const std::string &definition) |
| Enable specified overlay with specified definition. | |
| virtual void | disableOverlay (int type) |
| Disable specified overlay. | |
| virtual void | disableAllOverlays () |
| Disable all overlays. | |
| virtual void | showLightPoints (bool show) |
| Turn on or off light points. | |
| virtual void | setOverlayScale (int type, double x, double y) |
| Set scale of specified overlay. | |
| virtual void | setWrapMode (int type, int) |
| Set wrap mode of specified overlay. Default is REPEAT. | |
| virtual void | setBlendMode (int type, int) |
| Set blend mode of specified overlay. Default is MODULATE. | |
| virtual void | setOverlayOffset (int type, double x, double y) |
| Set offset of specified overlay. | |
| virtual void | setLayerEnabled (const std::string &rule, bool status) |
| Toggle layers on or off by rule regexp. | |
| virtual void | setRasterLayerPosition (int type, int pos) |
| Sets the position of the raster layer to draw. | |
| virtual std::string | overlayDefinition (int type) |
| Local functions. | |
| virtual std::vector< double > | overlayScale (int type) |
| Non bound methods: | |
| virtual std::vector< double > | overlayOffset (int type) |
| Non bound methods: | |
| virtual DtTerrainOverlayOperation | defaultOverlay (int type) |
| Non bound methods: | |
| virtual DtTerrainOverlayOperation | currentOverlay (int type) |
| Non bound methods: | |
| virtual void | getBoundingBoxMinMax (DtVector &min, DtVector &max) const |
| Returns the min/max bounding points of the terrain. | |
| virtual void | getTerrainExtents (DtVector &nw, DtVector &ne, DtVector &sw, DtVector &se) const |
| Return the corners of the terrain, useful for calculating draping parameters. | |
| virtual DtVector | getDatabaseOrigin () const |
| Return the origin of the database in database coordinates. | |
| virtual void | getBoundingBoxCenter (float &x, float &y, float &z) const |
| Get the bounding box center of the terrain patch. | |
| osg::Group * | terrainGroupNode () |
| virtual void | extractNodes (const std::string &ruleset, bool isRegEx) |
| Move nodes via a ruleset. | |
| virtual void | extractOceanNodes (const std::string &ruleset, bool isRegEx) |
| Extract ocean nodes to the static ocean root. | |
| virtual bool | haveExtractedOcean () const |
| Does this patch have extracted ocean nodes? | |
| virtual int | countNodes (const std::string &rule) const |
| Count nodes via a rule. | |
| virtual bool | getExtractedNodePosition (const std::string &rule, unsigned int index, double &x, double &y, double &z) const |
| Get the extracted node position. | |
| virtual bool | getExtractedNodeOrientation (const std::string &rule, unsigned int index, double &x, double &y, double &z, double &w) const |
| Get the extracted node orientation. | |
| virtual void | moveNode (DtSceneObject *object, DtModel *model, const std::string &rule, unsigned int index) |
| Moves a node to the model and sets the location of an object by its location. | |
| virtual osg::Node * | findNode (const std::string &rule, unsigned int index) |
| Get a particular node found with a rule & it's index. | |
| virtual bool | isGlobalScaleTerrain () const |
| Get if the terrain patch is a global scale. | |
| virtual bool | getTerrainIntersection (double x, double y, double z, double vx, double vy, double vz, double &retX, double &retY, double &retZ) |
| Get a terrain intersection. | |
| virtual void | clearElevationCache () |
| If the patch object is using an elevation cache, clear it (otherwise do nothing). | |
| bool | isOsgEarth () const |
| Returns whether the terrain 'patch' is really osg earth streamed terrain. | |
| osgEarth::MapNode * | mapNode () |
| Returns the underlying osgEarth Map Node if any. | |
| const osgEarth::MapNode * | mapNode () const |
| void | installOsgEarthFeatureDataCallback (const std::string &featureName, DtOsgEarthFeatureDataBroker::Callback *callback) |
| virtual const DtTextureVisitor::TextureMap & | foundTextures () const |
| Returns the list of (unique) found textures. | |
| virtual void | setOsgEarthMaterialValues (float ambient, float diffuse, float specular, float shininess) |
| virtual void | getOsgEarthMaterialValues (float &ambient, float &diffuse, float &specular, float &shininess) |
| virtual osg::ref_ptr< DtFastGroup > | getOsgEarthModelsNode () |
| Returns a pointer to the OsgEarthModelsNode for this terrain patch object. | |
| DtMetaFileManager::LinkageValueVec & | terrainPatchMetaFileFeatures () |
| Return the list of node names/annotations and corresponding JSON info. | |
| std::vector < DtVirtualBaseClass * > & | terrainAttachments () |
| Get the list of tickables for this model (created by .meta files) | |
| void | appendLighPoints (DtLightPointVisitor::LightPointNodeObsVec &osgLightPoints) |
| Add light points to this terrain patch. | |
| virtual void | setTerrainTreeScaleRandomization (bool isRandomized) |
| Should speed tree scale be randomized on the terrain. | |
| virtual bool | isTerrainTreeScaleRandomizationEnabled () const |
| Is speed tree random scale enabled. | |
| virtual void | setTerrainTreeMinScale (double minScale) |
| Set the minimum scale for randomization of scale. | |
| virtual double | terrainTreeMinScale () const |
| Get the minimum scale for randomization of scale. | |
| virtual void | setTerrainTreeMaxScale (double maxScale) |
| Set the maximum scale for randomization of scale. | |
| virtual double | terrainTreeMaxScale () const |
| Get the maximum scale for randomization of scale. | |
| virtual void | setTerrainTreeOrientationRandomization (bool isRandomized) |
| Should speed trees be randomly oriented. | |
| virtual bool | isTerrainTreeOrientationRandomizationEnabled () const |
| Is speed tree random orientation enabled. | |
| bool | isDestructing () |
| Is the DtOsgTerrainPatchObject in the destructor. | |
| void | useICO (bool enable) |
| Enable/Disable Incremental Compile Option. | |
Public Member Functions inherited from makVrv::DtTerrainPatchObject | |
| DtTerrainPatchObject (DtDe &de, DtUniqueID id) | |
| CTOR. | |
| virtual | ~DtTerrainPatchObject () |
| DTOR. | |
| const std::string & | terrainDefinitionName () const |
| Accessor for the terrain definition name. | |
| virtual DtUniqueID | uniqueID () const |
| DtUniqueID Accessor. | |
Protected Member Functions | |
| void | removeChildNodesAndCache () |
| Unload the terrain. | |
| void | removeEmptyParent (osg::Node *node) |
| void | updateBounds () |
| virtual bool | getElevation (double lonRadians, double latRadians, double &retElevation) |
| get an osg earth elevation | |
| virtual void | setPerPixelLightingEnabled (bool setting) |
| 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::ElevationQuery * | getOrCreateElevationQuery () |
| Returns the patch's elevation query object, creating it on. | |
| void | installOsgEarthFeatureDataProcessors () |
| void | configureOsgEarthFeatureGeometryCompiler () |
Static Protected Member Functions | |
| static void | graphBoundingBox (const osg::Node *node, osg::BoundingBox &bbox) |
Private Member Functions | |
| DtOsgTerrainPatchObject (const DtOsgTerrainPatchObject &) | |
| Not implemented. | |
| DtOsgTerrainPatchObject & | operator= (const DtOsgTerrainPatchObject &) |
Friends | |
| class | DtOsgExtractedNodesLogic |
Additional Inherited Members | |
Static Public Attributes inherited from makVrv::DtTerrainPatchObject | |
| static const double | TheEarthRadius |
| The Radius of the earth, used to calculate if a terrain has global scale. | |
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.
| makVrv::DtOsgTerrainPatchObject::DtOsgTerrainPatchObject | ( | DtDe & | de, |
| DtUniqueID | elementId | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
private |
Not implemented.
|
virtual |
Distributed methods:
The model definition will be loaded and post processing will occur.
Reimplemented from makVrv::DtTerrainPatchObject.
|
virtual |
Enable specified overlay with specified definition.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Disable specified overlay.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Disable all overlays.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Turn on or off light points.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Set scale of specified overlay.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Set wrap mode of specified overlay. Default is REPEAT.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Set blend mode of specified overlay. Default is MODULATE.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Set offset of specified overlay.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Toggle layers on or off by rule regexp.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Sets the position of the raster layer to draw.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Local functions.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Non bound methods:
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Non bound methods:
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Non bound methods:
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Non bound methods:
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Returns the min/max bounding points of the terrain.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Return the corners of the terrain, useful for calculating draping parameters.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Return the origin of the database in database coordinates.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Get the bounding box center of the terrain patch.
| osg::Group* makVrv::DtOsgTerrainPatchObject::terrainGroupNode | ( | ) |
|
virtual |
Move nodes via a ruleset.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Extract ocean nodes to the static ocean root.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Does this patch have extracted ocean nodes?
|
virtual |
Count nodes via a rule.
This checks the current terrain contents without modifying it.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Get the extracted node position.
| false | if the node is not found. |
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Get the extracted node orientation.
| false | if the node is not found. |
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Moves a node to the model and sets the location of an object by its location.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Get a particular node found with a rule & it's index.
|
virtual |
Get if the terrain patch is a global scale.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Get a terrain intersection.
Implements makVrv::DtTerrainPatchObject.
|
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 |
Returns the list of (unique) found textures.
|
virtual |
|
virtual |
|
inlinevirtual |
Returns a pointer to the OsgEarthModelsNode for this terrain patch object.
| 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)
| void makVrv::DtOsgTerrainPatchObject::appendLighPoints | ( | DtLightPointVisitor::LightPointNodeObsVec & | osgLightPoints | ) |
Add light points to this terrain patch.
|
virtual |
Should speed tree scale be randomized on the terrain.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Is speed tree random scale enabled.
|
virtual |
Set the minimum scale for randomization of scale.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Get the minimum scale for randomization of scale.
|
virtual |
Set the maximum scale for randomization of scale.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Get the maximum scale for randomization of scale.
|
virtual |
Should speed trees be randomly oriented.
Implements makVrv::DtTerrainPatchObject.
|
virtual |
Is speed tree random orientation enabled.
| bool makVrv::DtOsgTerrainPatchObject::isDestructing | ( | ) |
Is the DtOsgTerrainPatchObject in the destructor.
|
virtual |
Enable/Disable Incremental Compile Option.
This calls into the windowmanager which controls ICO
Implements makVrv::DtTerrainPatchObject.
|
private |
|
protected |
Unload the terrain.
|
staticprotected |
|
protected |
|
protected |
|
protectedvirtual |
get an osg earth elevation
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Returns the patch's elevation query object, creating it on.
|
protected |
|
protected |
|
friend |
|
protected |
The OSG Hierarchy starts with myRoot and has one child: myTerrainGroup.
|
protected |
The myTerrainGroup node holds all the terrain polygons except for reforested trees.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Object used to sample the elevation model at various resolutions.
|
protected |
notifies subscribers of feature data loading via an osgEarth layer.
|
protected |
Is this terrain patch showing lights (used for setting state of newly added lights from a layer being loaded)
|
protected |
Tree randomization settings.
|
protected |
|
protected |
|
protected |
|
protected |
keeps track of when the object is in the destructor.
|
protected |