![]() |
VR-Forces 4.0.4 Class Documentation
|
The base class for simple OSG based model instances. More...

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 ¶mName, const DtModelDefinition &definition) |
| static osg::Vec3 | readVec3 (const std::string ¶mName, 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 |
The base class for simple OSG based model instances.
This call can't be instantiated itself.
| virtual makVrv::DtOsgModelInstance::~DtOsgModelInstance | ( | ) | [virtual] |
DTOR.
| makVrv::DtOsgModelInstance::DtOsgModelInstance | ( | DtDe & | de | ) | [protected] |
CTOR.
| virtual void makVrv::DtOsgModelInstance::addToConnector | ( | DtOsgSceneConnector * | connector | ) | [virtual] |
Brief Tell the model instance to add itself to the provided node.
Reimplemented in makVrv::Dt3DSegmentedLineModelInstance, makVrv::DtPolygonModelInstance, makVrv::Dt3DTextModelInstance, makVrv::DtEffectModelInstance, makVrv::DtExtrudedLineModelInstance, makVrv::DtExtrudedModelInstance, makVrv::DtArticulatingCylinderModelInstance, makVrv::DtEllipsoidArcModelInstance, makVrv::DtAnimationModelInstance, makVrv::DtParticleSystemModelInstance, makVrv::DtCuboidModelInstance, makVrv::DtRibbonModelInstance, makVrv::DtMovablePolygonModel::DtMovablePolygonModelInstance, makVrv::DtDiGuyModelInstance, makVrv::DtDecalModelInstance, makVrv::DtProjectedTextModelInstance, makVrv::DtAttachableEllipsoidArcModelInstance, makVrv::DtScribeBoxModelInstance, and makVrv::DtDrawModelInstance.
| virtual bool makVrv::DtOsgModelInstance::removeFromConnector | ( | DtOsgSceneConnector * | connector | ) | [virtual] |
Brief Tell the model instance to remove itself from the provided node.
Returns true if the node was removed.
Reimplemented in makVrv::Dt3DSegmentedLineModelInstance, makVrv::DtPolygonModelInstance, makVrv::Dt3DTextModelInstance, makVrv::DtEffectModelInstance, makVrv::DtExtrudedLineModelInstance, makVrv::DtExtrudedModelInstance, makVrv::DtArticulatingCylinderModelInstance, makVrv::DtEllipsoidArcModelInstance, makVrv::DtAnimationModelInstance, makVrv::DtParticleSystemModelInstance, makVrv::DtCuboidModelInstance, makVrv::DtRibbonModelInstance, makVrv::DtDiGuyModelInstance, makVrv::DtProjectedTextModelInstance, makVrv::DtDecalModelInstance, makVrv::DtAttachableEllipsoidArcModelInstance, makVrv::DtScribeBoxModelInstance, and makVrv::DtDrawModelInstance.
| 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.
| virtual void makVrv::DtOsgModelInstance::enableColorBlending | ( | bool | b | ) | [virtual] |
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.
osg::ref_ptr<osg::Node> makVrv::DtOsgModelInstance::myModelRoot [protected] |
osg::ref_ptr<osg::StateSet> makVrv::DtOsgModelInstance::myCachedState [protected] |