![]() |
VR-Forces 4.0.4 Class Documentation
|
vrvGraphics implementation of a 2D Line More...

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 | |
| DtDe & | myDe |
| Points | myPoints |
| Points | myVertices |
| SegmentAttributesVector | mySegmentAttributes |
| DtSegmentedLine * | myLine |
| bool | myVisible |
| osg::Vec4 | myColor |
| float | myWidth |
| unsigned int | myStipplePattern |
| std::vector< double > | mySegmentPercentages |
| bool | myGeometryDirty |
| bool | mySegmentsDirty |
vrvGraphics implementation of a 2D Line
typedef std::vector<SegmentAttributes> makVrv::DtOsgWindowLineInstance::SegmentAttributesVector [protected] |
typedef std::vector<osg::Vec2> makVrv::DtOsgWindowLineInstance::Points [protected] |
CTOR.
| virtual makVrv::DtOsgWindowLineInstance::~DtOsgWindowLineInstance | ( | ) | [virtual] |
DTOR.
| 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.
DtDe& makVrv::DtOsgWindowLineInstance::myDe [protected] |
Points makVrv::DtOsgWindowLineInstance::myPoints [protected] |
Points makVrv::DtOsgWindowLineInstance::myVertices [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] |