VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOsgModelInstance Class Reference

The base class for simple OSG based model instances. More...

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

List of all members.

Public Member Functions

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 void setVisibleViaSwitch (bool useSwitch)
 Intentionally do nothing.
virtual osg::Node * rootNode ()
 Get the model instance's root node.
virtual const osg::Node * rootNode () const
 Get the model instance's root node.

Static Public Member Functions

static osg::Vec4 readVec4 (const std::string &paramName, const DtModelDefinition &definition)
static osg::Vec3 readVec3 (const std::string &paramName, const DtModelDefinition &definition)

Protected Member Functions

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

osg::ref_ptr< osg::Node > myModelRoot
osg::ref_ptr< osg::StateSet > myCachedState

Detailed Description

The base class for simple OSG based model instances.

This call can't be instantiated itself.


Constructor & Destructor Documentation

DTOR.

CTOR.


Member Function Documentation

virtual void makVrv::DtOsgModelInstance::addToConnector ( DtOsgSceneConnector connector) [virtual]
virtual osg::Node* makVrv::DtOsgModelInstance::rootNode ( ) [virtual]

Get the model instance's root node.

Reimplemented in makVrv::DtSpeedTreeModelInstance.

virtual const osg::Node* makVrv::DtOsgModelInstance::rootNode ( ) const [virtual]

Get the model instance's root node.

virtual bool makVrv::DtOsgModelInstance::saveModelToFile ( const std::string &  filename) const [virtual]

Attempt to save the model to a file.

Reimplemented from makVrv::DtModelInstance.

Enable / disable coloring on all models in the scene object.

Reimplemented from makVrv::DtModelInstance.

virtual void makVrv::DtOsgModelInstance::setBlendColor ( float  r,
float  g,
float  b,
float  a 
) [virtual]

set the model's color

Reimplemented from makVrv::DtModelInstance.

virtual void makVrv::DtOsgModelInstance::enableTexture ( bool  onOff) [virtual]
static osg::Vec4 makVrv::DtOsgModelInstance::readVec4 ( const std::string &  paramName,
const DtModelDefinition definition 
) [static]
static osg::Vec3 makVrv::DtOsgModelInstance::readVec3 ( const std::string &  paramName,
const DtModelDefinition definition 
) [static]
virtual void makVrv::DtOsgModelInstance::setVisibleViaSwitch ( bool  useSwitch) [virtual]

Intentionally do nothing.

Implements makVrv::DtModelInstance.

Reimplemented in makVrv::DtOsgSimpleModelInstance.

virtual void makVrv::DtOsgModelInstance::updateColorBlending ( ) [protected, virtual]

calls update color blending with the model root.

Override to use a different root

Reimplemented in makVrv::DtDiGuyModelInstance.

virtual void makVrv::DtOsgModelInstance::updateColorBlending ( osg::Node *  node) [protected, virtual]
virtual void makVrv::DtOsgModelInstance::enableTexture ( osg::Node *  root,
bool  onOff 
) [protected, virtual]
virtual void makVrv::DtOsgModelInstance::updateBoundingBoxViaContents ( ) [protected, virtual]

Reimplemented in makVrv::DtDiGuyModelInstance.

virtual void makVrv::DtOsgModelInstance::setRootNode ( osg::Node *  node) [protected, virtual]

Set the model instance's root node.


Member Data Documentation

osg::ref_ptr<osg::Node> makVrv::DtOsgModelInstance::myModelRoot [protected]
osg::ref_ptr<osg::StateSet> makVrv::DtOsgModelInstance::myCachedState [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)