VR-Forces 4.1 Class Documentation
List of all members | Public Member Functions
makVrv::DtSpeedTreeModelInstance Class Reference

A DtSpeedTreeModelInstance is a type of model instance that can get created for a DtTreeModel. More...

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

Public Member Functions

 DtSpeedTreeModelInstance (DtDe &de)
 CTOR.
virtual ~DtSpeedTreeModelInstance ()
 DTOR.
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition.
virtual osg::Node * rootNode ()
 Get the model instance's root node. This will always return null.
virtual void setVisible (bool isVisible)
 no-op
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 DTOR.
virtual void addToConnector (DtOsgSceneConnector *connector)
 Brief Tell the model instance to add itself to the provided node.
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 Brief Tell the model instance to remove itself from the provided node.
virtual bool saveModelToFile (const std::string &filename) const
 Attempt to save the model to a file.
virtual void enableColorBlending (bool b)
 Enable / disable coloring on all models in the scene object.
virtual void setBlendColor (float r, float g, float b, float a)
 set the model's color
virtual void enableTexture (bool onOff)
virtual const osg::Node * rootNode () const
 Get the model instance's root node.
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 CTOR.
virtual ~DtModelInstance ()
 DTOR.
const std::string & realizedDefinitionName () const
 Get the name of the definition that this model instance was realized with.
const DtVectorboundingBoxExtents () const
 Get the bounding box extents of the model instance.
void getBoundingBoxExtents (double &x, double &y, double &z) const
 Get the bounding box extents of the model instance.
const DtVectorboundingBoxCenter () const
 Get the bounding box center of the model instance.
void getBoundingBoxCenter (double &x, double &y, double &z) const
 Get the bounding box center of the model instance.
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
virtual void setContributesToBound (bool trueOrFalse)
 Set whether this model instance contributes to an object's overall bounding volume.
bool contributesToBound () const
 Get whether this model instance contributes to an object's overall bounding volume.

Additional Inherited Members

- Static Public Member Functions inherited from makVrv::DtOsgModelInstance
static osg::Vec4 readVec4 (const std::string &paramName, const DtModelDefinition &definition)
static osg::Vec3 readVec3 (const std::string &paramName, const DtModelDefinition &definition)
- Public Attributes inherited from makVrv::DtModelInstance
boost::signal< void(DtModelInstance *)> signal_modelInstanceChanged
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
virtual void updateColorBlending ()
 calls update color blending with the model root.
virtual void updateColorBlending (osg::Node *node)
virtual void enableTexture (osg::Node *root, bool onOff)
virtual void updateBoundingBoxViaContents ()
 DtOsgModelInstance (DtDe &de)
 CTOR.
virtual void setRootNode (osg::Node *node)
 Set the model instance's root node.
- Protected Attributes inherited from makVrv::DtOsgModelInstance
osg::ref_ptr< osg::Node > myModelRoot
osg::ref_ptr< osg::StateSet > myCachedState

Detailed Description

A DtSpeedTreeModelInstance is a type of model instance that can get created for a DtTreeModel.

A DtSpeedTreeModelInstance exists to return a a null rootNode() and therefore let a DtSpeedTreeForest know to create a SpeedTree instead of a normal tree. DtTreeModels produce "normal" trees which are added to a DtOsgForest however, if the SpeedTree plugin is loaded, then a DtTreeModel creates a DtSpeedTreeModelInstance when a tree is added to a DtSpeedTreeForest. When the model instance is created a DtModelInstanceOwner emits a signal saying so.

Constructor & Destructor Documentation

makVrv::DtSpeedTreeModelInstance::DtSpeedTreeModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtSpeedTreeModelInstance::~DtSpeedTreeModelInstance ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtSpeedTreeModelInstance::realize ( DtModelDefinition definition)
virtual

Attempt to realize a definition.

If the model instance can't realize the definition it should return false. This will return false if the definition doesn't contain a "speedTreeFilename" parameter;

Reimplemented from makVrv::DtModelInstance.

virtual osg::Node* makVrv::DtSpeedTreeModelInstance::rootNode ( )
virtual

Get the model instance's root node. This will always return null.

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtSpeedTreeModelInstance::setVisible ( bool  isVisible)
inlinevirtual

no-op

Implements makVrv::DtModelInstance.


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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)