VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtSpeedTreeForest Class Reference

A DtSpeedTreeForest replaces a DtOsgForest and creates nice looking realistic trees. More...

Inheritance diagram for makVrv::DtSpeedTreeForest:
Inheritance graph
[legend]

List of all members.

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 DtSpeedTreeModelInstancefindSpeedTreeModelInstance (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 DtTreeModelcastUpdaterToTreeModel (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< DtSpeedTreeDrawablemyDrawable

Friends

class DtSpeedTreeForestClassesCreator
 This allows the protected constructor to be called by the DtSpeedTreeForestCreator(2).
class DtSpeedTreeForestCreator

Detailed Description

A DtSpeedTreeForest replaces a DtOsgForest and creates nice looking realistic trees.


Constructor & Destructor Documentation

Destructor.

Constructor is protected because this class is created via the creator pattern.


Member Function Documentation

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 bool makVrv::DtSpeedTreeForest::createTree ( const DtTreeRecord record) [protected, virtual]

No-op. Always returns true.

Reimplemented from makVrv::DtOsgForest.


Friends And Related Function Documentation

friend class DtSpeedTreeForestClassesCreator [friend]

This allows the protected constructor to be called by the DtSpeedTreeForestCreator(2).

friend class DtSpeedTreeForestCreator [friend]

Member Data Documentation

osg::ref_ptr<osg::PositionAttitudeTransform> makVrv::DtSpeedTreeForest::myPat [protected]
osg::ref_ptr<osg::Geode> makVrv::DtSpeedTreeForest::myGeode [protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)