VR-Forces 4.1 Class Documentation
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOsgOverlayDirectionLineModelInstance Class Reference

Model instance to draw a 2D line with styleable segments. More...

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

Classes

struct  DirectionAttributes

Public Member Functions

 DtOsgOverlayDirectionLineModelInstance (DtDe &de)
 CTOR.
virtual ~DtOsgOverlayDirectionLineModelInstance ()
 DTOR.
virtual void setVisible (bool)
 Sets model shown/hidden.
virtual void setModelSet (int modelSet)
 Sets the model set for the overlay.
virtual void addPoint (const DtVector &position, int index=-1)
 Each set of two points will represent a segment on the line, so, the origin to second point is the first segment, second to third point is the second segment, etc.
virtual void setPosition (int index, const DtVector &position)
 Sets the position of the point at the specified location.
virtual void setStipplePattern (unsigned int stipple)
 Segment parameters for stippling.
virtual void setColor (float r, float g, float b, float a)
 Set segment color.
virtual void setWidth (float width)
 Sets the width of the segment (in pixels)
virtual void setEventsEnabled (bool, unsigned long long userData)
 Eanble or disable picking and mouse-over events.
bool eventsEnabled () const
 Return whether events are enabled.
virtual void setPositionOffset (const DtVector &)
 Offsets vertices by given offset.
virtual void setDirection (int index, const DtVector &direction)
 Sets the 3D direction of the vertex.
virtual void setLength (int index, float length)
 Sets the 2D (screen space) length/offset of the vertex in the direction set by setDirection.
virtual void update ()
 Called when it's time to update the rendered object.
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition.
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 DTOR.
virtual void addToConnector (DtOsgSceneConnector *connector)
 Brief Tell the model instance to add itself to the provided node.
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 Brief Tell the model instance to remove itself from the provided node.
virtual bool saveModelToFile (const std::string &filename) const
 Attempt to save the model to a file.
virtual void enableColorBlending (bool b)
 Enable / disable coloring on all models in the scene object.
virtual void setBlendColor (float r, float g, float b, float a)
 set the model's color
virtual void enableTexture (bool onOff)
virtual osg::Node * rootNode ()
 Get the model instance's root node.
virtual const osg::Node * rootNode () const
 Get the model instance's root node.
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 CTOR.
virtual ~DtModelInstance ()
 DTOR.
const std::string & realizedDefinitionName () const
 Get the name of the definition that this model instance was realized with.
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.

Protected Member Functions

virtual void createLineIfNecessary ()
 Creates the line model.
virtual void updateAttributes ()
 Updates the segment information.
virtual void updateGeometry ()
 Updates the line's geometry.
virtual void set3DVertexPosition (unsigned int index, double x, double y, double z)
 Sets a lines vertex's position.
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
virtual void updateColorBlending ()
 calls update color blending with the model root.
virtual void updateColorBlending (osg::Node *node)
virtual void enableTexture (osg::Node *root, bool onOff)
virtual void updateBoundingBoxViaContents ()
 DtOsgModelInstance (DtDe &de)
 CTOR.
virtual void setRootNode (osg::Node *node)
 Set the model instance's root node.

Protected Attributes

DtVector myPoints [2]
DirectionAttributes myDirections [2]
unsigned int myModelSet
DtLineSegmentmyLine
osg::Vec4 myColor
float myWidth
unsigned int myStipplePattern
bool myGeometryDirty
bool myAttributesDirty
bool myEventsEnabled
bool myVisibleFlag
unsigned long long myUserData
DtVector myPositionOffset
- Protected Attributes inherited from makVrv::DtOsgModelInstance
osg::ref_ptr< osg::Node > myModelRoot
osg::ref_ptr< osg::StateSet > myCachedState
- Protected Attributes inherited from makVrv::DtModelInstance
DtDemyDe
std::string myRealizedModelDefinitionName
DtVector myBoundingBoxCenter
DtVector myBoundingBoxExtents
DtVector myBoundingBoxMinimum
DtVector myBoundingBoxMaximum
bool myContributesToBound
bool myColorBlendingEnabled
float myBlendRed
float myBlendBlue
float myBlendGreen
float myBlendAlpha

Additional Inherited Members

- Static Public Member Functions inherited from makVrv::DtOsgModelInstance
static osg::Vec4 readVec4 (const std::string &paramName, const DtModelDefinition &definition)
static osg::Vec3 readVec3 (const std::string &paramName, const DtModelDefinition &definition)
- Public Attributes inherited from makVrv::DtModelInstance
boost::signal< void(DtModelInstance *)> signal_modelInstanceChanged

Detailed Description

Model instance to draw a 2D line with styleable segments.

Constructor & Destructor Documentation

makVrv::DtOsgOverlayDirectionLineModelInstance::DtOsgOverlayDirectionLineModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgOverlayDirectionLineModelInstance::~DtOsgOverlayDirectionLineModelInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setVisible ( bool  )
virtual

Sets model shown/hidden.

Implements makVrv::DtModelInstance.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setModelSet ( int  modelSet)
virtual

Sets the model set for the overlay.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::addPoint ( const DtVector position,
int  index = -1 
)
virtual

Each set of two points will represent a segment on the line, so, the origin to second point is the first segment, second to third point is the second segment, etc.

As points are added or removed, this could influence how the segment styles will be applied. A segment style will be associated with a particular segment and will not change its segment index based on points added or removed

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setPosition ( int  index,
const DtVector position 
)
virtual

Sets the position of the point at the specified location.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setStipplePattern ( unsigned int  stipple)
virtual

Segment parameters for stippling.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set segment color.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setWidth ( float  width)
virtual

Sets the width of the segment (in pixels)

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setEventsEnabled ( bool  ,
unsigned long long  userData 
)
virtual

Eanble or disable picking and mouse-over events.

bool makVrv::DtOsgOverlayDirectionLineModelInstance::eventsEnabled ( ) const

Return whether events are enabled.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setPositionOffset ( const DtVector )
virtual

Offsets vertices by given offset.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setDirection ( int  index,
const DtVector direction 
)
virtual

Sets the 3D direction of the vertex.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::setLength ( int  index,
float  length 
)
virtual

Sets the 2D (screen space) length/offset of the vertex in the direction set by setDirection.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::update ( )
virtual

Called when it's time to update the rendered object.

virtual bool makVrv::DtOsgOverlayDirectionLineModelInstance::realize ( DtModelDefinition definition)
virtual

Attempt to realize a definition.

If the model instance can't realize the definition it should return false.

Reimplemented from makVrv::DtModelInstance.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::createLineIfNecessary ( )
protectedvirtual

Creates the line model.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::updateAttributes ( )
protectedvirtual

Updates the segment information.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::updateGeometry ( )
protectedvirtual

Updates the line's geometry.

virtual void makVrv::DtOsgOverlayDirectionLineModelInstance::set3DVertexPosition ( unsigned int  index,
double  x,
double  y,
double  z 
)
protectedvirtual

Sets a lines vertex's position.

Member Data Documentation

DtVector makVrv::DtOsgOverlayDirectionLineModelInstance::myPoints[2]
protected
DirectionAttributes makVrv::DtOsgOverlayDirectionLineModelInstance::myDirections[2]
protected
unsigned int makVrv::DtOsgOverlayDirectionLineModelInstance::myModelSet
protected
DtLineSegment* makVrv::DtOsgOverlayDirectionLineModelInstance::myLine
protected
osg::Vec4 makVrv::DtOsgOverlayDirectionLineModelInstance::myColor
protected
float makVrv::DtOsgOverlayDirectionLineModelInstance::myWidth
protected
unsigned int makVrv::DtOsgOverlayDirectionLineModelInstance::myStipplePattern
protected
bool makVrv::DtOsgOverlayDirectionLineModelInstance::myGeometryDirty
protected
bool makVrv::DtOsgOverlayDirectionLineModelInstance::myAttributesDirty
protected
bool makVrv::DtOsgOverlayDirectionLineModelInstance::myEventsEnabled
protected
bool makVrv::DtOsgOverlayDirectionLineModelInstance::myVisibleFlag
protected
unsigned long long makVrv::DtOsgOverlayDirectionLineModelInstance::myUserData
protected
DtVector makVrv::DtOsgOverlayDirectionLineModelInstance::myPositionOffset
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)