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

vrvGraphics implementation of a 2D Line More...

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

List of all members.

Classes

struct  SegmentAttributes
 Attributes describing one segment in a segmented line. More...

Public Member Functions

 DtOsgWindowLineInstance (DtDe &de)
 CTOR.
virtual ~DtOsgWindowLineInstance ()
 DTOR.
virtual void setVertex (unsigned int vertex, double x, double y)
 Set (or add) the specified vertex at <x,y>
virtual void removeVertex (unsigned int vertex)
 Remove the specified vertex.
virtual void setColor (float r, float g, float b, float a)
 Set the entire line color.
virtual void setStipplePattern (unsigned int stipplePattern)
 Set the entire line stipple pattern.
virtual void setWidth (unsigned int width)
 Set the entire line width.
virtual void setStyleSegments (const std::vector< double > &segmentPercentages)
 Set the percentage lengths of the segments; creates and removes segments as necessary.
virtual void setSegmentColor (unsigned int index, float r, float g, float b, float a)
 Set the color of a segment.
virtual void setSegmentStartColor (unsigned int index, float r, float g, float b, float a)
 Set the color of the firt vertex in a segment.
virtual void setSegmentEndColor (unsigned int index, float r, float g, float b, float a)
 Set the color of the second vertex in a segment.
virtual void setSegmentLightningStyle (unsigned int index, bool enableLightningStyle)
 Set a segment's lightning style (whether or not it looks like a lighting bolt)
virtual void setSegmentStartArrow (unsigned int index, bool enableStartArrow)
 Turn on or off a segment's start arrow.
virtual void setSegmentEndArrow (unsigned int index, bool enableEndArrow)
 Turn on or off a segment's end arrow.
virtual void setSegmentStipplePattern (unsigned int index, unsigned int stipplePattern)
 Set the stipple pattern for a segment according to the OpenGL line stipple feature.
virtual void setSegmentWidth (unsigned int index, unsigned int width)
 Set the width of a segment in pixels.
virtual void setVisible (bool isVisible)
 Set the line visible or invisible.
virtual void update ()
 Called on signal_postUpdate; time to update render data.

Protected Types

typedef std::vector
< SegmentAttributes
SegmentAttributesVector
typedef std::vector< osg::Vec2 > Points

Protected Member Functions

virtual void resizeSegmentAttributes (int size)
 Add segments to the segments attribute vector.
virtual void createLineIfNecessary ()
 Creates the line model.
virtual void updateSegments ()
 Updates the segment information.
virtual void updateGeometry ()
 Updates the lines geometry.
virtual void generateSegment (int segmentIndex, const osg::Vec2 &startPoint, const osg::Vec2 &endPoint, const osg::Vec2 &segmentAxis, const osg::Vec2 &segmentPerpendicular)
 Generate vertices for a single segment.
virtual void setupColorRanges (SegmentAttributes *segmentAttributes)
 Determine the sub-segment range for each segment color specified.
virtual void setLineSegmentColors (unsigned int vtx, SegmentAttributes *segmentAttributes)
 Sets the point colors for the line segments based on the features and colors provided in segmentAttributes.

Protected Attributes

DtDemyDe
Points myPoints
Points myVertices
SegmentAttributesVector mySegmentAttributes
DtSegmentedLinemyLine
bool myVisible
osg::Vec4 myColor
float myWidth
unsigned int myStipplePattern
std::vector< double > mySegmentPercentages
bool myGeometryDirty
bool mySegmentsDirty

Detailed Description

vrvGraphics implementation of a 2D Line


Member Typedef Documentation

typedef std::vector<osg::Vec2> makVrv::DtOsgWindowLineInstance::Points [protected]

Constructor & Destructor Documentation

CTOR.

DTOR.


Member Function Documentation

virtual void makVrv::DtOsgWindowLineInstance::setVertex ( unsigned int  vertex,
double  x,
double  y 
) [virtual]

Set (or add) the specified vertex at <x,y>

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::removeVertex ( unsigned int  vertex) [virtual]

Remove the specified vertex.

Implements makVrv::DtWindowLineInstance.

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

Set the entire line color.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setStipplePattern ( unsigned int  stipplePattern) [virtual]

Set the entire line stipple pattern.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setWidth ( unsigned int  width) [virtual]

Set the entire line width.

Implements makVrv::DtWindowLineInstance.

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

Set the percentage lengths of the segments; creates and removes segments as necessary.

Implements makVrv::DtWindowLineInstance.

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

Set the color of a segment.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentStartColor ( unsigned int  index,
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.

Implements makVrv::DtWindowLineInstance.

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

Set the color of the second vertex in a segment.

This can be used for color blending between vertices.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentLightningStyle ( unsigned int  index,
bool  enableLightningStyle 
) [virtual]

Set a segment's lightning style (whether or not it looks like a lighting bolt)

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentStartArrow ( unsigned int  index,
bool  enableStartArrow 
) [virtual]

Turn on or off a segment's start arrow.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentEndArrow ( unsigned int  index,
bool  enableEndArrow 
) [virtual]

Turn on or off a segment's end arrow.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentStipplePattern ( unsigned int  index,
unsigned int  stipplePattern 
) [virtual]

Set the stipple pattern for a segment according to the OpenGL line stipple feature.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentWidth ( unsigned int  index,
unsigned int  width 
) [virtual]

Set the width of a segment in pixels.

Implements makVrv::DtWindowLineInstance.

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

Set the line visible or invisible.

Implements makVrv::DtSetVisibilityInterface.

virtual void makVrv::DtOsgWindowLineInstance::update ( ) [virtual]

Called on signal_postUpdate; time to update render data.

Implements makVrv::DtWindowLineInstance.

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

Add segments to the segments attribute vector.

virtual void makVrv::DtOsgWindowLineInstance::createLineIfNecessary ( ) [protected, virtual]

Creates the line model.

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

Updates the segment information.

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

Updates the lines geometry.

virtual void makVrv::DtOsgWindowLineInstance::generateSegment ( int  segmentIndex,
const osg::Vec2 &  startPoint,
const osg::Vec2 &  endPoint,
const osg::Vec2 &  segmentAxis,
const osg::Vec2 &  segmentPerpendicular 
) [protected, virtual]

Generate vertices for a single segment.

virtual void makVrv::DtOsgWindowLineInstance::setupColorRanges ( SegmentAttributes segmentAttributes) [protected, virtual]

Determine the sub-segment range for each segment color specified.

virtual void makVrv::DtOsgWindowLineInstance::setLineSegmentColors ( unsigned int  vtx,
SegmentAttributes segmentAttributes 
) [protected, virtual]

Sets the point colors for the line segments based on the features and colors provided in segmentAttributes.


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)