VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | 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]

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.
- Public Member Functions inherited from makVrv::DtWindowLineInstance
virtual ~DtWindowLineInstance ()
 DTOR.
- Public Member Functions inherited from makVrv::DtSetVisibilityInterface
virtual ~DtSetVisibilityInterface ()

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

makVrv::DtOsgWindowLineInstance::DtOsgWindowLineInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgWindowLineInstance::~DtOsgWindowLineInstance ( )
virtual

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)
protectedvirtual

Add segments to the segments attribute vector.

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

Creates the line model.

virtual void makVrv::DtOsgWindowLineInstance::updateSegments ( )
protectedvirtual

Updates the segment information.

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

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 
)
protectedvirtual

Generate vertices for a single segment.

virtual void makVrv::DtOsgWindowLineInstance::setupColorRanges ( SegmentAttributes segmentAttributes)
protectedvirtual

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

virtual void makVrv::DtOsgWindowLineInstance::setLineSegmentColors ( unsigned int  vtx,
SegmentAttributes segmentAttributes 
)
protectedvirtual

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

Member Data Documentation

DtDe& makVrv::DtOsgWindowLineInstance::myDe
protected
Points makVrv::DtOsgWindowLineInstance::myPoints
protected
Points makVrv::DtOsgWindowLineInstance::myVertices
protected
SegmentAttributesVector makVrv::DtOsgWindowLineInstance::mySegmentAttributes
protected
DtSegmentedLine* makVrv::DtOsgWindowLineInstance::myLine
protected
bool makVrv::DtOsgWindowLineInstance::myVisible
protected
osg::Vec4 makVrv::DtOsgWindowLineInstance::myColor
protected
float makVrv::DtOsgWindowLineInstance::myWidth
protected
unsigned int makVrv::DtOsgWindowLineInstance::myStipplePattern
protected
std::vector<double> makVrv::DtOsgWindowLineInstance::mySegmentPercentages
protected
bool makVrv::DtOsgWindowLineInstance::myGeometryDirty
protected
bool makVrv::DtOsgWindowLineInstance::mySegmentsDirty
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)