![]() |
VR-Forces Developer's Guide
|
The base class for simple OSG based model instances. This call can't be instantiated itself.

Public Types | |
| enum | AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON } |
Public Member Functions | |
| virtual | ~DtOsgModelInstance () |
| virtual bool | realize (const DtModelDefinition &definition) |
| virtual bool | cloneInstance (const DtModelDefinition &definition) |
| virtual void | addToConnector (DtOsgSceneConnector *connector) |
| virtual bool | removeFromConnector (DtOsgSceneConnector *connector) |
| virtual bool | saveModelToFile (const std::string &filename) const |
| virtual void | enableColorBlending (bool b) |
| virtual void | setBlendColor (float r, float g, float b, float a) |
| virtual void | enableTexture (bool onOff) |
| virtual osg::Node * | rootNode () |
| virtual const osg::Node * | rootNode () const |
| virtual osg::Node * | sensorNode () |
| virtual const osg::Node * | sensorNode () const |
Public Member Functions inherited from makVrv::DtModelInstance | |
| DtModelInstance (DtDe &de) | |
| virtual | ~DtModelInstance () |
| const std::string & | realizedDefinitionName () const |
| const DtVector & | boundingBoxExtents () const |
| void | getBoundingBoxExtents (double &x, double &y, double &z) const |
| const DtVector & | boundingBoxCenter () const |
| void | getBoundingBoxCenter (double &x, double &y, double &z) const |
| void | getBoundingBoxComponents (DtVector &minimum, DtVector &maximum) |
| const DtVector & | allGeometryboundingBoxExtents () const |
| void | getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const |
| const DtVector & | allGeometryboundingBoxCenter () const |
| void | getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const |
| void | getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum) |
| virtual void | setContributesToBound (bool trueOrFalse) |
| bool | contributesToBound () const |
| virtual void | setVisible (bool isVisible)=0 |
Protected Member Functions | |
| DtOsgModelInstance (DtDe &de) | |
| virtual void | updateColorBlending () |
| virtual void | updateColorBlending (osg::Node *node) |
| virtual void | enableTexture (osg::Node *root, bool onOff) |
| virtual void | updateBoundingBoxViaContents () |
| virtual void | setRootNode (osg::Node *node) |
| virtual void | setUpDepthTest (osg::StateSet *stateSet) |
Additional Inherited Members | |
Static Public Member Functions inherited from makVrv::DtModelInstance | |
| static float | readFloat (const std::string ¶mName, const DtModelDefinition &definition) |
| static DtVector | readVector (const std::string ¶mName, const DtModelDefinition &definition) |
| static DtVector4< float > | readVector4 (const std::string ¶mName, const DtModelDefinition &definition) |
Public Attributes inherited from makVrv::DtModelInstance | |
| boost::signalslib::signal < void(DtModelInstance *)> | signal_modelInstanceChanged |
| typedef std::unordered_map<std::string, bool> makVrv::DtOsgModelInstance::SensorRegionStateMap |
Dynamic Sensor Region methods.
How Dynamic Sensor Region states are stored
|
virtual |
DTOR.
|
protected |
CTOR.
|
virtual |
Attempt to realize a definition. If the model instance can't realize the definition it should return false.
Reimplemented from makVrv::DtModelInstance.
Reimplemented in makVrv::DtAttachableEllipsoidArcModelInstance, makVrv::DtOsgOverlayEllipseArcModelInstance, makVrv::DtArcModelInstance, makVrv::DtOsgOverlayDirectionLineModelInstance, makVrv::Dt3DSegmentedLineModelInstance, makVrv::DtExtrudedLineModelInstance, makVrv::Dt3DTextModelInstance, makVrv::DtEllipsoidArcModelInstance, makVrv::DtFxParticleSystemModelInstance, makVrv::DtCuboidModelInstance, makVrv::DtRibbonModelInstance, makVrv::DtArticulatingCylinderModelInstance, makVrv::DtCubeModelInstance, makVrv::DtPolygonModelInstance, makVrv::DtEllipsoidModelInstance, makVrv::DtTacticalSmokeModelInstance, makVrv::DtCylinderModelInstance, makVrv::DtDecalModelInstance, makVrv::DtParticleSystemModelInstance, makVrv::DtDiGuyModelInstance, makVrv::DtRectangularPyramidModelInstance, makVrv::Dt3DGreatCircleArcModelInstance, and makVrv::DtOsgSimpleModelInstance.
|
virtual |
Attempt to clone the basic geometry. Can be done in the background. If the model instance can't clone the definition it should return false.
Reimplemented from makVrv::DtModelInstance.
Reimplemented in makVrv::DtOsgSimpleModelInstance.
|
virtual |
Brief Tell the model instance to add itself to the provided node.
Reimplemented in makVrv::DtAttachableEllipsoidArcModelInstance, makVrv::Dt3DSegmentedLineModelInstance, makVrv::DtPolygonModelInstance, makVrv::DtExtrudedLineModelInstance, makVrv::DtExtrudedModelInstance, makVrv::Dt3DTextModelInstance, makVrv::DtEllipsoidArcModelInstance, makVrv::DtFxParticleSystemModelInstance, makVrv::DtCuboidModelInstance, makVrv::DtRibbonModelInstance, makVrv::DtArticulatingCylinderModelInstance, makVrv::DtDecalModelInstance, makVrv::DtParticleSystemModelInstance, makVrv::DtRectangularPyramidModelInstance, makVrv::DtMovablePolygonModel::DtMovablePolygonModelInstance, makVrv::DtProjectedTextModelInstance, makVrv::DtScribeBoxModelInstance, and makVrv::DtDrawModelInstance.
|
virtual |
Brief Tell the model instance to remove itself from the provided node. Returns true if the node was removed.
Reimplemented in makVrv::DtAttachableEllipsoidArcModelInstance, makVrv::Dt3DSegmentedLineModelInstance, makVrv::DtPolygonModelInstance, makVrv::DtExtrudedLineModelInstance, makVrv::DtExtrudedModelInstance, makVrv::Dt3DTextModelInstance, makVrv::DtEllipsoidArcModelInstance, makVrv::DtFxParticleSystemModelInstance, makVrv::DtCuboidModelInstance, makVrv::DtRibbonModelInstance, makVrv::DtArticulatingCylinderModelInstance, makVrv::DtDecalModelInstance, makVrv::DtParticleSystemModelInstance, makVrv::DtRectangularPyramidModelInstance, makVrv::DtProjectedTextModelInstance, makVrv::DtScribeBoxModelInstance, and makVrv::DtDrawModelInstance.
|
virtual |
Get the model instance's root node.
Reimplemented in makVrv::DtExtrudedModelInstance.
|
virtual |
Get the model instance's root node.
|
virtual |
Get the model instance's sensor node, .
Reimplemented in makVrv::DtRibbonModelInstance, and makVrv::DtDiGuyModelInstance.
|
virtual |
Get the model instance's sensor node, .
Reimplemented in makVrv::DtRibbonModelInstance, and makVrv::DtDiGuyModelInstance.
|
virtual |
Attempt to save the model to a file.
Reimplemented from makVrv::DtModelInstance.
|
virtual |
Enable / disable coloring on all models in the scene object Note about enableColorBlending: If this particular model has instancing enabled then this flag is set to false and color blending is handled by the instance manager. It should not be set to true if the model has instancing enabled.
Reimplemented from makVrv::DtModelInstance.
Reimplemented in makVrv::DtPolygonModelInstance.
|
virtual |
set the model's color
Reimplemented from makVrv::DtModelInstance.
|
virtual |
|
virtual |
Set the state of an active region.
|
virtual |
Get the current state of the specified sensor region.
|
virtual |
Get the map containing all regions and their current states.
|
virtual |
Slot to handle the global alpha to coverage signal for entities.
Reimplemented in makVrv::DtScribeBoxModelInstance.
|
virtual |
Get the current setting for alpha to coverage for this model.
|
protectedvirtual |
calls update color blending with the model root. Override to use a different root
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in makVrv::DtDiGuyModelInstance.
|
protectedvirtual |
Set the model instance's root node.
Reimplemented in makVrv::DtDiGuyModelInstance.
|
protectedvirtual |
Helper function to set up a depth test on a state set taking into account whether reverse z is enabled or not.
| boost::signalslib::signal< void(const std::string&) > makVrv::DtOsgModelInstance::signal_dynamicSensorRegionAdded |
Signal raised when a dynamic sensor region is added.
| boost::signalslib::signal< void(const std::string&, bool) > makVrv::DtOsgModelInstance::signal_dynamicSensorRegionChanged |
Signal raised when a dynamic sensor region's state changes.
| boost::signalslib::signal<void(bool)> makVrv::DtOsgModelInstance::signal_atcModeEnableChanged |
Signal raised when alpha to coverage for this model is changed.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Has this model instance had a shader generated for it? Used for classes (ex. Dt3DSegmentedLineModelInstance) which call DtOsgShaderUtils::generateModelInstanceShaders.