![]() |
VR-Forces 4.0.4 Class Documentation
|
A 2D Line Stealth Draw Control Object. More...

Public Member Functions | |
| DtLine2DObject (DtExerciseConn *exConn, unsigned id, const DtVdcVector2D &startPosition, const DtVdcVector2D &endPosition, int numSegments=1, DtVdcColor color=DtVdcColor::DtVdcWhite, DtVdcLineSegment::DtVdcSegmentStyle lineStyle=DtVdcLineSegment::DtVdcSegmentStyleStraight, DtVdcLineSegment::DtVdcSegmentArrowStyle arrowStyle=DtVdcLineSegment::DtVdcSegmentArrowStyleNoArrow, unsigned thickness=1, unsigned pattern=0xffffff, bool flashing=false) | |
| Construct the 2D line Draw Control Object. | |
| virtual | ~DtLine2DObject () |
| virtual DtVdcVector2D | startPosition () const |
| startPosition accessor | |
| virtual void | setStartPosition (const DtVdcVector2D &startPosition) |
| startPosition mutator | |
| virtual DtVdcVector2D | endPosition () const |
| endPosition accessor | |
| virtual void | setEndPosition (const DtVdcVector2D &endPosition) |
| endPosition mutator | |
| virtual int | numSegments () const |
| numSegments accessor | |
| virtual void | setNumSegments (int numSegments) |
| numSegments mutator | |
| virtual const DtVdcColor & | color (int segment) const |
| color accessor | |
| virtual const DtVdcColor & | color () const |
| virtual void | setColor (const DtVdcColor &color, int segment) |
| color mutator | |
| virtual void | setColor (const DtVdcColor &color) |
| virtual DtVdcLineSegment::DtVdcSegmentStyle | lineStyle (int segment=0) const |
| lineStyle accessor | |
| virtual void | setLineStyle (DtVdcLineSegment::DtVdcSegmentStyle lineStyle, int segment=0) |
| lineStyle mutator | |
| virtual DtVdcLineSegment::DtVdcSegmentArrowStyle | arrowStyle (int segment=0) const |
| arrowStyle accessor | |
| virtual void | setArrowStyle (DtVdcLineSegment::DtVdcSegmentArrowStyle arrowStyle, int segment=0) |
| arrowStyle mutator | |
| virtual unsigned | pattern (int segment=0) const |
| pattern accessor | |
| virtual void | setPattern (unsigned pattern, int segment=0) |
| pattern mutator | |
| virtual unsigned | thickness (int segment=0) const |
| thickness accessor | |
| virtual void | setThickness (unsigned thickness, int segment=0) |
| thickness mutator | |
| virtual double | percentage (int segment) const |
| percentage accessor | |
| virtual void | setPercentage (double percentage, int segment) |
| percentage mutator | |
| virtual bool | flashing () const |
| flashing accessor | |
| virtual void | setFlashing (bool flashing) |
| flashing mutator | |
| virtual void | setRemoteGraphicSet (const std::string &setName) |
| virtual void | update () |
| Send updates to the environmental records to the publisher. | |
Protected Member Functions | |
| virtual void | initRecords () |
Protected Attributes | |
| DtVdcVector2D | myStartPosition |
| DtVdcVector2D | myEndPosition |
| bool | myFlashing |
| std::vector< DtVdcLineSegment > | myLineSegments |
| DtEnvironmentalLineRecord | myLineRecord |
| Dt3DGraphicalObjectLineStateRecord | myLineStateRecord |
Private Member Functions | |
| DtLine2DObject () | |
| Default constructor. | |
A 2D Line Stealth Draw Control Object.
DtLine2DObject represents a line that can be positioned and displayed on the screen. The line may be divided into multiple segments of varying relative lengths. A color, line style, arrow style, pattern and thickness may be specified for each segment; and the line can flash, if desired.
| vrvControlToolkit::DtLine2DObject::DtLine2DObject | ( | DtExerciseConn * | exConn, |
| unsigned | id, | ||
| const DtVdcVector2D & | startPosition, | ||
| const DtVdcVector2D & | endPosition, | ||
| int | numSegments = 1, |
||
| DtVdcColor | color = DtVdcColor::DtVdcWhite, |
||
| DtVdcLineSegment::DtVdcSegmentStyle | lineStyle = DtVdcLineSegment::DtVdcSegmentStyleStraight, |
||
| DtVdcLineSegment::DtVdcSegmentArrowStyle | arrowStyle = DtVdcLineSegment::DtVdcSegmentArrowStyleNoArrow, |
||
| unsigned | thickness = 1, |
||
| unsigned | pattern = 0xffffff, |
||
| bool | flashing = false |
||
| ) |
Construct the 2D line Draw Control Object.
Note that the color and subsequent default parameters are applied to all segments; multi-segmented lines are constructed with all segments being equally proportioned. The segment proportions and individual stylistic elements may all be modified after construction.
| exConn | Passed to DtDrawControlObject base (see) |
| id | Passed to DtDrawControlObject base (see) |
| startPosition | Starting position of the line on the screen - values go from [0.,0.] (left, bottom) to [1.,1.] (right, top) |
| endPosition | Ending position of the line on the screen - values go from [0.,0.] (left, bottom) to [1.,1.] (right, top) |
| numSegments | The number of segments the line should be divided into. Note that this can be changed at any time |
| color | The color to apply to all segments constructed |
| lineStyle | A style enumeration from DtVdcLineSegment applied to all segments constructed |
| arrowStyle | An arrow style enumeration from DtVdcLineSegment applied to all segments constructed |
| thickness | The number of pixels thick to draw all segments constructed |
| pattern | A stipple pattern used to draw all segments constructed |
| flashing | A boolean parameter indicating whether or not the line should be flashing |
| virtual vrvControlToolkit::DtLine2DObject::~DtLine2DObject | ( | ) | [virtual] |
| vrvControlToolkit::DtLine2DObject::DtLine2DObject | ( | ) | [private] |
Default constructor.
Private and not implemented - you must supply an id and basic geometric parameters to construct the line
| virtual DtVdcVector2D vrvControlToolkit::DtLine2DObject::startPosition | ( | ) | const [virtual] |
startPosition accessor
Get the line's start position
| virtual void vrvControlToolkit::DtLine2DObject::setStartPosition | ( | const DtVdcVector2D & | startPosition | ) | [virtual] |
startPosition mutator
Set the line's start position
| startPosition | [0.,0.] (left, bottom) to [1.,1.] (right, top) |
| virtual DtVdcVector2D vrvControlToolkit::DtLine2DObject::endPosition | ( | ) | const [virtual] |
endPosition accessor
Get the line's end position
| virtual void vrvControlToolkit::DtLine2DObject::setEndPosition | ( | const DtVdcVector2D & | endPosition | ) | [virtual] |
endPosition mutator
Set the line's end position
| endPosition | [0.,0.] (left, bottom) to [1.,1.] (right, top) |
| virtual int vrvControlToolkit::DtLine2DObject::numSegments | ( | ) | const [virtual] |
numSegments accessor
Get the number of segments in this line
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual void vrvControlToolkit::DtLine2DObject::setNumSegments | ( | int | numSegments | ) | [virtual] |
numSegments mutator
Set the number of individual segments that make up this line
| numSegments | 0 to N |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual const DtVdcColor& vrvControlToolkit::DtLine2DObject::color | ( | int | segment | ) | const [virtual] |
color accessor
Get the color assigned to the indicated segment
| segment | The segment to retrieve the color from |
| virtual const DtVdcColor& vrvControlToolkit::DtLine2DObject::color | ( | ) | const [virtual] |
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| virtual void vrvControlToolkit::DtLine2DObject::setColor | ( | const DtVdcColor & | color, |
| int | segment | ||
| ) | [virtual] |
color mutator
Set the color to use when drawing the indicated segment
| color | The DtVdcColor to use |
| segment | The segment to apply the color to |
| virtual void vrvControlToolkit::DtLine2DObject::setColor | ( | const DtVdcColor & | color | ) | [virtual] |
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| virtual DtVdcLineSegment::DtVdcSegmentStyle vrvControlToolkit::DtLine2DObject::lineStyle | ( | int | segment = 0 | ) | const [virtual] |
lineStyle accessor
Get the lineStyle assigned to the indicated segment
| segment | The segment to retrieve the lineStyle from |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual void vrvControlToolkit::DtLine2DObject::setLineStyle | ( | DtVdcLineSegment::DtVdcSegmentStyle | lineStyle, |
| int | segment = 0 |
||
| ) | [virtual] |
lineStyle mutator
Set the lineStyle to use when drawing the indicated segment
| lineStyle | The lineStyle to use for the indicated segment |
| segment | The segment to apply the lineStyle to |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual DtVdcLineSegment::DtVdcSegmentArrowStyle vrvControlToolkit::DtLine2DObject::arrowStyle | ( | int | segment = 0 | ) | const [virtual] |
arrowStyle accessor
Get the arrowStyle assigned to the indicated segment
| segment | The segment to retrieve the arrowStyle from |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual void vrvControlToolkit::DtLine2DObject::setArrowStyle | ( | DtVdcLineSegment::DtVdcSegmentArrowStyle | arrowStyle, |
| int | segment = 0 |
||
| ) | [virtual] |
arrowStyle mutator
Set the arrowStyle to use when drawing the indicated segment
| arrowStyle | The arrowStyle to use for the indicated segment |
| segment | The segment to apply the arrowStyle to |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual unsigned vrvControlToolkit::DtLine2DObject::pattern | ( | int | segment = 0 | ) | const [virtual] |
pattern accessor
Get the stipple pattern used when drawing the indicated segment
| segment | The segment to retrieve the pattern from |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual void vrvControlToolkit::DtLine2DObject::setPattern | ( | unsigned | pattern, |
| int | segment = 0 |
||
| ) | [virtual] |
pattern mutator
Set the stipple pattern to use when drawing the indicated segment
| pattern | The stipple pattern, 0x00000000 to 0xFFFFFFFF. |
| segment | The segment to apply the pattern to |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual unsigned vrvControlToolkit::DtLine2DObject::thickness | ( | int | segment = 0 | ) | const [virtual] |
thickness accessor
Get the thickness assigned to the indicated segment
| segment | The segment to retrieve the thickness from |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual void vrvControlToolkit::DtLine2DObject::setThickness | ( | unsigned | thickness, |
| int | segment = 0 |
||
| ) | [virtual] |
thickness mutator
Set the thickness to use when drawing the indicated segment
| thickness | The thickness in pixels, (0-255). Note that GL may not actually be willing or able to draw a line 255 pixels wide. It is implementation dependent. |
| segment | The segment to apply the thickness to |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual double vrvControlToolkit::DtLine2DObject::percentage | ( | int | segment | ) | const [virtual] |
percentage accessor
Get the percentage of the line that the indicated segment occupies
| segment | The segment to retrieve the percentage from |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual void vrvControlToolkit::DtLine2DObject::setPercentage | ( | double | percentage, |
| int | segment | ||
| ) | [virtual] |
percentage mutator
Set the percentage of the line that the indicated segment should occupy. Note that it is the responsibility of the user to ensure that the sum of the individual segment's percentages is 1.
| percentage | The percentage (0. to 1.) |
| segment | The segment to apply the precentage to |
Implements vrvControlToolkit::DtLineObjectInterface.
| virtual bool vrvControlToolkit::DtLine2DObject::flashing | ( | ) | const [virtual] |
flashing accessor
Get the boolean that indicates whether or not the line should flash
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| virtual void vrvControlToolkit::DtLine2DObject::setFlashing | ( | bool | flashing | ) | [virtual] |
flashing mutator
Set the boolean that indicates whether or not the line should flash
| flashing | true or false |
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| virtual void vrvControlToolkit::DtLine2DObject::setRemoteGraphicSet | ( | const std::string & | setName | ) | [virtual] |
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| virtual void vrvControlToolkit::DtLine2DObject::update | ( | ) | [virtual] |
Send updates to the environmental records to the publisher.
Implements vrvControlToolkit::DtDrawControlObject.
| virtual void vrvControlToolkit::DtLine2DObject::initRecords | ( | ) | [protected, virtual] |
bool vrvControlToolkit::DtLine2DObject::myFlashing [protected] |
std::vector<DtVdcLineSegment> vrvControlToolkit::DtLine2DObject::myLineSegments [protected] |
DtEnvironmentalLineRecord vrvControlToolkit::DtLine2DObject::myLineRecord [protected] |