![]() |
VR-Forces 4.0.4 Class Documentation
|
Helper class to draw a styleable line segment; generates a geode containing the line segment geometry. More...

Classes | |
| struct | LineSegmentState |
| Structure to contain the line segment's state. More... | |
Public Member Functions | |
| Dt3DLineModelInstanceSegment () | |
| CTOR. | |
| ~Dt3DLineModelInstanceSegment () | |
| DTOR. | |
| virtual void | setStartPoint (const osg::Vec3d &startPoint) |
| Set the location of the segment's start point. | |
| virtual void | setEndPoint (const osg::Vec3d &endPoint) |
| Set the location of the segment's end point. | |
| const osg::Vec3d & | startPoint () const |
| const osg::Vec3d & | endPoint () const |
| virtual void | setColor (const osg::Vec4 &color) |
| Set the segment's color. | |
| virtual void | setVertexColor (unsigned int vertexIndex, const osg::Vec4 &color) |
| Set the color of one end of the segment. | |
| virtual void | setStartArrow (bool arrowEnabled) |
| Turn on or off the arrow at the segment's start point. | |
| virtual void | setEndArrow (bool arrowEnabled) |
| Turn on or off the arrow at the segment's end point. | |
| virtual void | setLightningStyle (bool lightningStyle) |
| Turn on or off lightning bolt style. | |
| virtual void | setWidth (double width) |
| Set the segment width in pixels. | |
| virtual double | width () const |
| Get the segment width in pixels. | |
| virtual void | setStipplePattern (unsigned int stipplePattern, int repeatFactor) |
| Set the line's stipple pattern. | |
| virtual osg::Node * | rootNode () |
| Get the node containing the line geometry. | |
| const std::vector< osg::Vec3 > & | pickableVertices () const |
| Get the vertex list for this segment's pickable. | |
| virtual void | update () |
| Indicate that its time to prepare actual scene graph data to be rendered. | |
| virtual void | updateGeometry () |
| Update all the geometry for this segment. | |
Protected Member Functions | |
| virtual void | build () |
| Build the line segment geometry. | |
| virtual void | calculateArrowVertices (const osg::Vec3d &segmentStart, const osg::Vec3d &segmentEnd, osg::Vec3d &arrowStartOut, osg::Vec3d &arrowEndOut) |
| Helper function to calculate the vertices of an arrowhead (the arrowhead is arrowStartOut->segmentStart->arrowEndOut) arrowStartOut and arrowEndOut are output parameters. | |
| virtual void | buildVertices () |
| Build and set the vertex array for the line segment geometry. | |
| virtual void | buildLinePrimitive () |
| Build and set the line primitive for the geometry. | |
| virtual void | buildPickableVertices () |
| Build the vertices necessary to populate the pickable object. | |
| virtual void | buildColorArray () |
| Build and set the color array for the geometry. | |
| virtual unsigned int | startArrowVertexIndex () |
| Get the index of the first vertex in the start arrow. | |
| virtual unsigned int | endArrowVertexIndex () |
| Get the index of the first vertex in the end arrow. | |
| virtual unsigned int | lightningVertexIndex () |
| Get the index of the first vertex of the lightning points. | |
Protected Attributes | |
| LineSegmentState | myState |
| bool | myGeometryDirty |
| osg::ref_ptr< osg::Billboard > | myGeode |
| osg::ref_ptr< osg::Geometry > | myGeometry |
| osg::ref_ptr< osg::Vec3Array > | myPickableVertices |
Helper class to draw a styleable line segment; generates a geode containing the line segment geometry.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setStartPoint | ( | const osg::Vec3d & | startPoint | ) | [virtual] |
Set the location of the segment's start point.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setEndPoint | ( | const osg::Vec3d & | endPoint | ) | [virtual] |
Set the location of the segment's end point.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| const osg::Vec3d& makVrv::Dt3DLineModelInstanceSegment::startPoint | ( | ) | const [inline] |
| const osg::Vec3d& makVrv::Dt3DLineModelInstanceSegment::endPoint | ( | ) | const [inline] |
| virtual void makVrv::Dt3DLineModelInstanceSegment::setColor | ( | const osg::Vec4 & | color | ) | [virtual] |
Set the segment's color.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setVertexColor | ( | unsigned int | vertexIndex, |
| const osg::Vec4 & | color | ||
| ) | [virtual] |
Set the color of one end of the segment.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setStartArrow | ( | bool | arrowEnabled | ) | [virtual] |
Turn on or off the arrow at the segment's start point.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setEndArrow | ( | bool | arrowEnabled | ) | [virtual] |
Turn on or off the arrow at the segment's end point.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setLightningStyle | ( | bool | lightningStyle | ) | [virtual] |
Turn on or off lightning bolt style.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setWidth | ( | double | width | ) | [virtual] |
Set the segment width in pixels.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual double makVrv::Dt3DLineModelInstanceSegment::width | ( | ) | const [virtual] |
Get the segment width in pixels.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual void makVrv::Dt3DLineModelInstanceSegment::setStipplePattern | ( | unsigned int | stipplePattern, |
| int | repeatFactor | ||
| ) | [virtual] |
Set the line's stipple pattern.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual osg::Node* makVrv::Dt3DLineModelInstanceSegment::rootNode | ( | ) | [virtual] |
Get the node containing the line geometry.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| const std::vector<osg::Vec3>& makVrv::Dt3DLineModelInstanceSegment::pickableVertices | ( | ) | const [virtual] |
Get the vertex list for this segment's pickable.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual void makVrv::Dt3DLineModelInstanceSegment::update | ( | ) | [virtual] |
Indicate that its time to prepare actual scene graph data to be rendered.
Implements makVrv::Dt3DLineModelInstanceSegmentInterface.
| virtual void makVrv::Dt3DLineModelInstanceSegment::updateGeometry | ( | ) | [virtual] |
Update all the geometry for this segment.
| virtual void makVrv::Dt3DLineModelInstanceSegment::build | ( | ) | [protected, virtual] |
Build the line segment geometry.
| virtual void makVrv::Dt3DLineModelInstanceSegment::calculateArrowVertices | ( | const osg::Vec3d & | segmentStart, |
| const osg::Vec3d & | segmentEnd, | ||
| osg::Vec3d & | arrowStartOut, | ||
| osg::Vec3d & | arrowEndOut | ||
| ) | [protected, virtual] |
Helper function to calculate the vertices of an arrowhead (the arrowhead is arrowStartOut->segmentStart->arrowEndOut) arrowStartOut and arrowEndOut are output parameters.
| virtual void makVrv::Dt3DLineModelInstanceSegment::buildVertices | ( | ) | [protected, virtual] |
Build and set the vertex array for the line segment geometry.
| virtual void makVrv::Dt3DLineModelInstanceSegment::buildLinePrimitive | ( | ) | [protected, virtual] |
Build and set the line primitive for the geometry.
| virtual void makVrv::Dt3DLineModelInstanceSegment::buildPickableVertices | ( | ) | [protected, virtual] |
Build the vertices necessary to populate the pickable object.
| virtual void makVrv::Dt3DLineModelInstanceSegment::buildColorArray | ( | ) | [protected, virtual] |
Build and set the color array for the geometry.
| virtual unsigned int makVrv::Dt3DLineModelInstanceSegment::startArrowVertexIndex | ( | ) | [protected, virtual] |
Get the index of the first vertex in the start arrow.
The second is at startArrowVertexIndex() + 1. Returns an arbitrary value the arrow is off
| virtual unsigned int makVrv::Dt3DLineModelInstanceSegment::endArrowVertexIndex | ( | ) | [protected, virtual] |
Get the index of the first vertex in the end arrow.
The second is at endArrowVertexIndex() + 1. Returns an arbitrary value if the arrow is off
| virtual unsigned int makVrv::Dt3DLineModelInstanceSegment::lightningVertexIndex | ( | ) | [protected, virtual] |
Get the index of the first vertex of the lightning points.
The second is at lightningVertexIndex() + 1 Returns an arbitrary value if lightning is off
osg::ref_ptr<osg::Billboard> makVrv::Dt3DLineModelInstanceSegment::myGeode [protected] |
osg::ref_ptr<osg::Geometry> makVrv::Dt3DLineModelInstanceSegment::myGeometry [protected] |
osg::ref_ptr<osg::Vec3Array> makVrv::Dt3DLineModelInstanceSegment::myPickableVertices [protected] |