![]() |
VR-Forces 4.0.4 Class Documentation
|
A class which represents a single line segment. More...
Public Member Functions | |
| DtLineSegment (DtOverlayRenderer &renderer) | |
| Create a a line segment. | |
| DtLineSegment (DtLineRenderer &renderer) | |
| Create a a line segment. | |
| ~DtLineSegment () | |
| Line segment destructor. | |
| void | setGroup (float group) |
| Set the group of the line segment. | |
| int | group () const |
| Get the group. | |
| void | set2DPositions (float x1, float y1, float x2, float y2) |
| Set the vertex positions. | |
| void | set2DPosition (unsigned int index0or1, float x, float y) |
| Set the first vertex position. | |
| void | get2DPosition (unsigned int index0or1, float &x, float &y) const |
| void | setFirstPosition (float x, float y) |
| Set the first vertex position. | |
| void | setSecondPosition (float x, float y) |
| Set the second vertex position. | |
| void | setColors (float r1, float g1, float b1, float a1, float r2, float g2, float b2, float a2) |
| Set the vertex colors. | |
| void | set3DPosition (int index0or1, float dx, float dy, float z, float w) |
| Set the 3D location of the line. | |
| void | get3DPosition (int index0or1, float &dx, float &dy, float &z, float &w) const |
| virtual void | set3DDirection (unsigned int index0or1, float x, float y, float z) |
| Set the normalized direction of the line in world space. | |
| virtual void | get3DDirection (unsigned int index0or1, float &x, float &y, float &z) const |
| Get the normalized direction of the vertex. | |
| virtual void | setDirection2DLength (unsigned int index0or1, float length) |
| Set the length of the line in 2D space. | |
| virtual float | direction2DLength (unsigned int index0or1) const |
| Get the length of the line in 2D space. | |
| void | setColor (unsigned int index0or1, float r, float g, float b, float a) |
| void | getColor (unsigned int index0or1, float &r, float &g, float &b, float &a) const |
| void | setColor1 (float r1, float g1, float b1, float a1) |
| void | setColor2 (float r2, float g2, float b2, float a2) |
| void | setColor (float r, float g, float b, float a) |
| void | setWidth (float w) |
| Set a line width, from 0.0 to 64.0); Default line width is 1.0. | |
| float | width () const |
| Get the line width. | |
| void | setStippleParameters (unsigned int scale, unsigned short pattern) |
| Set the line Stipple parameters. | |
| void | getStippleParameters (unsigned int &scale, unsigned short &pattern) const |
| Get the line stipple parameters Uses the two arguments as return values. | |
Static Public Attributes | |
| static const unsigned short | NoStipple = 0xFFFF |
| static const unsigned short | NoLine = 0x0 |
Protected Member Functions | |
| DtLineSegment () | |
Private Member Functions | |
| DtLineSegment (const DtLineSegment &) | |
| DtLineSegment & | operator= (const DtLineSegment &) |
Private Attributes | |
| DtLineSegmentProxy * | myProxy |
A class which represents a single line segment.
| makVrv::DtLineSegment::DtLineSegment | ( | DtOverlayRenderer & | renderer | ) |
Create a a line segment.
| makVrv::DtLineSegment::DtLineSegment | ( | DtLineRenderer & | renderer | ) |
Create a a line segment.
Line segment destructor.
| makVrv::DtLineSegment::DtLineSegment | ( | const DtLineSegment & | ) | [private] |
| makVrv::DtLineSegment::DtLineSegment | ( | ) | [inline, protected] |
| void makVrv::DtLineSegment::setGroup | ( | float | group | ) |
Set the group of the line segment.
Setting the group to zero causes the line to be hidden. Setting the group to negative numbers causes the line to be drawn relative to North. 1
| int makVrv::DtLineSegment::group | ( | ) | const |
Get the group.
| void makVrv::DtLineSegment::set2DPositions | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2 | ||
| ) |
Set the vertex positions.
| void makVrv::DtLineSegment::set2DPosition | ( | unsigned int | index0or1, |
| float | x, | ||
| float | y | ||
| ) |
Set the first vertex position.
| void makVrv::DtLineSegment::get2DPosition | ( | unsigned int | index0or1, |
| float & | x, | ||
| float & | y | ||
| ) | const |
| void makVrv::DtLineSegment::setFirstPosition | ( | float | x, |
| float | y | ||
| ) |
Set the first vertex position.
| void makVrv::DtLineSegment::setSecondPosition | ( | float | x, |
| float | y | ||
| ) |
Set the second vertex position.
| void makVrv::DtLineSegment::setColors | ( | float | r1, |
| float | g1, | ||
| float | b1, | ||
| float | a1, | ||
| float | r2, | ||
| float | g2, | ||
| float | b2, | ||
| float | a2 | ||
| ) |
Set the vertex colors.
| void makVrv::DtLineSegment::set3DPosition | ( | int | index0or1, |
| float | dx, | ||
| float | dy, | ||
| float | z, | ||
| float | w | ||
| ) |
Set the 3D location of the line.
This will set the 3D location for each end of the line.
| void makVrv::DtLineSegment::get3DPosition | ( | int | index0or1, |
| float & | dx, | ||
| float & | dy, | ||
| float & | z, | ||
| float & | w | ||
| ) | const |
| virtual void makVrv::DtLineSegment::set3DDirection | ( | unsigned int | index0or1, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) | [virtual] |
Set the normalized direction of the line in world space.
| virtual void makVrv::DtLineSegment::get3DDirection | ( | unsigned int | index0or1, |
| float & | x, | ||
| float & | y, | ||
| float & | z | ||
| ) | const [virtual] |
Get the normalized direction of the vertex.
| virtual void makVrv::DtLineSegment::setDirection2DLength | ( | unsigned int | index0or1, |
| float | length | ||
| ) | [virtual] |
Set the length of the line in 2D space.
| virtual float makVrv::DtLineSegment::direction2DLength | ( | unsigned int | index0or1 | ) | const [virtual] |
Get the length of the line in 2D space.
| void makVrv::DtLineSegment::setColor | ( | unsigned int | index0or1, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
| void makVrv::DtLineSegment::getColor | ( | unsigned int | index0or1, |
| float & | r, | ||
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | const |
| void makVrv::DtLineSegment::setColor1 | ( | float | r1, |
| float | g1, | ||
| float | b1, | ||
| float | a1 | ||
| ) |
| void makVrv::DtLineSegment::setColor2 | ( | float | r2, |
| float | g2, | ||
| float | b2, | ||
| float | a2 | ||
| ) |
| void makVrv::DtLineSegment::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [inline] |
| void makVrv::DtLineSegment::setWidth | ( | float | w | ) |
Set a line width, from 0.0 to 64.0); Default line width is 1.0.
| float makVrv::DtLineSegment::width | ( | ) | const |
Get the line width.
| void makVrv::DtLineSegment::setStippleParameters | ( | unsigned int | scale, |
| unsigned short | pattern | ||
| ) |
Set the line Stipple parameters.
Scale is from 1-256. Pattern is 16 bit mask. Warning Stippled lines are rendered significantly slower than non-Stippled lines. Setting the pattern to NoStipple causes the line not to be stippled anymore.
| void makVrv::DtLineSegment::getStippleParameters | ( | unsigned int & | scale, |
| unsigned short & | pattern | ||
| ) | const |
Get the line stipple parameters Uses the two arguments as return values.
| DtLineSegment& makVrv::DtLineSegment::operator= | ( | const DtLineSegment & | ) | [private] |
const unsigned short makVrv::DtLineSegment::NoStipple = 0xFFFF [static] |
const unsigned short makVrv::DtLineSegment::NoLine = 0x0 [static] |
DtLineSegmentProxy* makVrv::DtLineSegment::myProxy [private] |