![]() |
VR-Forces 4.0.4 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. | |
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 Attributes | |
| osg::ref_ptr < osg::PositionAttitudeTransform > | myPat |
| osg::ref_ptr< osg::Geode > | myGeode |
| osg::ref_ptr< DtSpeedTreeDrawable > | myDrawable |
Friends | |
| class | DtSpeedTreeForestClassesCreator |
| This allows the protected constructor to be called by the DtSpeedTreeForestCreator(2). | |
| class | DtSpeedTreeForestCreator |
A DtSpeedTreeForest replaces a DtOsgForest and creates nice looking realistic trees.
| virtual makVrv::DtSpeedTreeForest::~DtSpeedTreeForest | ( | ) | [virtual] |
Destructor.
| makVrv::DtSpeedTreeForest::DtSpeedTreeForest | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) | [protected] |
Constructor is protected because this class is created via the creator pattern.
| virtual void makVrv::DtSpeedTreeForest::removeTree | ( | DtUniqueID | record | ) | [virtual] |
Remove a tree from the forest.
Reimplemented from makVrv::DtOsgForest.
| virtual void makVrv::DtSpeedTreeForest::setTreeClippingPlane | ( | float | fFar | ) | [virtual] |
Set the distance that trees are clipped.
Since trees are expensive, they have their own clipping distances.
Reimplemented from makVrv::DtOsgForest.
| virtual void makVrv::DtSpeedTreeForest::setTreeLodDistances | ( | float | fNear, |
| float | fFar | ||
| ) | [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 void makVrv::DtSpeedTreeForest::setPerformanceProfile | ( | int | profile | ) | [virtual] |
Set the performance profile for the forest.
Reimplemented from makVrv::DtOsgForest.
| virtual void makVrv::DtSpeedTreeForest::addUniqueTree | ( | const DtTreeRecord & | record | ) | [virtual] |
Add a tree to the forest.
Reimplemented from makVrv::DtOsgForest.
| virtual DtSpeedTreeModelInstance* makVrv::DtSpeedTreeForest::findSpeedTreeModelInstance | ( | const std::string & | modelDef | ) | [virtual] |
Find a DtSpeedTreeModelInstance from the model definition name.
Attempt to make a context current.
| virtual void makVrv::DtSpeedTreeForest::slot_treeModelInstanceToBeDestroyed | ( | const std::string & | modelDef | ) | [protected, virtual] |
Called when the model instance for a particular model definition is about to be destroyed.
Reimplemented from makVrv::DtOsgForest.
| virtual void makVrv::DtSpeedTreeForest::slot_treeModelInstanceCreated | ( | const std::string & | modelDef | ) | [protected, virtual] |
Called when the model instance for a particular model definition is created.
Reimplemented from makVrv::DtOsgForest.
| virtual DtTreeModel* makVrv::DtSpeedTreeForest::castUpdaterToTreeModel | ( | DtAgentUpdateResolverInterface * | updater | ) | [protected, virtual] |
Casts a DtAgentUpdateResolverInterface to a DtSpeedTreeModel.
Reimplemented from makVrv::DtForestObject.
| virtual bool makVrv::DtSpeedTreeForest::createTree | ( | const DtTreeRecord & | record | ) | [protected, virtual] |
No-op. Always returns true.
Reimplemented from makVrv::DtOsgForest.
friend class DtSpeedTreeForestClassesCreator [friend] |
This allows the protected constructor to be called by the DtSpeedTreeForestCreator(2).
friend class DtSpeedTreeForestCreator [friend] |
osg::ref_ptr<osg::PositionAttitudeTransform> makVrv::DtSpeedTreeForest::myPat [protected] |
osg::ref_ptr<osg::Geode> makVrv::DtSpeedTreeForest::myGeode [protected] |
osg::ref_ptr<DtSpeedTreeDrawable> makVrv::DtSpeedTreeForest::myDrawable [protected] |