![]() |
VR-Forces 4.6 Class Documentation
|
The base class for all model instances. More...

Public Member Functions | |
| DtModelInstance (DtDe &de) | |
| CTOR. | |
| virtual | ~DtModelInstance () |
| DTOR. | |
| virtual bool | realize (DtModelDefinition &definition) |
| Attempt to realize a definition. | |
| const std::string & | realizedDefinitionName () const |
| Get the name of the definition that this model instance was realized with. | |
| virtual bool | saveModelToFile (const std::string &filename) const |
| Attempt to save the model to a file. | |
| const DtVector & | boundingBoxExtents () 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 DtVector & | boundingBoxCenter () 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. | |
| virtual void | setVisible (bool isVisible)=0 |
| Set whether the model is visible or not. | |
| virtual void | setBlendColor (float r, float g, float b, float a) |
| set the model's color | |
| virtual void | enableColorBlending (bool b) |
| 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. | |
Static Public Member Functions | |
| static float | readFloat (const std::string ¶mName, const DtModelDefinition &definition) |
| static DtVector | readVector (const std::string ¶mName, const DtModelDefinition &definition) |
Public Attributes | |
| boost::signal< void(DtModelInstance *)> | signal_modelInstanceChanged |
Protected Attributes | |
| DtDe & | myDe |
| std::string | myRealizedModelDefinitionName |
| DtVector | myBoundingBoxCenter |
| DtVector | myBoundingBoxExtents |
| DtVector | myBoundingBoxMinimum |
| DtVector | myBoundingBoxMaximum |
| bool | myContributesToBound |
| bool | myColorBlendingEnabled |
| float | myBlendRed |
| float | myBlendBlue |
| float | myBlendGreen |
| float | myBlendAlpha |
The base class for all model instances.
The details required to draw a model, such as geometry, filename, scale, or texture are provided by a DtModelDefinition. A DtModelDefinition is a set of parameters, whose names and types are defined by a DtSchema. The DtModelDefinitionManager saves and loads model-definitions and schemas and maintains settings for model instancing and caching. Model-definitions and schemas are distributed, but not by the usual agent mechanism. Instead, the DtDeSharedState distributes them directly.
| makVrv::DtModelInstance::DtModelInstance | ( | DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Attempt to realize a definition.
If the model instance can't realize the definition it should return false.
Reimplemented in makVrv::DtOsgOverlayEllipseArcModelInstance, makVrv::DtOverlaySegmentedLineModelInstance, makVrv::Dt3DSegmentedLineModelInstance, makVrv::DtOsgModelInstance, makVrv::DtOsgOverlayDirectionLineModelInstance, makVrv::DtTritonWaterImpactModelInstance, makVrv::DtExtrudedLineModelInstance, makVrv::DtExtrudedModelInstance, makVrv::Dt3DTextModelInstance, makVrv::DtEffectModelInstance, makVrv::DtParticleSystemModelInstance, makVrv::DtArticulatingCylinderModelInstance, makVrv::DtEllipsoidArcModelInstance, makVrv::DtAnimationModelInstance, makVrv::DtPolygonModelInstance, makVrv::DtTacticalSmokeModelInstance, makVrv::DtCuboidModelInstance, makVrv::DtRectangularPyramidModelInstance, makVrv::DtCylinderModelInstance, makVrv::DtEllipsoidModelInstance, makVrv::DtCubeModelInstance, makVrv::DtOverlayGreatCircleArcModelInstance, makVrv::DtAttachableEllipsoidArcModelInstance, makVrv::Dt3DGreatCircleArcModelInstance, makVrv::DtRibbonModelInstance, makVrv::DtDecalModelInstance, makVrv::DtOsgSimpleModelInstance, and makVrv::DtDiGuyModelInstance.
| const std::string& makVrv::DtModelInstance::realizedDefinitionName | ( | ) | const |
Get the name of the definition that this model instance was realized with.
|
virtual |
Attempt to save the model to a file.
Reimplemented in makVrv::DtOsgModelInstance.
| const DtVector& makVrv::DtModelInstance::boundingBoxExtents | ( | ) | const |
Get the bounding box extents of the model instance.
Get the bounding box extents of the model instance.
| const DtVector& makVrv::DtModelInstance::boundingBoxCenter | ( | ) | const |
Get the bounding box center of the model instance.
Get the bounding box center of the model instance.
|
virtual |
Set whether this model instance contributes to an object's overall bounding volume.
Reimplemented in makVrv::DtCubeModelInstance.
| bool makVrv::DtModelInstance::contributesToBound | ( | ) | const |
Get whether this model instance contributes to an object's overall bounding volume.
Reimplemented in makVrv::DtTritonWakeModelInstance, makVrv::DtTritonTidalStreamWakeModelInstance, makVrv::DtTritonWaterImpactModelInstance, and makVrv::DtTritonRotorWashModelInstance.
|
pure virtual |
Set whether the model is visible or not.
Implemented in makVrv::DtExtrudedLineModelInstance, makVrv::DtExtrudedModelInstance, makVrv::DtOsgOverlayPolygonModelInstance, makVrv::DtTacticalSmokeModelInstance, makVrv::DtOverlaySegmentedLineModelInstance, makVrv::Dt3DSegmentedLineModelInstance, makVrv::DtPolygonModelInstance, makVrv::DtEffectModelInstance, makVrv::DtAnimationModelInstance, makVrv::DtParticleSystemModelInstance, makVrv::DtRibbonModelInstance, makVrv::DtOsgOverlayEllipseArcModelInstance, makVrv::Dt3DTextModelInstance, makVrv::DtArticulatingCylinderModelInstance, makVrv::DtEllipsoidArcModelInstance, makVrv::DtCuboidModelInstance, makVrv::DtDecalModelInstance, makVrv::DtRectangularPyramidModelInstance, makVrv::DtProjectedTextModelInstance, makVrv::DtCylinderModelInstance, makVrv::DtEllipsoidModelInstance, makVrv::DtCubeModelInstance, makVrv::DtAttachableEllipsoidArcModelInstance, makVrv::DtScribeBoxModelInstance, makVrv::DtTritonRotorWashModelInstance, makVrv::DtTritonTidalStreamWakeModelInstance, makVrv::DtTritonWakeModelInstance, makVrv::DtDrawModelInstance, makVrv::DtTritonWaterImpactModelInstance, makVrv::DtDiGuyModelInstance, makVrv::DtOsgSimpleModelInstance, makVrv::DtOsgWidgetUpdater, makVrv::DtAttachedCylinderModelInstance, makVrv::DtOsgOverlayDirectionLineModelInstance, and makVrv::DtExampleModelInstance.
|
virtual |
set the model's color
Reimplemented in makVrv::DtOsgModelInstance.
|
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 in makVrv::DtOsgModelInstance, and makVrv::DtPolygonModelInstance.
|
static |
|
static |
| boost::signal<void (DtModelInstance*)> makVrv::DtModelInstance::signal_modelInstanceChanged |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |