VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | 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]

Public Types

typedef std::map< DtUniqueID,
osg::PositionAttitudeTransform * > 
TreePatMap
- Public Types inherited from makVrv::DtForestObject
typedef boost::unordered_map
< DtUniqueID, DtTreeRecord
TreeRecordMap
typedef boost::unordered_map
< std::string, DtTreeModel * > 
TreeModelMap

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 setTree3DLodDistances (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 getTree3DLodDistances (float &fNear, float &fFar)
 Get the distances for tree LOD's.
virtual void setTreeBillboardDistances (float fStart, float fEnd)
 Set the distances for tree billboards.
virtual void getTreeBillboardDistances (float &fStart, float &fEnd)
 Get the distances for tree billboards.
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.
- Public Member Functions inherited from makVrv::DtForestObject
virtual ~DtForestObject ()
 Destructor.
virtual DtDede ()
 IG accessor.
void addTree (const DtTreeRecord &record)
 Add a tree to the forest.
virtual DtModelDefinitionfindModelDefinition (const std::string &modelDef)
 Find a DtModelDefinition* from the model definition name.
virtual const TreeRecordMaptreeRecordMap () const
 Return the treeRecordMap.

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 Member Functions inherited from makVrv::DtForestObject
 DtForestObject (DtDe &de, DtUniqueID id)
 Constructor is protected because this class is created via the creator pattern.
virtual DtTreeModelcastUpdaterToTreeModel (DtAgentUpdateResolverInterface *updater)
 Casts a DtAgentUpdateResolverInterface to a DtTreeModel.

Protected Attributes

TreePatMap myTreePatMap
osg::ref_ptr< osg::Group > myRoot
 The forest is a collection of trees under a group node.
float myFarPlane
float myHighDetail3dDistance
float myLowDetail3dDistance
float myBillboardStartDistance
float myBillboardEndDistance
- Protected Attributes inherited from makVrv::DtForestObject
DtDemyDe
TreeRecordMap myTreeRecordMap
TreeModelMap myTreeModelMap

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::setTree3DLodDistances ( 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::getTree3DLodDistances ( float &  fNear,
float &  fFar 
)
virtual

Get the distances for tree LOD's.

Implements makVrv::DtForestObject.

virtual void makVrv::DtOsgForest::setTreeBillboardDistances ( float  fStart,
float  fEnd 
)
virtual

Set the distances for tree billboards.

Implements makVrv::DtForestObject.

Reimplemented in makVrv::DtSpeedTreeForest.

virtual void makVrv::DtOsgForest::getTreeBillboardDistances ( float &  fStart,
float &  fEnd 
)
virtual

Get the distances for tree billboards.

Implements makVrv::DtForestObject.

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)
protectedvirtual

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)
protectedvirtual
virtual DtOsgModelInstance* makVrv::DtOsgForest::findOsgModelInstance ( const std::string &  modelDef)
protectedvirtual

Find a DtOsgModelInstance from a model definition name.

virtual osg::PositionAttitudeTransform* makVrv::DtOsgForest::findPat ( const DtUniqueID  id)
protectedvirtual

Find a osg::PositionAttitudeTransform* from an id.

virtual void makVrv::DtOsgForest::removePat ( const DtUniqueID  id)
protectedvirtual

Find a osg::PositionAttitudeTransform* from an id.

virtual void makVrv::DtOsgForest::slot_treeModelInstanceToBeDestroyed ( const std::string &  modelDef)
protectedvirtual

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)
protectedvirtual

Remove a DtTreeModel of a particular model definition.

Implements makVrv::DtForestObject.

virtual void makVrv::DtOsgForest::slot_treeModelInstanceCreated ( const std::string &  modelDef)
protectedvirtual

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

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::myHighDetail3dDistance
protected
float makVrv::DtOsgForest::myLowDetail3dDistance
protected
float makVrv::DtOsgForest::myBillboardStartDistance
protected
float makVrv::DtOsgForest::myBillboardEndDistance
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)