![]() |
VR-Forces 4.1 Class Documentation
|
A DtSpeedTreeForest replaces a DtOsgForest and creates nice looking realistic trees. More...

Public Member Functions | |
| virtual | ~DtSpeedTreeForest () |
| Destructor. | |
Driver bound methods | |
These methods are bound to the driver. | |
| virtual void | removeTree (DtUniqueID record) |
| Remove a tree from the forest. | |
| virtual void | setTreeClippingPlane (float fFar) |
| Set the distance that trees are clipped. | |
| virtual void | setTreeLodDistances (float fNear, float fFar) |
| Set the distances for tree LOD's. | |
| virtual void | setPerformanceProfile (int profile) |
| Set the performance profile for the forest. | |
Unbound methods | |
These methods are NOT bound to the driver. | |
| virtual void | addUniqueTree (const DtTreeRecord &record) |
| Add a tree to the forest. | |
| virtual DtSpeedTreeModelInstance * | findSpeedTreeModelInstance (const std::string &modelDef) |
| Find a DtSpeedTreeModelInstance from the model definition name. | |
| bool | makeContextCurrent () |
| Attempt to make a context current. | |
Public Member Functions inherited from makVrv::DtOsgForest | |
| virtual | ~DtOsgForest () |
| Destructor. | |
| virtual void | removeAllTrees () |
| Remove all trees. | |
| virtual void | getTreeClippingPlane (float &fFar) |
| Get the distance that trees are clipped. | |
| virtual void | getTreeLodDistances (float &fNear, float &fFar) |
| Get the distances for tree LOD's. | |
| unsigned int | treeCount () const |
| Get the number of trees. | |
| virtual DtTreeRecord * | findTreeRecord (DtUniqueID id) |
| Find a DtTreeRecord based on it's id. | |
| virtual DtTreeModel * | findTreeModel (const std::string &modelDef) |
| Find a DtTreeModel from a model definition name. | |
| virtual DtModelInstance * | findModelInstance (const std::string &modelDef) |
| Find a DtModelInstance from a model definition name. | |
| virtual osg::Group * | rootGroup () |
| Get the root group node. | |
Public Member Functions inherited from makVrv::DtForestObject | |
| virtual | ~DtForestObject () |
| Destructor. | |
| virtual DtDe & | de () |
| IG accessor. | |
| void | addTree (const DtTreeRecord &record) |
| Add a tree to the forest. | |
| virtual DtModelDefinition * | findModelDefinition (const std::string &modelDef) |
| Find a DtModelDefinition* from the model definition name. | |
| virtual const TreeRecordMap & | treeRecordMap () const |
| Return the treeRecordMap. | |
Protected Member Functions | |
| DtSpeedTreeForest (DtDe &de, DtUniqueID id) | |
| Constructor is protected because this class is created via the creator pattern. | |
| virtual void | slot_treeModelInstanceToBeDestroyed (const std::string &modelDef) |
| Called when the model instance for a particular model definition is about to be destroyed. | |
| virtual void | slot_treeModelInstanceCreated (const std::string &modelDef) |
| Called when the model instance for a particular model definition is created. | |
| virtual DtTreeModel * | castUpdaterToTreeModel (DtAgentUpdateResolverInterface *updater) |
| Casts a DtAgentUpdateResolverInterface to a DtSpeedTreeModel. | |
| virtual bool | createTree (const DtTreeRecord &record) |
| No-op. Always returns true. | |
Protected Member Functions inherited from makVrv::DtOsgForest | |
| DtOsgForest (DtDe &de, DtUniqueID id) | |
| Constructor is protected because this class is created via the creator pattern. | |
| virtual osg::PositionAttitudeTransform * | createPat (const DtTreeRecord &record) |
| virtual DtOsgModelInstance * | findOsgModelInstance (const std::string &modelDef) |
| Find a DtOsgModelInstance from a model definition name. | |
| virtual osg::PositionAttitudeTransform * | findPat (const DtUniqueID id) |
| Find a osg::PositionAttitudeTransform* from an id. | |
| virtual void | removePat (const DtUniqueID id) |
| Find a osg::PositionAttitudeTransform* from an id. | |
| virtual void | removeTreeModel (const std::string &modelDef) |
| Remove a DtTreeModel of a particular model definition. | |
Protected Member Functions inherited from makVrv::DtForestObject | |
| DtForestObject (DtDe &de, DtUniqueID id) | |
| Constructor is protected because this class is created via the creator pattern. | |
Protected Attributes | |
| osg::ref_ptr < osg::PositionAttitudeTransform > | myPat |
| osg::ref_ptr< osg::Geode > | myGeode |
| osg::ref_ptr< DtSpeedTreeDrawable > | myDrawable |
Protected Attributes inherited from makVrv::DtOsgForest | |
| TreePatMap | myTreePatMap |
| osg::ref_ptr< osg::Group > | myRoot |
| The forest is a collection of trees under a group node. | |
| float | myFarPlane |
| float | myNearLOD |
| float | myFarLOD |
Protected Attributes inherited from makVrv::DtForestObject | |
| DtDe & | myDe |
| TreeRecordMap | myTreeRecordMap |
| TreeModelMap | myTreeModelMap |
Friends | |
| class | DtSpeedTreeForestClassesCreator |
| This allows the protected constructor to be called by the DtSpeedTreeForestCreator(2). | |
| class | DtSpeedTreeForestCreator |
Additional Inherited Members | |
Public Types inherited from makVrv::DtOsgForest | |
| typedef std::map< DtUniqueID, osg::PositionAttitudeTransform * > | TreePatMap |
A DtSpeedTreeForest replaces a DtOsgForest and creates nice looking realistic trees.
|
virtual |
Destructor.
|
protected |
Constructor is protected because this class is created via the creator pattern.
|
virtual |
Remove a tree from the forest.
Reimplemented from makVrv::DtOsgForest.
|
virtual |
Set the distance that trees are clipped.
Since trees are expensive, they have their own clipping distances.
Reimplemented from makVrv::DtOsgForest.
|
virtual |
Set the distances for tree LOD's.
float fNear - This parameter represents the distance from the camera where the highest LOD (1.0) begins. Trees that are closer to the camera than this distance retain a 1.0 LOD. Trees farther away than this distance are assigned an LOD value approaching 0.0 as they move toward the far LOD plane. fNear is set using world units, determine solely by the application. float fFar - This parameter represents the distance from the camera where the lowest LOD (0.0) begins. Trees that are farther from the camera than this distance retain a 0.0 LOD. Trees closer than this distance are assigned an LOD value approaching 1.0 as they move toward the near LOD plane. fFar is set using world units, determine solely by the application.
Reimplemented from makVrv::DtOsgForest.
|
virtual |
Set the performance profile for the forest.
Reimplemented from makVrv::DtOsgForest.
|
virtual |
Add a tree to the forest.
Reimplemented from makVrv::DtOsgForest.
|
virtual |
Find a DtSpeedTreeModelInstance from the model definition name.
| bool makVrv::DtSpeedTreeForest::makeContextCurrent | ( | ) |
Attempt to make a context current.
|
protectedvirtual |
Called when the model instance for a particular model definition is about to be destroyed.
Reimplemented from makVrv::DtOsgForest.
|
protectedvirtual |
Called when the model instance for a particular model definition is created.
Reimplemented from makVrv::DtOsgForest.
|
protectedvirtual |
Casts a DtAgentUpdateResolverInterface to a DtSpeedTreeModel.
Reimplemented from makVrv::DtForestObject.
|
protectedvirtual |
No-op. Always returns true.
Reimplemented from makVrv::DtOsgForest.
|
friend |
This allows the protected constructor to be called by the DtSpeedTreeForestCreator(2).
|
friend |
|
protected |
|
protected |
|
protected |