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
makVrv::DtRibbonModelInstance Class Reference

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

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

Public Member Functions

virtual ~DtRibbonModelInstance ()
 
virtual bool realize (const DtModelDefinition &definition)
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual void updateRibbonWidth ()
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
virtual void setParentSceneObject (const DtUniqueID &sceneObjID)
 
virtual DtSceneObjectparentSceneObject ()
 
virtual void setOcclusionEnabled (bool enabled)
 
virtual void setHeightLinesEnabled (bool enabled)
 
virtual void setHeightLinesColor (float r, float g, float b, float a)
 
virtual void setHeightLinesSpacing (float spacing)
 
virtual void setHeightLinesModelSetId (DtModelSetId modelSetId)
 
virtual void setRibbonSpacing (float spacing)
 
virtual void setRibbonLength (int maxSamples)
 
virtual void setRibbonTimeout (float duration)
 
virtual void setColor (const osg::Vec4 &color)
 
virtual void setVisible (bool isVisible)
 
virtual void update ()
 
osg::Node * sensorNode ()
 
const osg::Node * sensorNode () const
 
- 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 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

 DtRibbonModelInstance (DtDe &de)
 
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

friend DtRibbonModelInstanceCreator
 
osg::ref_ptr< DtOsgRibbonmyRibbon
 
DtUniqueID myParentId
 
bool myOcclusionEnabled
 
bool myHeightLinesEnabled
 
float myHeightLinesColor [4]
 
float myHeightLinesSpacing
 
DtModelSetId myHeightLinesModelSetId
 
float myRibbonSpacing
 
int myRibbonLength
 
float myRibbonTimeout
 
bool myColorSet
 
osg::Vec4 myColor
 
boost::signalslib::connection myBoundingVolumeConnection
 
boost::signalslib::connection myParentSceneObjectConnection
 
- 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

 DtRibbonModelInstance ()
 
 DtRibbonModelInstance (const DtRibbonModelInstance &)
 
DtRibbonModelInstanceoperator= (const DtRibbonModelInstance &)
 

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::DtRibbonModelInstance::~DtRibbonModelInstance ( )
virtual

DTOR.

makVrv::DtRibbonModelInstance::DtRibbonModelInstance ( DtDe de)
protected

CTOR.

makVrv::DtRibbonModelInstance::DtRibbonModelInstance ( )
private

unimplemented private default constructor

makVrv::DtRibbonModelInstance::DtRibbonModelInstance ( const DtRibbonModelInstance )
private

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

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

Assignment Operator not implemented – Copy not allowed.

virtual bool makVrv::DtRibbonModelInstance::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 "Ribbon".

Reimplemented from makVrv::DtOsgModelInstance.

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

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

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtRibbonModelInstance::updateRibbonWidth ( )
virtual
virtual bool makVrv::DtRibbonModelInstance::removeFromConnector ( DtOsgSceneConnector connector)
virtual

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

Reimplemented from makVrv::DtOsgModelInstance.

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

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

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

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

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

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

virtual void makVrv::DtRibbonModelInstance::setHeightLinesEnabled ( bool  enabled)
virtual

Turn on or off height lines for the ribbon Default is false.

virtual void makVrv::DtRibbonModelInstance::setHeightLinesColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color for height lines.

virtual void makVrv::DtRibbonModelInstance::setHeightLinesSpacing ( float  spacing)
virtual

Sets the desired spacing for height lines applied along ribbon segments (in meters).

virtual void makVrv::DtRibbonModelInstance::setHeightLinesModelSetId ( DtModelSetId  modelSetId)
virtual

Sets the model set that the height lines should be used with.

virtual void makVrv::DtRibbonModelInstance::setRibbonSpacing ( float  spacing)
virtual

Sets the spacing between sample points along the ribbon (in meters).

virtual void makVrv::DtRibbonModelInstance::setRibbonLength ( int  maxSamples)
virtual

Sets the maximum length of the ribbon (in samples). If the given value (max number of samples in the ribbon), is negative or zero, the ribbon is unbounded and can be infinitely (or at least maximally) long.

virtual void makVrv::DtRibbonModelInstance::setRibbonTimeout ( float  duration)
virtual

Sets the timeout of a ribbon segment (in seconds). If the given value, is negative or zero, the ribbon is unbounded and will not timeout.

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

Sets the color of the ribbon.

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

no-op

Implements makVrv::DtModelInstance.

virtual void makVrv::DtRibbonModelInstance::update ( )
virtual

Update the position of the ribbon.

osg::Node* makVrv::DtRibbonModelInstance::sensorNode ( )
virtual

get the node that the sensor module should use for modifying of the stateset

Reimplemented from makVrv::DtOsgModelInstance.

const osg::Node* makVrv::DtRibbonModelInstance::sensorNode ( ) const
virtual

get the node that the sensor module should use for modifying of the stateset

Reimplemented from makVrv::DtOsgModelInstance.

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

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

Member Data Documentation

friend makVrv::DtRibbonModelInstance::DtRibbonModelInstanceCreator
protected
osg::ref_ptr<DtOsgRibbon> makVrv::DtRibbonModelInstance::myRibbon
protected
DtUniqueID makVrv::DtRibbonModelInstance::myParentId
protected
bool makVrv::DtRibbonModelInstance::myOcclusionEnabled
protected
bool makVrv::DtRibbonModelInstance::myHeightLinesEnabled
protected
float makVrv::DtRibbonModelInstance::myHeightLinesColor[4]
protected
float makVrv::DtRibbonModelInstance::myHeightLinesSpacing
protected
DtModelSetId makVrv::DtRibbonModelInstance::myHeightLinesModelSetId
protected
float makVrv::DtRibbonModelInstance::myRibbonSpacing
protected
int makVrv::DtRibbonModelInstance::myRibbonLength
protected
float makVrv::DtRibbonModelInstance::myRibbonTimeout
protected
bool makVrv::DtRibbonModelInstance::myColorSet
protected
osg::Vec4 makVrv::DtRibbonModelInstance::myColor
protected
boost::signalslib::connection makVrv::DtRibbonModelInstance::myBoundingVolumeConnection
protected
boost::signalslib::connection makVrv::DtRibbonModelInstance::myParentSceneObjectConnection
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)