![]() |
VR-Forces 4.10 Class Documentation
|
DtSpeedTreeForest is the SpeedTree implementation of a distributed DtForestObject. More...

Classes | |
| struct | ModelDefParams |
Public Member Functions | |
| virtual | ~DtSpeedTreeForest () |
| virtual void | setVisible (bool isVisible) |
| set the visibility of this speed tree forest. More... | |
| virtual void | addUniqueTree (DtTreeRecord &record) |
| Add a tree to the forest. More... | |
| virtual void | removeTree (DtUniqueID record) |
| Remove a tree from the forest. More... | |
| virtual void | removeAllTrees () |
| Remove all trees. More... | |
| virtual DtUniqueID | addUniqueTreesToUniqueCell (DtVectorTreeRecords &records, bool use_time_limit, bool *out_of_time=NULL) |
| virtual void | removeAllUniqueTreesAndUniqueCell (DtUniqueID cellID) |
| virtual void | setTreeClippingPlane (float fFar) |
| Set the distance that trees are clipped. More... | |
| virtual void | getTreeClippingPlane (float &fFar) |
| Get the clipping planes. More... | |
| virtual void | setTree3DLodDistances (float fNear, float fFar) |
| Set the distances for tree LOD's. More... | |
| virtual void | getTree3DLodDistances (float &fNear, float &fFar) |
| Set the distances for tree LOD's. More... | |
| virtual void | setTreeBillboardDistances (float fStart, float fEnd) |
| Set the distances for tree billboard LOD's. More... | |
| virtual void | getTreeBillboardDistances (float &fStart, float &fEnd) |
| Get the distances for tree billboard LOD's. More... | |
| virtual void | setBillboardFadeOutRange (float fRange) |
| set the fade out distance for the billboards. The Range - Cull distance = start transition dist More... | |
| virtual void | getBillboardFadeOutRange (float &fRange) |
| get the fade out distance for the billboards. The Range - Cull distance = start transition dist More... | |
| virtual void | enableBillboardRendering (bool enable) |
| virtual bool | isBillboardRenderingEnabled () const |
| virtual void | enable3DTreeRendering (bool enable) |
| virtual bool | is3DTreeRenderingEnabled () const |
| virtual void | enableReceiveShadows (bool enable) |
| virtual bool | isReceiveShadowsEnabled () const |
| void | setBoundingBox (const osg::BoundingBox &box) |
| const osg::BoundingBox & | getBoundingBox (void) const |
| osg::ref_ptr< osg::Node > | getRootNode (void) |
| gets the root node for this forest which contains the stateset for the forest More... | |
| void | programBoundCallback (osg::ref_ptr< makOsgSpeedTree::Forest > pForest, const makOsgSpeedTree::TreeType *pTreeType, uint32 programID) |
| callback from when a shader is loaded in speedtree so VRV can bind its own uniforms More... | |
| virtual void | slot_reloadShaders () |
| Indicate to the SpeedTreeForest that it should recompile the SpeedTree (and related) shaders (done in the preUpdateCallback) More... | |
| virtual void | slot_treeProfilingChanged (bool active) |
| turn tracy on or off More... | |
| virtual void | slot_useGlobalAmbientChanged (bool enabled) |
| Runs when the user checks the Use Global Ambient Checkbox. More... | |
| virtual void | slot_useGlobalDiffuseChanged (bool enabled) |
| Runs when the user checks the Use Global Diffuse Checkbox. More... | |
| virtual void | slot_perPixelLightingEnabledChanged (bool enabled) |
| Runs when the user checks the Display Light Rendering Settings Enable Lighting checkbox. More... | |
| virtual void | slot_planarReflectionsShowSpeedTreesChanged (bool enabled) |
| handles the flag that sets whether trees should be rendered in the planar reflections. More... | |
| virtual void | processUnitialized () |
| called by job system post merge. More... | |
| virtual bool | initialized () |
| has this forest been initialized yet. More... | |
| virtual tbb::mutex & | mergeDrawMutex () |
| mutex for preventing the vis manager from being changed during draw More... | |
| virtual tbb::mutex & | mergeUpdateMutex () |
| mutex for preventing the merge and update functions from running at the same time. More... | |
| osg::ref_ptr < makOsgSpeedTree::Forest > & | makSpeedTreeForest () |
| accessor for the underlying speedtree forest. More... | |
| virtual void | preCullSetup (osg::ref_ptr< makOsgSpeedTree::Forest > forest, osg::Camera *camera) |
| check to see if this forest should be updated this frame and setup the fog color. More... | |
Public Member Functions inherited from makVrv::DtForestObject | |
| virtual | ~DtForestObject () |
| Destructor. More... | |
| virtual DtDe & | de () |
| IG accessor. More... | |
| void | addTree (DtTreeRecord &record) |
| Add a tree to the forest. More... | |
Protected Types | |
| typedef std::map< std::string, ModelDefParams > | MapModelDefToSTFileName |
| typedef boost::unordered_map < DtUniqueID, makOsgSpeedTree::TreeInstanceCollection > | MapCellsToTrees |
| typedef boost::unordered_map < DtUniqueID, makOsgSpeedTree::TreeInstance * > | MapTreeIDToTree |
Protected Member Functions | |
| DtSpeedTreeForest (DtDe &de, DtUniqueID id) | |
| Constructors are protected because this class is created via the creator pattern. More... | |
| DtSpeedTreeForest (DtDe &de, DtUniqueID id, const std::string &strVisManagerType) | |
| void | init (const std::string &strVisManagerType) |
| void | connectSignals (void) |
| osg::Vec3f | computeWindDirection (float fDirection) |
| void | setWindStrength (float fStrength) |
| void | setWindDirection (float fDirection) |
| bool | preUpdateCallback (osg::ref_ptr< makOsgSpeedTree::Forest > forest) |
| this now just returns the results of the preCullSetup check to see if update should happen this frame or not. More... | |
| bool | preRenderCallback (osg::ref_ptr< makOsgSpeedTree::Forest > forest, osg::RenderInfo &renderInfo) |
| void | postRenderCallback (osg::ref_ptr< makOsgSpeedTree::Forest > forest, osg::RenderInfo &renderInfo) |
| void | provideTimeCallback (osg::ref_ptr< makOsgSpeedTree::Forest > forest, double &fTime) |
| void | pushGraphicsState (osg::RenderInfo &renderInfo) |
| void | popGraphicsState (osg::RenderInfo &renderInfo) |
| virtual DtModelDefinition * | findModelDefinition (const std::string &modelDef) |
| Find a DtModelDefinition* from the model definition name. More... | |
| bool | createTree (DtTreeRecord &record) |
| No-op. Always returns true. More... | |
| void | initTreeDesc (makOsgSpeedTree::TreeInstanceDescriptor &desc, DtTreeRecord &record, const DtVector &up, DtCoordinateConverter *converter) |
| initialize a tree description. More... | |
| void | initTreeDesc (makOsgSpeedTree::TreeInstanceDescriptor &desc, DtTreeRecord &record, DtCoordinateConverter *converter, bool setupTopoFrame=true) |
| initialize a tree description. More... | |
| void | applyModelDefParameters (makOsgSpeedTree::TreeInstanceDescriptor &desc, DtTreeRecord &record) |
| virtual const bool | bindLightingAttributes (const osg::Node *node, const uint32 programID, DtOsgRenderer *osgRenderer, const std::string &searchNodeName) |
| Recursively walk up the scenegraph searching for a node to bind lighting attributes to the shader program. More... | |
Protected Member Functions inherited from makVrv::DtForestObject | |
| DtForestObject (DtDe &de, DtUniqueID id) | |
| Constructor is protected because this class is created via the creator pattern. More... | |
Static Protected Member Functions | |
| static DtOsgCullVisitorParameters * | getCullParameters (osg::RenderInfo &renderInfo) |
| static bool | isCameraOrthographic (DtOsgCullVisitorParameters *params) |
| static bool | isReflectionCamera (osg::Camera *camera) |
| is the current camera in the render info a reflection camera More... | |
| static float | getZoomFactor (DtOsgCullVisitorParameters *params, DtDe &de) |
Static Protected Attributes | |
| static const float | myCellSize |
| static unsigned int | theLastImGuiFrameNumber |
| static bool | theEnableAsyncUpdate |
Private Member Functions | |
| DtSpeedTreeForest () | |
| Default Constructor not implemented. More... | |
| DtSpeedTreeForest (const DtSpeedTreeForest &other) | |
| Copy Constructor not implemented – Copy Not Allowed. More... | |
| DtSpeedTreeForest & | operator= (const DtSpeedTreeForest &other) |
| Assignment Operator Not implemented Assignment Not Allowed. More... | |
Friends | |
| class | DtSpeedTreeForestClassesCreator |
| class | DtSpeedTreeForestObjectCreator |
Additional Inherited Members | |
Public Types inherited from makVrv::DtForestObject | |
| typedef boost::unordered_map < DtUniqueID, DtTreeRecord > | TreeRecordMap |
DtSpeedTreeForest is the SpeedTree implementation of a distributed DtForestObject.
|
protected |
|
protected |
|
protected |
|
virtual |
|
protected |
Constructors are protected because this class is created via the creator pattern.
|
protected |
|
private |
Default Constructor not implemented.
|
private |
Copy Constructor not implemented – Copy Not Allowed.
|
private |
Assignment Operator Not implemented Assignment Not Allowed.
|
virtual |
set the visibility of this speed tree forest.
When invisible, the node mask of the root node is cached and set to 0 and, if visible, the node mask is restored to the cached non-zero value.
|
virtual |
Add a tree to the forest.
Implements makVrv::DtForestObject.
|
virtual |
Remove a tree from the forest.
Implements makVrv::DtForestObject.
|
virtual |
Remove all trees.
Implements makVrv::DtForestObject.
|
virtual |
|
virtual |
|
virtual |
Set the distance that trees are clipped.
Not implemented in DtOsgForest (only DtSpeedTreeForest).
Implements makVrv::DtForestObject.
|
virtual |
Get the clipping planes.
Implements makVrv::DtForestObject.
|
virtual |
Set the distances for tree LOD's.
Not implemented in DtOsgForest (only DtSpeedTreeForest).
Implements makVrv::DtForestObject.
|
virtual |
Set the distances for tree LOD's.
Not implemented in DtOsgForest (only DtSpeedTreeForest).
Implements makVrv::DtForestObject.
|
virtual |
Set the distances for tree billboard LOD's.
Not implemented in DtOsgForest (only DtSpeedTreeForest).
Implements makVrv::DtForestObject.
|
virtual |
Get the distances for tree billboard LOD's.
Not implemented in DtOsgForest (only DtSpeedTreeForest).
Implements makVrv::DtForestObject.
|
virtual |
set the fade out distance for the billboards. The Range - Cull distance = start transition dist
Implements makVrv::DtForestObject.
|
virtual |
get the fade out distance for the billboards. The Range - Cull distance = start transition dist
Implements makVrv::DtForestObject.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
| void makVrv::DtSpeedTreeForest::setBoundingBox | ( | const osg::BoundingBox & | box | ) |
| const osg::BoundingBox& makVrv::DtSpeedTreeForest::getBoundingBox | ( | void | ) | const |
| osg::ref_ptr<osg::Node> makVrv::DtSpeedTreeForest::getRootNode | ( | void | ) |
gets the root node for this forest which contains the stateset for the forest
| void makVrv::DtSpeedTreeForest::programBoundCallback | ( | osg::ref_ptr< makOsgSpeedTree::Forest > | pForest, |
| const makOsgSpeedTree::TreeType * | pTreeType, | ||
| uint32 | programID | ||
| ) |
callback from when a shader is loaded in speedtree so VRV can bind its own uniforms
|
virtual |
Indicate to the SpeedTreeForest that it should recompile the SpeedTree (and related) shaders (done in the preUpdateCallback)
|
virtual |
turn tracy on or off
|
virtual |
Runs when the user checks the Use Global Ambient Checkbox.
|
virtual |
Runs when the user checks the Use Global Diffuse Checkbox.
|
virtual |
Runs when the user checks the Display Light Rendering Settings Enable Lighting checkbox.
|
virtual |
handles the flag that sets whether trees should be rendered in the planar reflections.
|
virtual |
called by job system post merge.
|
virtual |
has this forest been initialized yet.
|
virtual |
mutex for preventing the vis manager from being changed during draw
|
virtual |
mutex for preventing the merge and update functions from running at the same time.
| osg::ref_ptr<makOsgSpeedTree::Forest>& makVrv::DtSpeedTreeForest::makSpeedTreeForest | ( | ) |
accessor for the underlying speedtree forest.
|
virtual |
check to see if this forest should be updated this frame and setup the fog color.
This was moved from preUpdate so that it didn't happen in a background thread to avoid threading issues.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
this now just returns the results of the preCullSetup check to see if update should happen this frame or not.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Find a DtModelDefinition* from the model definition name.
|
protected |
No-op. Always returns true.
|
protected |
initialize a tree description.
Pass in the coordinate converter since this can be called from both the main render thread or the merge thread
|
protected |
initialize a tree description.
Pass in the coordinate converter since this can be called from both the main render thread or the merge thread
|
protected |
|
protectedvirtual |
Recursively walk up the scenegraph searching for a node to bind lighting attributes to the shader program.
This method assumes myExt is valid for this object. Returns true if search node was found.
| node | The current node to operate with. |
| programID | The shader program to bind attributes to. |
| osgRenderer | A valid pointer to the renderer. |
| searchNodeName | The node name to search for. |
|
staticprotected |
|
staticprotected |
|
staticprotected |
is the current camera in the render info a reflection camera
|
staticprotected |
|
friend |
|
friend |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The forest is a collection of trees under a group node.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
shader hash for the last shaders passed down to SpeedTree
|
protected |
Should we reload the SpeedTree shaders.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |