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

DtOsgForest provides a way to make lots of trees. More...

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

List of all members.

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 DtTreeRecordfindTreeRecord (DtUniqueID id)
 Find a DtTreeRecord based on it's id.
virtual DtTreeModelfindTreeModel (const std::string &modelDef)
 Find a DtTreeModel from a model definition name.
virtual DtModelInstancefindModelInstance (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 DtOsgModelInstancefindOsgModelInstance (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

Detailed Description

DtOsgForest provides a way to make lots of trees.


Member Typedef Documentation

typedef std::map<DtUniqueID, osg::PositionAttitudeTransform*> makVrv::DtOsgForest::TreePatMap

Constructor & Destructor Documentation

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.


Member Function Documentation

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.

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.


Friends And Related Function Documentation

friend class DtOsgForestClassesCreator [friend]

This allows the protected constructor to be called by the DtOsgForestCreator.

friend class DtOsgForestCreator [friend]

Member Data Documentation

osg::ref_ptr<osg::Group> makVrv::DtOsgForest::myRoot [protected]

The forest is a collection of trees under a group node.

float makVrv::DtOsgForest::myNearLOD [protected]
float makVrv::DtOsgForest::myFarLOD [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)