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

The base class for all model instances. More...

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

List of all members.

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 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.
virtual void setVisible (bool isVisible)=0
 Set whether the model is visible or not.
virtual void setVisibleViaSwitch (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.

Static Public Member Functions

static float readFloat (const std::string &paramName, const DtModelDefinition &definition)
static DtVector readVector (const std::string &paramName, const DtModelDefinition &definition)

Public Attributes

boost::signal< void(DtModelInstance *)> signal_modelInstanceChanged

Protected Attributes

DtDemyDe
std::string myRealizedModelDefinitionName
DtVector myBoundingBoxCenter
DtVector myBoundingBoxExtents
DtVector myBoundingBoxMinimum
DtVector myBoundingBoxMaximum
bool myContributesToBound
bool myColorBlendingEnabled
float myBlendRed
float myBlendBlue
float myBlendGreen
float myBlendAlpha

Detailed Description

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.


Constructor & Destructor Documentation

CTOR.

DTOR.


Member Function Documentation

virtual bool makVrv::DtModelInstance::realize ( DtModelDefinition definition) [virtual]

Get the name of the definition that this model instance was realized with.

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

Attempt to save the model to a file.

Reimplemented in makVrv::DtOsgModelInstance.

Get the bounding box extents of the model instance.

void makVrv::DtModelInstance::getBoundingBoxExtents ( double &  x,
double &  y,
double &  z 
) const

Get the bounding box extents of the model instance.

Get the bounding box center of the model instance.

void makVrv::DtModelInstance::getBoundingBoxCenter ( double &  x,
double &  y,
double &  z 
) const

Get the bounding box center of the model instance.

virtual void makVrv::DtModelInstance::setContributesToBound ( bool  trueOrFalse) [virtual]

Set whether this model instance contributes to an object's overall bounding volume.

Reimplemented in makVrv::DtCubeModelInstance.

Get whether this model instance contributes to an object's overall bounding volume.

virtual void makVrv::DtModelInstance::setVisible ( bool  isVisible) [pure virtual]
virtual void makVrv::DtModelInstance::setVisibleViaSwitch ( bool  isVisible) [pure virtual]
virtual void makVrv::DtModelInstance::setBlendColor ( float  r,
float  g,
float  b,
float  a 
) [virtual]

set the model's color

Reimplemented in makVrv::DtOsgModelInstance.

virtual void makVrv::DtModelInstance::enableColorBlending ( bool  b) [virtual]

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

Reimplemented in makVrv::DtOsgModelInstance.

static float makVrv::DtModelInstance::readFloat ( const std::string &  paramName,
const DtModelDefinition definition 
) [static]
static DtVector makVrv::DtModelInstance::readVector ( const std::string &  paramName,
const DtModelDefinition definition 
) [static]

Member Data Documentation


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)