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

Classes | |
| struct | SegmentAttributes |
Public Member Functions | |
| Dt3DSegmentedLineModelInstance (DtDe &de) | |
| CTOR. | |
| virtual | ~Dt3DSegmentedLineModelInstance () |
| DTOR. | |
| virtual void | setPosition (int vtx, const DtVector &position) |
| Set the position of one endpoint of the line. | |
| virtual DtVector | removePosition (int vtx) |
| Remove the vertex at position vtx Returns the value of the vertex that replaces it (or 0,0,0 if none) | |
| 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 segmentWidth, 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 | setTerrainIntersect (bool enabled) |
| Set terrain intersection mode. | |
| 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 | addToConnector (DtOsgSceneConnector *connector) |
| Tell the model instance to add itself to the provided node. | |
| virtual bool | removeFromConnector (DtOsgSceneConnector *connector) |
| Tell the model instance to remove itself from the provided node. | |
| virtual void | setDepthTestEnabled (bool enabled) |
| Turn on or off depth testing (occlusion); default is true. | |
| virtual void | setVisible (bool isVisible) |
| Set the line visible or invisible; maintains state. | |
| virtual void | setPickable (bool pickable) |
| Turn on or off the ability to pick the line. Off by default. | |
| bool | pickable () const |
| Get whether the arc is pickable. | |
| virtual void | update () |
| Indicate that its time to prepare actual scene graph data to be rendered. | |
Protected Member Functions | |
| virtual Dt3DLineModelInstanceSegmentInterface * | createSegment () |
| Create an appropriate segment type. | |
| Dt3DLineModelInstanceSegment & | lineSegment (int i) |
| Helper method to return properly cast Dt3DLineModelInstanceSegment. | |
| const Dt3DLineModelInstanceSegment & | lineSegment (int i) const |
| Helper method to return properly cast Dt3DLineModelInstanceSegment. | |
| virtual void | updatePickableSegments () |
| Update the pickable segment objects. | |
| virtual void | adjustSegmentVisibility (int vtx, bool visible) |
| Adjust segment visibility. | |
| virtual void | resizeSegments (int size) |
| Resize the segments vector to size. | |
| virtual void | resizeSegmentAttributes (int size) |
| Resize the segment attributes vector to size. | |
| virtual void | updateGeometry () |
| Update the visibility, endpoints, etc. of the segments. | |
| virtual void | updateSegmentAttributes () |
| Update the state of the segment attributes. | |
Protected Attributes | |
| std::vector< osg::Vec3d > | myVertices |
| bool | myTerrainIntersectMode |
| int | myModelSet |
| bool | myVisible |
| std::vector< double > | mySegmentPercentages |
| std::vector < Dt3DLineModelInstanceSegmentInterface * > | mySegments |
| osg::ref_ptr< osg::Group > | myGroup |
| DtOsgSegmentPickable * | myPickable |
| double | myWidth |
| Structure to contain the line segments' attributes. | |
| osg::Vec4 | myColor |
| unsigned int | myStipplePattern |
| int | myStippleRepeat |
| bool | mySegmentAttributesDirty |
| bool | myGeometryDirty |
| std::vector< SegmentAttributes > | mySegmentAttributes |
Private Member Functions | |
| Dt3DSegmentedLineModelInstance () | |
| Default, unimplemented constructor. | |
| Dt3DSegmentedLineModelInstance (const Dt3DSegmentedLineModelInstance &) | |
| Unimplemented copy constructor. | |
| Dt3DSegmentedLineModelInstance & | operator= (const Dt3DSegmentedLineModelInstance &) |
| Unimplemented assignment operator. | |
Model instance to draw a 3D line with styleable segments.
| virtual makVrv::Dt3DSegmentedLineModelInstance::~Dt3DSegmentedLineModelInstance | ( | ) | [virtual] |
DTOR.
Default, unimplemented constructor.
| makVrv::Dt3DSegmentedLineModelInstance::Dt3DSegmentedLineModelInstance | ( | const Dt3DSegmentedLineModelInstance & | ) | [private] |
Unimplemented copy constructor.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setPosition | ( | int | vtx, |
| const DtVector & | position | ||
| ) | [virtual] |
Set the position of one endpoint of the line.
| virtual DtVector makVrv::Dt3DSegmentedLineModelInstance::removePosition | ( | int | vtx | ) | [virtual] |
Remove the vertex at position vtx Returns the value of the vertex that replaces it (or 0,0,0 if none)
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setWidth | ( | float | width | ) | [virtual] |
Set the width of the line.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [virtual] |
Set the color of the line.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setStipplePattern | ( | unsigned int | pattern, |
| int | repeatFactor | ||
| ) | [virtual] |
Set a stipple pattern for the line.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::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::Dt3DSegmentedLineModelInstance::setSegmentColor | ( | unsigned int | segmentIndex, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [virtual] |
Set the color of a particular segment.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentLightningStyle | ( | unsigned int | segmentIndex, |
| bool | enableLightningStyle | ||
| ) | [virtual] |
Turn on or off lightning bolt style for a particular segment.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentStartArrow | ( | unsigned int | segmentIndex, |
| bool | enableArrow | ||
| ) | [virtual] |
Turn on or off the arrow at a segment's start point.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentEndArrow | ( | unsigned int | segmentIndex, |
| bool | enableArrow | ||
| ) | [virtual] |
Turn on or off the arrow at a segment's end point.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::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::Dt3DSegmentedLineModelInstance::setSegmentWidth | ( | unsigned int | segmentWidth, |
| double | width | ||
| ) | [virtual] |
Set the line width of a segment.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::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::Dt3DSegmentedLineModelInstance::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::Dt3DSegmentedLineModelInstance::setTerrainIntersect | ( | bool | enabled | ) | [virtual] |
Set terrain intersection mode.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setModelSet | ( | int | modelSet | ) | [virtual] |
Set the model set this model instance uses (needed for doing intersections)
| virtual bool makVrv::Dt3DSegmentedLineModelInstance::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::Dt3DGreatCircleArcModelInstance.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::addToConnector | ( | DtOsgSceneConnector * | connector | ) | [virtual] |
Tell the model instance to add itself to the provided node.
Reimplemented from makVrv::DtOsgModelInstance.
| virtual bool makVrv::Dt3DSegmentedLineModelInstance::removeFromConnector | ( | DtOsgSceneConnector * | connector | ) | [virtual] |
Tell the model instance to remove itself from the provided node.
Reimplemented from makVrv::DtOsgModelInstance.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setDepthTestEnabled | ( | bool | enabled | ) | [virtual] |
Turn on or off depth testing (occlusion); default is true.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setVisible | ( | bool | isVisible | ) | [virtual] |
Set the line visible or invisible; maintains state.
Implements makVrv::DtModelInstance.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::setPickable | ( | bool | pickable | ) | [virtual] |
Turn on or off the ability to pick the line. Off by default.
Get whether the arc is pickable.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::update | ( | ) | [virtual] |
Indicate that its time to prepare actual scene graph data to be rendered.
| Dt3DSegmentedLineModelInstance& makVrv::Dt3DSegmentedLineModelInstance::operator= | ( | const Dt3DSegmentedLineModelInstance & | ) | [private] |
Unimplemented assignment operator.
| virtual Dt3DLineModelInstanceSegmentInterface* makVrv::Dt3DSegmentedLineModelInstance::createSegment | ( | ) | [protected, virtual] |
Create an appropriate segment type.
Reimplemented in makVrv::Dt3DGreatCircleArcModelInstance.
| Dt3DLineModelInstanceSegment& makVrv::Dt3DSegmentedLineModelInstance::lineSegment | ( | int | i | ) | [protected] |
Helper method to return properly cast Dt3DLineModelInstanceSegment.
| const Dt3DLineModelInstanceSegment& makVrv::Dt3DSegmentedLineModelInstance::lineSegment | ( | int | i | ) | const [protected] |
Helper method to return properly cast Dt3DLineModelInstanceSegment.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::updatePickableSegments | ( | ) | [protected, virtual] |
Update the pickable segment objects.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::adjustSegmentVisibility | ( | int | vtx, |
| bool | visible | ||
| ) | [protected, virtual] |
Adjust segment visibility.
also considering the total line visibility
| virtual void makVrv::Dt3DSegmentedLineModelInstance::resizeSegments | ( | int | size | ) | [protected, virtual] |
Resize the segments vector to size.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::resizeSegmentAttributes | ( | int | size | ) | [protected, virtual] |
Resize the segment attributes vector to size.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::updateGeometry | ( | ) | [protected, virtual] |
Update the visibility, endpoints, etc. of the segments.
Reimplemented in makVrv::Dt3DGreatCircleArcModelInstance.
| virtual void makVrv::Dt3DSegmentedLineModelInstance::updateSegmentAttributes | ( | ) | [protected, virtual] |
Update the state of the segment attributes.
Reimplemented in makVrv::Dt3DGreatCircleArcModelInstance.
std::vector<osg::Vec3d> makVrv::Dt3DSegmentedLineModelInstance::myVertices [protected] |
int makVrv::Dt3DSegmentedLineModelInstance::myModelSet [protected] |
std::vector<double> makVrv::Dt3DSegmentedLineModelInstance::mySegmentPercentages [protected] |
std::vector<Dt3DLineModelInstanceSegmentInterface*> makVrv::Dt3DSegmentedLineModelInstance::mySegments [protected] |
osg::ref_ptr<osg::Group> makVrv::Dt3DSegmentedLineModelInstance::myGroup [protected] |
double makVrv::Dt3DSegmentedLineModelInstance::myWidth [protected] |
Structure to contain the line segments' attributes.
osg::Vec4 makVrv::Dt3DSegmentedLineModelInstance::myColor [protected] |
unsigned int makVrv::Dt3DSegmentedLineModelInstance::myStipplePattern [protected] |
int makVrv::Dt3DSegmentedLineModelInstance::myStippleRepeat [protected] |
std::vector<SegmentAttributes> makVrv::Dt3DSegmentedLineModelInstance::mySegmentAttributes [protected] |