VR-Forces 4.0.4 Class Documentation
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtOverlaySegmentedLineModelInstance Class Reference

Model instance to draw a 3D line with styleable segments onto the 2D overlay. More...

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

List of all members.

Classes

struct  SegmentAttributes

Public Member Functions

 DtOverlaySegmentedLineModelInstance (DtDe &de)
 CTOR.
virtual ~DtOverlaySegmentedLineModelInstance ()
 DTOR.
virtual void setPosition (int vtx, const DtVector &position)
 Set the position of one endpoint of the line.
virtual void removePosition (int vtx)
 Remove the vertex at position vtx.
virtual void setWidth (float width)
 Set the width of the line.
virtual void setColor (float r, float g, float b, float a)
 Set the color of the line.
virtual void setStipplePattern (unsigned int pattern, int repeatFactor)
 Set a stipple pattern for the line.
virtual void setStyleSegments (const std::vector< double > &segmentPercentages)
 Set the style segments to percentages of the total line length The values in segmentPercentages must add up to 1.0.
virtual void setSegmentColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of a particular segment.
virtual void setSegmentLightningStyle (unsigned int segmentIndex, bool enableLightningStyle)
 Turn on or off lightning bolt style for a particular segment.
virtual void setSegmentStartArrow (unsigned int segmentIndex, bool enableArrow)
 Turn on or off the arrow at a segment's start point.
virtual void setSegmentEndArrow (unsigned int segmentIndex, bool enableArrow)
 Turn on or off the arrow at a segment's end point.
virtual void setSegmentStipplePattern (unsigned int segmentIndex, unsigned int stipplePattern, int repeatFactor)
 Set the line stipple pattern for a segment, according to the OpenGL line stippling specification.
virtual void setSegmentWidth (unsigned int segmentIndex, double width)
 Set the line width of a segment.
virtual void setSegmentStartColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the firt vertex in a segment.
virtual void setSegmentEndColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the end vertex in a segment.
virtual void setModelSet (int modelSet)
 Set the model set this model instance uses (needed for doing intersections)
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition.
virtual void setVisible (bool isVisible)
 Set the line visible or invisible; maintains state.
virtual void setEventsEnabled (bool enabled, unsigned long long userData)
 Turn on or off the ability to pick the line. Off by default.
virtual void setEventWidth (float width)
 Sets the width of the segment (in pixels), for picking and mouse-over.
virtual void update ()
 Indicate that its time to prepare actual scene graph data to be rendered.
virtual void setRotation (const osg::Quat &quat)
 rotate the points about the origin

Protected Types

typedef std::vector< DtVectorPoints
typedef std::vector
< SegmentAttributes
SegmentAttributesVector

Protected Member Functions

virtual void createLineIfNecessary ()
 Creates the line model.
virtual void updateSegments ()
 Updates the segment information.
virtual void updateGeometry ()
 Updates the lines geometry.
virtual void resizeSegmentAttributes (int size)
 Add segments to the segments attribute vector.
virtual void set3DVertexPosition (unsigned int index, double x, double y, double z)
 Sets a lines vertex's position.
virtual void set3DPositionAux (double x, double y, double z, float tempPackedCoords[4])
 Utility function for transforming a vertex and setting it on the line.

Protected Attributes

DtUniqueID mySceneObjectId
Points myPoints
Points myVertices
SegmentAttributesVector mySegmentAttributes
unsigned int myModelSet
DtSegmentedLinemyLine
bool myVisible
osg::Vec4 myColor
float myWidth
unsigned int myStipplePattern
int myStippleRepeat
std::vector< double > mySegmentPercentages
float myEventWidth
bool myGeometryDirty
bool mySegmentsDirty
bool myEventsEnabled
osg::Vec3d myOrigin
osg::Quat myRotation

Private Member Functions

 DtOverlaySegmentedLineModelInstance ()
 Default, unimplemented constructor.
 DtOverlaySegmentedLineModelInstance (const DtOverlaySegmentedLineModelInstance &)
 Unimplemented copy constructor.
DtOverlaySegmentedLineModelInstanceoperator= (const DtOverlaySegmentedLineModelInstance &)
 Unimplemented assignment operator.

Detailed Description

Model instance to draw a 3D line with styleable segments onto the 2D overlay.


Member Typedef Documentation


Constructor & Destructor Documentation

CTOR.

DTOR.

Default, unimplemented constructor.

Unimplemented copy constructor.


Member Function Documentation

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setPosition ( int  vtx,
const DtVector position 
) [virtual]

Set the position of one endpoint of the line.

Remove the vertex at position vtx.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setWidth ( float  width) [virtual]

Set the width of the line.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setColor ( float  r,
float  g,
float  b,
float  a 
) [virtual]

Set the color of the line.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setStipplePattern ( unsigned int  pattern,
int  repeatFactor 
) [virtual]

Set a stipple pattern for the line.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setStyleSegments ( const std::vector< double > &  segmentPercentages) [virtual]

Set the style segments to percentages of the total line length The values in segmentPercentages must add up to 1.0.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
) [virtual]

Set the color of a particular segment.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentLightningStyle ( unsigned int  segmentIndex,
bool  enableLightningStyle 
) [virtual]

Turn on or off lightning bolt style for a particular segment.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentStartArrow ( unsigned int  segmentIndex,
bool  enableArrow 
) [virtual]

Turn on or off the arrow at a segment's start point.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentEndArrow ( unsigned int  segmentIndex,
bool  enableArrow 
) [virtual]

Turn on or off the arrow at a segment's end point.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentStipplePattern ( unsigned int  segmentIndex,
unsigned int  stipplePattern,
int  repeatFactor 
) [virtual]

Set the line stipple pattern for a segment, according to the OpenGL line stippling specification.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentWidth ( unsigned int  segmentIndex,
double  width 
) [virtual]

Set the line width of a segment.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentStartColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
) [virtual]

Set the color of the firt vertex in a segment.

This can be used for color blending between vertices.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setSegmentEndColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
) [virtual]

Set the color of the end vertex in a segment.

This can be used for color blending between vertices.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setModelSet ( int  modelSet) [virtual]

Set the model set this model instance uses (needed for doing intersections)

Attempt to realize a definition.

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

Reimplemented from makVrv::DtModelInstance.

Reimplemented in makVrv::DtOverlayGreatCircleArcModelInstance.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setVisible ( bool  isVisible) [virtual]

Set the line visible or invisible; maintains state.

Implements makVrv::DtModelInstance.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setEventsEnabled ( bool  enabled,
unsigned long long  userData 
) [virtual]

Turn on or off the ability to pick the line. Off by default.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setEventWidth ( float  width) [virtual]

Sets the width of the segment (in pixels), for picking and mouse-over.

Indicate that its time to prepare actual scene graph data to be rendered.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::setRotation ( const osg::Quat &  quat) [virtual]

rotate the points about the origin

DtOverlaySegmentedLineModelInstance& makVrv::DtOverlaySegmentedLineModelInstance::operator= ( const DtOverlaySegmentedLineModelInstance ) [private]

Unimplemented assignment operator.

Creates the line model.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::updateSegments ( ) [protected, virtual]

Updates the segment information.

Reimplemented in makVrv::DtOverlayGreatCircleArcModelInstance.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::updateGeometry ( ) [protected, virtual]

Updates the lines geometry.

Reimplemented in makVrv::DtOverlayGreatCircleArcModelInstance.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::resizeSegmentAttributes ( int  size) [protected, virtual]

Add segments to the segments attribute vector.

Reimplemented in makVrv::DtOverlayGreatCircleArcModelInstance.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::set3DVertexPosition ( unsigned int  index,
double  x,
double  y,
double  z 
) [protected, virtual]

Sets a lines vertex's position.

virtual void makVrv::DtOverlaySegmentedLineModelInstance::set3DPositionAux ( double  x,
double  y,
double  z,
float  tempPackedCoords[4] 
) [protected, virtual]

Utility function for transforming a vertex and setting it on the line.


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)