![]() |
VR-Forces 4.0.4 Class Documentation
|
DtOsgForest provides a way to make lots of trees. More...

Public Types | |
| typedef std::map< DtUniqueID, osg::PositionAttitudeTransform * > | TreePatMap |
Public Member Functions | |
| virtual | ~DtOsgForest () |
| Destructor. | |
Driver bound methods | |
These methods are bound to the driver. | |
| virtual void | removeTree (DtUniqueID id) |
| Remove a tree from the forest. | |
| virtual void | removeAllTrees () |
| Remove all trees. | |
| 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 | getTreeClippingPlane (float &fFar) |
| Get the distance that trees are clipped. | |
| virtual void | getTreeLodDistances (float &fNear, float &fFar) |
| Get 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. | |
| 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. | |
Protected Member Functions | |
| DtOsgForest (DtDe &de, DtUniqueID id) | |
| Constructor is protected because this class is created via the creator pattern. | |
| virtual bool | createTree (const DtTreeRecord &record) |
| Create a Tree instance and add it to the group root node. | |
| 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 | slot_treeModelInstanceToBeDestroyed (const std::string &modelDef) |
| Called when the model instance for a particular model definition is about to be destroyed. | |
| virtual void | removeTreeModel (const std::string &modelDef) |
| Remove a DtTreeModel of a particular model definition. | |
| virtual void | slot_treeModelInstanceCreated (const std::string &modelDef) |
| Called when the model instance for a particular model definition is created. | |
Protected Attributes | |
| 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 |
Friends | |
| class | DtOsgForestClassesCreator |
| This allows the protected constructor to be called by the DtOsgForestCreator. | |
| class | DtOsgForestCreator |
DtOsgForest provides a way to make lots of trees.
| typedef std::map<DtUniqueID, osg::PositionAttitudeTransform*> makVrv::DtOsgForest::TreePatMap |
| virtual makVrv::DtOsgForest::~DtOsgForest | ( | ) | [virtual] |
Destructor.
| makVrv::DtOsgForest::DtOsgForest | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) | [protected] |
Constructor is protected because this class is created via the creator pattern.
| virtual void makVrv::DtOsgForest::removeTree | ( | DtUniqueID | id | ) | [virtual] |
Remove a tree from the forest.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
| virtual void makVrv::DtOsgForest::removeAllTrees | ( | ) | [virtual] |
Remove all trees.
Implements makVrv::DtForestObject.
| virtual void makVrv::DtOsgForest::setTreeClippingPlane | ( | float | fFar | ) | [virtual] |
Set the distance that trees are clipped.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
| virtual void makVrv::DtOsgForest::setTreeLodDistances | ( | float | fNear, |
| float | fFar | ||
| ) | [virtual] |
Set the distances for tree LOD's.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
| virtual void makVrv::DtOsgForest::getTreeClippingPlane | ( | float & | fFar | ) | [virtual] |
Get the distance that trees are clipped.
Implements makVrv::DtForestObject.
| virtual void makVrv::DtOsgForest::getTreeLodDistances | ( | float & | fNear, |
| float & | fFar | ||
| ) | [virtual] |
Get the distances for tree LOD's.
Implements makVrv::DtForestObject.
| virtual void makVrv::DtOsgForest::setPerformanceProfile | ( | int | profile | ) | [virtual] |
Set the performance profile for the forest.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
| virtual void makVrv::DtOsgForest::addUniqueTree | ( | const DtTreeRecord & | record | ) | [virtual] |
Add a tree to the forest.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
| unsigned int makVrv::DtOsgForest::treeCount | ( | ) | const |
Get the number of trees.
| virtual DtTreeRecord* makVrv::DtOsgForest::findTreeRecord | ( | DtUniqueID | id | ) | [virtual] |
Find a DtTreeRecord based on it's id.
Implements makVrv::DtForestObject.
| virtual DtTreeModel* makVrv::DtOsgForest::findTreeModel | ( | const std::string & | modelDef | ) | [virtual] |
Find a DtTreeModel from a model definition name.
Implements makVrv::DtForestObject.
| virtual DtModelInstance* makVrv::DtOsgForest::findModelInstance | ( | const std::string & | modelDef | ) | [virtual] |
Find a DtModelInstance from a model definition name.
Implements makVrv::DtForestObject.
| virtual osg::Group* makVrv::DtOsgForest::rootGroup | ( | ) | [virtual] |
Get the root group node.
| virtual bool makVrv::DtOsgForest::createTree | ( | const DtTreeRecord & | record | ) | [protected, virtual] |
Create a Tree instance and add it to the group root node.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
| virtual osg::PositionAttitudeTransform* makVrv::DtOsgForest::createPat | ( | const DtTreeRecord & | record | ) | [protected, virtual] |
| virtual DtOsgModelInstance* makVrv::DtOsgForest::findOsgModelInstance | ( | const std::string & | modelDef | ) | [protected, virtual] |
Find a DtOsgModelInstance from a model definition name.
| virtual osg::PositionAttitudeTransform* makVrv::DtOsgForest::findPat | ( | const DtUniqueID | id | ) | [protected, virtual] |
Find a osg::PositionAttitudeTransform* from an id.
| virtual void makVrv::DtOsgForest::removePat | ( | const DtUniqueID | id | ) | [protected, virtual] |
Find a osg::PositionAttitudeTransform* from an id.
| virtual void makVrv::DtOsgForest::slot_treeModelInstanceToBeDestroyed | ( | const std::string & | modelDef | ) | [protected, virtual] |
Called when the model instance for a particular model definition is about to be destroyed.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
| virtual void makVrv::DtOsgForest::removeTreeModel | ( | const std::string & | modelDef | ) | [protected, virtual] |
Remove a DtTreeModel of a particular model definition.
Implements makVrv::DtForestObject.
| virtual void makVrv::DtOsgForest::slot_treeModelInstanceCreated | ( | const std::string & | modelDef | ) | [protected, virtual] |
Called when the model instance for a particular model definition is created.
Implements makVrv::DtForestObject.
Reimplemented in makVrv::DtSpeedTreeForest.
friend class DtOsgForestClassesCreator [friend] |
This allows the protected constructor to be called by the DtOsgForestCreator.
friend class DtOsgForestCreator [friend] |
TreePatMap makVrv::DtOsgForest::myTreePatMap [protected] |
osg::ref_ptr<osg::Group> makVrv::DtOsgForest::myRoot [protected] |
The forest is a collection of trees under a group node.
float makVrv::DtOsgForest::myFarPlane [protected] |
float makVrv::DtOsgForest::myNearLOD [protected] |
float makVrv::DtOsgForest::myFarLOD [protected] |