VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
makVrv::DtDecalModelInstance Class Reference

A model instance creates a decal ribbon model instance effect from a model definition.

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

Public Member Functions

virtual ~DtDecalModelInstance ()
 
virtual bool realize (const DtModelDefinition &definition)
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
virtual void setParentSceneObject (const DtUniqueID &sceneObjID)
 
virtual DtSceneObjectparentSceneObject ()
 
virtual void setOcclusionEnabled (bool enabled)
 
virtual void setColor (const osg::Vec4 &color)
 
virtual void setVisible (bool isVisible)
 
virtual void update ()
 
virtual void setNewParticleVisible (bool enabled)
 
virtual void setPositionOffset (const osg::Vec3 &offset)
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 
virtual bool cloneInstance (const DtModelDefinition &definition)
 
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
 
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 
virtual bool dynamicSensorRegion (const std::string &region)
 
virtual const
SensorRegionStateMap
dynamicSensorRegionMap () const
 
virtual void slot_atcGlobalModelEnableChanged ()
 
virtual bool alphaToCoverageEnabled ()
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 
virtual ~DtModelInstance ()
 
const std::string & realizedDefinitionName () const
 
const DtVectorboundingBoxExtents () const
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorboundingBoxCenter () const
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
const DtVectorallGeometryboundingBoxExtents () const
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorallGeometryboundingBoxCenter () const
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
virtual void setContributesToBound (bool trueOrFalse)
 
bool contributesToBound () const
 

Protected Member Functions

 DtDecalModelInstance (DtDe &de)
 
virtual DtOsgRibboncreateRibbonEffect (const osg::Vec3 &pointA, const osg::Vec3 &pointB)
 
virtual osg::Node * findFromCache (DtModelDefinition &definition)
 
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
 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)
 

Protected Attributes

osg::ref_ptr< DtOsgRibbonmyRibbon
 
DtUniqueID myParentId
 
bool myOcclusionEnabled
 
bool myColorSet
 
osg::Vec4 myColor
 
bool myNewParticleVisible
 
osg::Vec3 myPositionOffset
 
boost::signalslib::connection mySceneObjectConnection
 
- Protected Attributes inherited from makVrv::DtOsgModelInstance
osg::ref_ptr< osg::Node > myModelRoot
 
osg::ref_ptr< osg::StateSet > myCachedState
 
SensorRegionStateMap mySensorRegionMap
 
AlphaToCoverageState myAlphaToCoverageState
 
DtSignalConnectionManager myConnections
 
bool myModelInstanceShaderSet
 
- Protected Attributes inherited from makVrv::DtModelInstance
DtDemyDe
 
std::string myRealizedModelDefinitionName
 
DtVector myBoundingBoxCenter
 
DtVector myBoundingBoxExtents
 
DtVector myBoundingBoxMinimum
 
DtVector myBoundingBoxMaximum
 
DtVector myAllGeometryBoundingBoxCenter
 
DtVector myAllGeometryBoundingBoxExtents
 
DtVector myAllGeometryBoundingBoxMinimum
 
DtVector myAllGeometryBoundingBoxMaximum
 
bool myContributesToBound
 
bool myColorBlendingEnabled
 
float myBlendRed
 
float myBlendBlue
 
float myBlendGreen
 
float myBlendAlpha
 

Private Member Functions

 DtDecalModelInstance ()
 
 DtDecalModelInstance (const DtDecalModelInstance &)
 
DtDecalModelInstanceoperator= (const DtDecalModelInstance &)
 

Private Attributes

friend DtDecalModelInstanceCreator
 

Additional Inherited Members

- Public Types inherited from makVrv::DtOsgModelInstance
enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 
typedef std::unordered_map
< std::string, bool
SensorRegionStateMap
 
- Static Public Member Functions inherited from makVrv::DtModelInstance
static float readFloat (const std::string &paramName, const DtModelDefinition &definition)
 
static DtVector readVector (const std::string &paramName, const DtModelDefinition &definition)
 
static DtVector4< float > readVector4 (const std::string &paramName, const DtModelDefinition &definition)
 
- Public Attributes inherited from makVrv::DtOsgModelInstance
boost::signalslib::signal
< void(const std::string &) > 
signal_dynamicSensorRegionAdded
 
boost::signalslib::signal
< void(const std::string
&, bool) > 
signal_dynamicSensorRegionChanged
 
boost::signalslib::signal
< void(bool)> 
signal_atcModeEnableChanged
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signalslib::signal
< void(DtModelInstance *)> 
signal_modelInstanceChanged
 

Constructor & Destructor Documentation

virtual makVrv::DtDecalModelInstance::~DtDecalModelInstance ( )
virtual

DTOR.

makVrv::DtDecalModelInstance::DtDecalModelInstance ( )
private

Default Constructor not implemented.

makVrv::DtDecalModelInstance::DtDecalModelInstance ( const DtDecalModelInstance )
private

Copy Constructor not implemented - Copy not allowed.

makVrv::DtDecalModelInstance::DtDecalModelInstance ( DtDe de)
protected

CTOR.

Member Function Documentation

DtDecalModelInstance& makVrv::DtDecalModelInstance::operator= ( const DtDecalModelInstance )
private

Assignment Operator not implemented - Copy not allowed.

virtual bool makVrv::DtDecalModelInstance::realize ( const DtModelDefinition definition)
virtual

Attempt to realize a definition. If the model instance can't realize the definition it should return false. This instance requires the definition be of schema "Decal".

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtDecalModelInstance::addToConnector ( DtOsgSceneConnector connector)
virtual

Brief Tell the model instance to add itself to the provided node.

Reimplemented from makVrv::DtOsgModelInstance.

virtual bool makVrv::DtDecalModelInstance::removeFromConnector ( DtOsgSceneConnector connector)
virtual

Brief Tell the model instance to remove itself from the provided node.

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtDecalModelInstance::setParentSceneObject ( const DtUniqueID sceneObjID)
virtual

Set the parent scene object; used for dynamically sizing the ribbon.

virtual DtSceneObject* makVrv::DtDecalModelInstance::parentSceneObject ( )
virtual

Get the scene object that the ribbon is attached to; returns null if none exists.

virtual void makVrv::DtDecalModelInstance::setOcclusionEnabled ( bool  enabled)
virtual

Turn on or off occlusion of the ribbon by other objects in the scene.

Default is true

virtual void makVrv::DtDecalModelInstance::setColor ( const osg::Vec4 &  color)
virtual

Sets the color of the decal model's ribbon.

virtual void makVrv::DtDecalModelInstance::setVisible ( bool  isVisible)
inlinevirtual

no-op

Implements makVrv::DtModelInstance.

virtual void makVrv::DtDecalModelInstance::update ( )
virtual

Update the position of the ribbon.

virtual void makVrv::DtDecalModelInstance::setNewParticleVisible ( bool  enabled)
virtual

enable or disable whether or not new particles created by this model are visible, only affects particle decals and not ribbon decals

virtual void makVrv::DtDecalModelInstance::setPositionOffset ( const osg::Vec3 &  offset)
virtual

Allow the decal system to have an overall offset For example the 5 ton truck has tire track starting in the middle of the truck, we can move them up to the front wheels.

virtual DtOsgRibbon* makVrv::DtDecalModelInstance::createRibbonEffect ( const osg::Vec3 &  pointA,
const osg::Vec3 &  pointB 
)
protectedvirtual

Create the ribbon effect.

virtual osg::Node* makVrv::DtDecalModelInstance::findFromCache ( DtModelDefinition definition)
protectedvirtual

Try to find an effect model instance in cache to copy.

Member Data Documentation

friend makVrv::DtDecalModelInstance::DtDecalModelInstanceCreator
private
osg::ref_ptr<DtOsgRibbon> makVrv::DtDecalModelInstance::myRibbon
protected
DtUniqueID makVrv::DtDecalModelInstance::myParentId
protected
bool makVrv::DtDecalModelInstance::myOcclusionEnabled
protected
bool makVrv::DtDecalModelInstance::myColorSet
protected
osg::Vec4 makVrv::DtDecalModelInstance::myColor
protected
bool makVrv::DtDecalModelInstance::myNewParticleVisible
protected
osg::Vec3 makVrv::DtDecalModelInstance::myPositionOffset
protected
boost::signalslib::connection makVrv::DtDecalModelInstance::mySceneObjectConnection
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)