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

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

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

List of all members.

Public Types

typedef std::map< DtUniqueID,
DtTreeRecord
TreeRecordMap
typedef std::map< std::string,
DtTreeModel * > 
TreeModelMap

Public Member Functions

virtual ~DtForestObject ()
 Destructor.
virtual DtDede ()
 IG accessor.
Driver bound methods

These methods are bound to the driver.

void addTree (const DtTreeRecord &record)
 Add a tree to the forest.
virtual void removeTree (DtUniqueID treeId)=0
 Remove a tree from the forest.
virtual void removeAllTrees ()=0
 Remove all trees.
virtual void setTreeClippingPlane (float fFar)=0
 Set the distance that trees are clipped.
virtual void getTreeClippingPlane (float &fFar)=0
 Get the clipping planes.
virtual void setTreeLodDistances (float fNear, float fFar)=0
 Set the distances for tree LOD's.
virtual void getTreeLodDistances (float &fNear, float &fFar)=0
 Set the distances for tree LOD's.
virtual void setPerformanceProfile (int profile)=0
 Set the performance profile for the forest.
Unbound methods

These methods are NOT bound to the driver.

virtual void addUniqueTree (const DtTreeRecord &record)=0
 Add a tree to the forest.
virtual DtTreeRecordfindTreeRecord (DtUniqueID id)=0
 Find a DtTreeRecord based on it's id.
virtual DtTreeModelfindTreeModel (const std::string &modelDef)=0
 Find a DtTreeModel from a model definition name.
virtual DtModelInstancefindModelInstance (const std::string &modelDef)=0
 Find a DtModelInstance from a model definition name.
virtual DtModelDefinitionfindModelDefinition (const std::string &modelDef)
 Find a DtModelDefinition* from the model definition name.
virtual const TreeRecordMaptreeRecordMap () const
 Return the treeRecordMap.

Protected Member Functions

 DtForestObject (DtDe &de, DtUniqueID id)
 Constructor is protected because this class is created via the creator pattern.
virtual bool createTree (const DtTreeRecord &record)=0
 Create a Tree instance.
virtual void slot_treeModelInstanceToBeDestroyed (const std::string &modelDef)=0
 Called when the model instance for a particular model definition is about to be destroyed.
virtual void removeTreeModel (const std::string &modelDef)=0
 Remove a DtTreeModel of a particular model definition.
virtual void slot_treeModelInstanceCreated (const std::string &modelDef)=0
 Called when the model instance for a particular model definition is created.
virtual DtTreeModelcastUpdaterToTreeModel (DtAgentUpdateResolverInterface *updater)
 Casts a DtAgentUpdateResolverInterface to a DtTreeModel.

Protected Attributes

DtDemyDe
TreeRecordMap myTreeRecordMap
TreeModelMap myTreeModelMap

Friends

class DtForestObjectClassesCreator
 This allows the protected constructor to be called by the DtForestCreator(2).
class DtForestCreator

Detailed Description

DtForestObject provides a way to make lots of trees.


Member Typedef Documentation

typedef std::map<std::string, DtTreeModel*> makVrv::DtForestObject::TreeModelMap

Constructor & Destructor Documentation

Destructor.

makVrv::DtForestObject::DtForestObject ( DtDe de,
DtUniqueID  id 
) [protected]

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


Member Function Documentation

Add a tree to the forest.

Non virtual. Calls virtual method addUniqueTree().

virtual void makVrv::DtForestObject::removeTree ( DtUniqueID  treeId) [pure virtual]

Remove a tree from the forest.

Implemented in makVrv::DtSpeedTreeForest, and makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::removeAllTrees ( ) [pure virtual]

Remove all trees.

Implemented in makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::setTreeClippingPlane ( float  fFar) [pure virtual]

Set the distance that trees are clipped.

Not implemented in DtOsgForest (only DtSpeedTreeForest).

Implemented in makVrv::DtOsgForest, and makVrv::DtSpeedTreeForest.

virtual void makVrv::DtForestObject::getTreeClippingPlane ( float &  fFar) [pure virtual]

Get the clipping planes.

Implemented in makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::setTreeLodDistances ( float  fNear,
float  fFar 
) [pure virtual]

Set the distances for tree LOD's.

Not implemented in DtOsgForest (only DtSpeedTreeForest).

Implemented in makVrv::DtSpeedTreeForest, and makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::getTreeLodDistances ( float &  fNear,
float &  fFar 
) [pure virtual]

Set the distances for tree LOD's.

Not implemented in DtOsgForest (only DtSpeedTreeForest).

Implemented in makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::setPerformanceProfile ( int  profile) [pure virtual]

Set the performance profile for the forest.

Implemented in makVrv::DtSpeedTreeForest, and makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::addUniqueTree ( const DtTreeRecord record) [pure virtual]

Add a tree to the forest.

Implemented in makVrv::DtSpeedTreeForest, and makVrv::DtOsgForest.

Find a DtTreeRecord based on it's id.

Implemented in makVrv::DtOsgForest.

virtual DtTreeModel* makVrv::DtForestObject::findTreeModel ( const std::string &  modelDef) [pure virtual]

Find a DtTreeModel from a model definition name.

Implemented in makVrv::DtOsgForest.

virtual DtModelInstance* makVrv::DtForestObject::findModelInstance ( const std::string &  modelDef) [pure virtual]

Find a DtModelInstance from a model definition name.

Implemented in makVrv::DtOsgForest.

virtual DtModelDefinition* makVrv::DtForestObject::findModelDefinition ( const std::string &  modelDef) [virtual]

Find a DtModelDefinition* from the model definition name.

virtual const TreeRecordMap& makVrv::DtForestObject::treeRecordMap ( ) const [virtual]

Return the treeRecordMap.

virtual DtDe& makVrv::DtForestObject::de ( ) [virtual]

IG accessor.

virtual bool makVrv::DtForestObject::createTree ( const DtTreeRecord record) [protected, pure virtual]

Create a Tree instance.

Implemented in makVrv::DtSpeedTreeForest, and makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::slot_treeModelInstanceToBeDestroyed ( const std::string &  modelDef) [protected, pure virtual]

Called when the model instance for a particular model definition is about to be destroyed.

Implemented in makVrv::DtOsgForest, and makVrv::DtSpeedTreeForest.

virtual void makVrv::DtForestObject::removeTreeModel ( const std::string &  modelDef) [protected, pure virtual]

Remove a DtTreeModel of a particular model definition.

Implemented in makVrv::DtOsgForest.

virtual void makVrv::DtForestObject::slot_treeModelInstanceCreated ( const std::string &  modelDef) [protected, pure virtual]

Called when the model instance for a particular model definition is created.

Implemented in makVrv::DtOsgForest, and makVrv::DtSpeedTreeForest.


Friends And Related Function Documentation

friend class DtForestObjectClassesCreator [friend]

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

friend class DtForestCreator [friend]

Member Data Documentation


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)