![]() |
VR-Forces 4.0.4 Class Documentation
|
A convex polygon drawn using lines. More...
Public Member Functions | |
| DtSegmentedLine (DtOverlayRenderer &renderer, DtWidgetPicker &picker) | |
| CTOR. | |
| DtSegmentedLine (DtLineRenderer &renderer, DtWidgetPicker &picker) | |
| CTOR. | |
| virtual | ~DtSegmentedLine () |
| DTOR. | |
| void | setEventsEnabled (bool enabled, unsigned long long userData=0) |
| Set whether the sprite has widget events. | |
| bool | eventsEnabled () const |
| Get whether events are already enabled. | |
| virtual void | setVertexCount (unsigned int vertexCount) |
| Set the number of vertices, set the number of vertices before setting their parameters (position, color etc). | |
| virtual unsigned int | vertexCount () const |
| Get the vertex count. | |
| virtual unsigned int | segmentCount () const |
| Number of segments available. | |
| virtual void | set2DPosition (unsigned int vertexIndex, float x1, float y1) |
| Set the vertex positions. | |
| virtual void | get2DPosition (unsigned int vertexIndex, float &x, float &y) const |
| Get the vertex position. | |
| virtual void | set3DPosition (unsigned int vertexIndex, float x, float y, float z, float w) |
| Set one vertex position. | |
| virtual void | get3DPosition (unsigned int vertexIndex, float &x, float &y, float &z, float &w) const |
| Get the vertex position. | |
| virtual void | set3DDirection (unsigned int vertexIndex, float x, float y, float z) |
| Set the normalized direction of the line in world space. | |
| virtual void | get3DDirection (unsigned int vertexIndex, float &x, float &y, float &z) const |
| Get the normalized direction of the vertex. | |
| virtual void | setDirection2DLength (unsigned int vertexIndex, float length) |
| Set the length of the line in 2D space. | |
| virtual float | direction2DLength (unsigned int vertexIndex) const |
| Get the length of the line in 2D space. | |
| virtual void | setSegmentColor (unsigned int segment, float r, float g, float b, float a) |
| Set the color of the segment (non-blending) | |
| virtual void | setPointColor (unsigned int point, float r, float g, float b, float a) |
| Set the color of the point (bleding) | |
| virtual void | setStipplePattern (unsigned int segment, unsigned int pattern) |
| Set the stipple pattern. | |
| virtual void | setWidth (unsigned int segment, float w) |
| Set the line width. | |
| virtual void | setEventWidth (float) |
| Sets the width of the event outline segments. | |
Protected Types | |
| typedef std::vector < DtLineSegment * > | LineSegmentList |
| typedef std::vector < DtPickableLine * > | PickableSegmentList |
Protected Attributes | |
| DtLineRenderer & | myRenderer |
| DtWidgetPicker & | myPicker |
| LineSegmentList | myLineSegments |
| PickableSegmentList | myPickableSegments |
| bool | myEventsEnabled |
| unsigned int | myVertexCount |
| unsigned long long | myUserData |
| float | myEventWidth |
A convex polygon drawn using lines.
typedef std::vector<DtLineSegment*> makVrv::DtSegmentedLine::LineSegmentList [protected] |
typedef std::vector<DtPickableLine*> makVrv::DtSegmentedLine::PickableSegmentList [protected] |
| makVrv::DtSegmentedLine::DtSegmentedLine | ( | DtOverlayRenderer & | renderer, |
| DtWidgetPicker & | picker | ||
| ) |
CTOR.
| makVrv::DtSegmentedLine::DtSegmentedLine | ( | DtLineRenderer & | renderer, |
| DtWidgetPicker & | picker | ||
| ) |
CTOR.
| virtual makVrv::DtSegmentedLine::~DtSegmentedLine | ( | ) | [virtual] |
DTOR.
| void makVrv::DtSegmentedLine::setEventsEnabled | ( | bool | enabled, |
| unsigned long long | userData = 0 |
||
| ) |
Set whether the sprite has widget events.
Disabling events disconnects all of the DtSegmentedLine signals The user data is set when enabling the events, to change only the user data make multiple calls with enabled=true
| bool makVrv::DtSegmentedLine::eventsEnabled | ( | ) | const |
Get whether events are already enabled.
| virtual void makVrv::DtSegmentedLine::setVertexCount | ( | unsigned int | vertexCount | ) | [virtual] |
Set the number of vertices, set the number of vertices before setting their parameters (position, color etc).
The number of segments will be one less than the number of vertices set, with the count being at least 1 if the vertex count is > 0
| virtual unsigned int makVrv::DtSegmentedLine::vertexCount | ( | ) | const [virtual] |
Get the vertex count.
This count will always be one more than the number of segments available. Use segment count to get the number of segments
| virtual unsigned int makVrv::DtSegmentedLine::segmentCount | ( | ) | const [virtual] |
Number of segments available.
| virtual void makVrv::DtSegmentedLine::set2DPosition | ( | unsigned int | vertexIndex, |
| float | x1, | ||
| float | y1 | ||
| ) | [virtual] |
Set the vertex positions.
| virtual void makVrv::DtSegmentedLine::get2DPosition | ( | unsigned int | vertexIndex, |
| float & | x, | ||
| float & | y | ||
| ) | const [virtual] |
Get the vertex position.
| virtual void makVrv::DtSegmentedLine::set3DPosition | ( | unsigned int | vertexIndex, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) | [virtual] |
Set one vertex position.
NOTE it is much more efficient to update all vertices using setPositions If several change.
| virtual void makVrv::DtSegmentedLine::get3DPosition | ( | unsigned int | vertexIndex, |
| float & | x, | ||
| float & | y, | ||
| float & | z, | ||
| float & | w | ||
| ) | const [virtual] |
Get the vertex position.
| virtual void makVrv::DtSegmentedLine::set3DDirection | ( | unsigned int | vertexIndex, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) | [virtual] |
Set the normalized direction of the line in world space.
| virtual void makVrv::DtSegmentedLine::get3DDirection | ( | unsigned int | vertexIndex, |
| float & | x, | ||
| float & | y, | ||
| float & | z | ||
| ) | const [virtual] |
Get the normalized direction of the vertex.
| virtual void makVrv::DtSegmentedLine::setDirection2DLength | ( | unsigned int | vertexIndex, |
| float | length | ||
| ) | [virtual] |
Set the length of the line in 2D space.
| virtual float makVrv::DtSegmentedLine::direction2DLength | ( | unsigned int | vertexIndex | ) | const [virtual] |
Get the length of the line in 2D space.
| virtual void makVrv::DtSegmentedLine::setSegmentColor | ( | unsigned int | segment, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [virtual] |
Set the color of the segment (non-blending)
| virtual void makVrv::DtSegmentedLine::setPointColor | ( | unsigned int | point, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [virtual] |
Set the color of the point (bleding)
| virtual void makVrv::DtSegmentedLine::setStipplePattern | ( | unsigned int | segment, |
| unsigned int | pattern | ||
| ) | [virtual] |
Set the stipple pattern.
| virtual void makVrv::DtSegmentedLine::setWidth | ( | unsigned int | segment, |
| float | w | ||
| ) | [virtual] |
Set the line width.
| virtual void makVrv::DtSegmentedLine::setEventWidth | ( | float | ) | [virtual] |
Sets the width of the event outline segments.
To use the outline width as the event width set the event outline width to -1.0f;
DtLineRenderer& makVrv::DtSegmentedLine::myRenderer [protected] |
DtWidgetPicker& makVrv::DtSegmentedLine::myPicker [protected] |
bool makVrv::DtSegmentedLine::myEventsEnabled [protected] |
unsigned int makVrv::DtSegmentedLine::myVertexCount [protected] |
unsigned long long makVrv::DtSegmentedLine::myUserData [protected] |
float makVrv::DtSegmentedLine::myEventWidth [protected] |