![]() |
VR-Forces 4.0.4 Class Documentation
|
Model instance to draw a 3D line with styleable segments onto the 2D overlay. More...

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< DtVector > | Points |
| 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 |
| DtSegmentedLine * | myLine |
| 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. | |
| DtOverlaySegmentedLineModelInstance & | operator= (const DtOverlaySegmentedLineModelInstance &) |
| Unimplemented assignment operator. | |
Model instance to draw a 3D line with styleable segments onto the 2D overlay.
typedef std::vector<DtVector> makVrv::DtOverlaySegmentedLineModelInstance::Points [protected] |
typedef std::vector<SegmentAttributes> makVrv::DtOverlaySegmentedLineModelInstance::SegmentAttributesVector [protected] |
| virtual makVrv::DtOverlaySegmentedLineModelInstance::~DtOverlaySegmentedLineModelInstance | ( | ) | [virtual] |
DTOR.
Default, unimplemented constructor.
| makVrv::DtOverlaySegmentedLineModelInstance::DtOverlaySegmentedLineModelInstance | ( | const DtOverlaySegmentedLineModelInstance & | ) | [private] |
Unimplemented copy constructor.
| virtual void makVrv::DtOverlaySegmentedLineModelInstance::setPosition | ( | int | vtx, |
| const DtVector & | position | ||
| ) | [virtual] |
Set the position of one endpoint of the line.
| virtual void makVrv::DtOverlaySegmentedLineModelInstance::removePosition | ( | int | vtx | ) | [virtual] |
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)
| virtual bool makVrv::DtOverlaySegmentedLineModelInstance::realize | ( | DtModelDefinition & | definition | ) | [virtual] |
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.
| virtual void makVrv::DtOverlaySegmentedLineModelInstance::update | ( | ) | [virtual] |
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.
| virtual void makVrv::DtOverlaySegmentedLineModelInstance::createLineIfNecessary | ( | ) | [protected, virtual] |
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.
SegmentAttributesVector makVrv::DtOverlaySegmentedLineModelInstance::mySegmentAttributes [protected] |
unsigned int makVrv::DtOverlaySegmentedLineModelInstance::myModelSet [protected] |
osg::Vec4 makVrv::DtOverlaySegmentedLineModelInstance::myColor [protected] |
float makVrv::DtOverlaySegmentedLineModelInstance::myWidth [protected] |
unsigned int makVrv::DtOverlaySegmentedLineModelInstance::myStipplePattern [protected] |
int makVrv::DtOverlaySegmentedLineModelInstance::myStippleRepeat [protected] |
std::vector<double> makVrv::DtOverlaySegmentedLineModelInstance::mySegmentPercentages [protected] |
float makVrv::DtOverlaySegmentedLineModelInstance::myEventWidth [protected] |
osg::Vec3d makVrv::DtOverlaySegmentedLineModelInstance::myOrigin [protected] |
osg::Quat makVrv::DtOverlaySegmentedLineModelInstance::myRotation [protected] |