![]() |
VR-Vantage API Documentation
|
A 3D Line Stealth Draw Control Object. More...

Public Member Functions | |
| DtSdcLine3DObject (DtExerciseConn *exConn, unsigned id, const DtSdc3DAttachPoint &startAttachment, const DtSdc3DAttachPoint &endAttachment, int numSegments=1, const DtVector &offset=DtVector::zero(), DtSdcColor color=DtSdcColor::DtSdcWhite, DtSdcLineSegment::DtSdcSegmentStyle lineStyle=DtSdcLineSegment::DtSdcSegmentStyleStraight, DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle=DtSdcLineSegment::DtSdcSegmentArrowStyleNoArrow, unsigned thickness=1, unsigned pattern=0xffffff, bool flashing=false, bool checkLos=false, bool projected=false) | |
| Construct the Line Draw Control Object. | |
| virtual | ~DtSdcLine3DObject () |
| virtual const DtSdc3DAttachPoint & | startAttachment () const |
| startAttachment accessor | |
| virtual void | setStartAttachment (const DtSdc3DAttachPoint &startAttachment) |
| startAttachment mutator | |
| virtual const DtSdc3DAttachPoint & | endAttachment () const |
| endAttachment accessor | |
| virtual void | setEndAttachment (const DtSdc3DAttachPoint &endAttachment) |
| endAttachment mutator | |
| virtual const DtVector & | offset () const |
| offset accessor | |
| virtual void | setOffset (const DtVector &off) |
| offset mutator | |
| virtual int | numSegments () const |
| numSegments accessor | |
| virtual void | setNumSegments (int numSegments) |
| numSegments mutator | |
| virtual const DtSdcColor & | color (int segment) const |
| color accessor | |
| virtual const DtSdcColor & | color () const |
| virtual void | setColor (const DtSdcColor &color, int segment) |
| color mutator | |
| virtual void | setColor (const DtSdcColor &color) |
| virtual DtSdcLineSegment::DtSdcSegmentStyle | lineStyle (int segment=0) const |
| lineStyle accessor | |
| virtual void | setLineStyle (DtSdcLineSegment::DtSdcSegmentStyle lineStyle, int segment=0) |
| lineStyle mutator | |
| virtual DtSdcLineSegment::DtSdcSegmentArrowStyle | arrowStyle (int segment=0) const |
| arrowStyle accessor | |
| virtual void | setArrowStyle (DtSdcLineSegment::DtSdcSegmentArrowStyle 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 bool | checkLos () const |
| checkLos accessor | |
| virtual void | setCheckLos (bool checkLos) |
| checkLos mutator | |
| virtual bool | projected () const |
| projected accessor | |
| virtual void | setProjected (bool projected) |
| projected mutator | |
| virtual void | setRemoteGraphicSet (const std::string &setName) |
| virtual void | update () |
| update the internal pdu | |
Public Member Functions inherited from DtSdc3DTwoPositionedObject | |
| DtSdc3DTwoPositionedObject (DtExerciseConn *exConn, unsigned id, const DtString &objName) | |
| virtual | ~DtSdc3DTwoPositionedObject () |
Public Member Functions inherited from DtSdcObject | |
| DtSdcObject (DtExerciseConn *exConn, unsigned id, const DtString &objName) | |
| Parameterized constructor. | |
| virtual | ~DtSdcObject () |
| Virtual destructor. | |
| virtual unsigned | id () const |
| id accessor | |
| virtual void | setId (unsigned id) |
| id mutator | |
| virtual const DtGlobalObjectDesignator & | globalId () const |
| virtual void | setVisible (bool yesNo) |
| virtual bool | visible () const |
Protected Member Functions | |
| void | initRecords () |
Protected Attributes | |
| DtSdc3DAttachPoint | myStartAttachment |
| DtSdc3DAttachPoint | myEndAttachment |
| DtVector | myOffset |
| bool | myFlashing |
| bool | myCheckLos |
| bool | myProjected |
| std::vector< DtSdcLineSegment > | myLineSegments |
| DtEnvironmentalLineRecord | myLineRecord |
| Dt3DGraphicalObjectLineStateRecord | myLineStateRecord |
Private Member Functions | |
| DtSdcLine3DObject () | |
| Default constructor. | |
| DtSdcLine3DObject (const DtSdcLine3DObject &orig) | |
| Copy constructor. | |
| DtSdcLine3DObject & | operator= (const DtSdcLine3DObject &rhs) |
| Assignment operator. | |
A 3D Line Stealth Draw Control Object.
DtSdcLine3DObject represents a line that can be positioned and displayed in the scene. 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.
| DtSdcLine3DObject::DtSdcLine3DObject | ( | DtExerciseConn * | exConn, |
| unsigned | id, | ||
| const DtSdc3DAttachPoint & | startAttachment, | ||
| const DtSdc3DAttachPoint & | endAttachment, | ||
| int | numSegments = 1, |
||
| const DtVector & | offset = DtVector::zero(), |
||
| DtSdcColor | color = DtSdcColor::DtSdcWhite, |
||
| DtSdcLineSegment::DtSdcSegmentStyle | lineStyle = DtSdcLineSegment::DtSdcSegmentStyleStraight, |
||
| DtSdcLineSegment::DtSdcSegmentArrowStyle | arrowStyle = DtSdcLineSegment::DtSdcSegmentArrowStyleNoArrow, |
||
| unsigned | thickness = 1, |
||
| unsigned | pattern = 0xffffff, |
||
| bool | flashing = false, |
||
| bool | checkLos = false, |
||
| bool | projected = false |
||
| ) |
Construct the 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.
| id | Passed to DtSdcObject base (see) |
| startAttachment | Starting attachment of the line |
| endAttachment | Ending attachment of the line |
| numSegments | The number of segments the line should be divided into. Note that this can be changed at any time |
| enuOffset | a 3D vector indicating an east/north/up offset (in meters) from the base attachment that is applied to both start and end positions |
| color | The color to apply to all segments constructed |
| lineStyle | A style enumeration from DtSdcLineSegment applied to all segments constructed |
| arrowStyle | An arrow style enumeration from DtSdcLineSegment 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 |
| checkLos | A boolean parameter indicating whether or not the line should be terminated upon collision with the terrain. A check is made going from the starting attachment point to the end attachment point. If any terrain is intersected, that point of intersection becomes the new (temporary) end attach point. This is re-evaluated each frame, so may become CPU intensive for long lines or complex terrains |
| projected | A boolean parameter indicating whether or not the line should be projected onto the overlay. This prevents terrain occlusion |
References Dt3DGraphicalObjectCategoryLine, Dt3DGraphicalObjectKind, DtSdcObject::id(), initRecords(), DtSdcObject::myPublisher, numSegments(), setArrowStyle(), setColor(), setLineStyle(), setNumSegments(), setPattern(), setPercentage(), and setThickness().
|
virtual |
|
private |
Default constructor.
Private and not implemented - you must supply an id and basic geometric parameters to construct the line
|
private |
Copy constructor.
Private and unimplemented - not copyable.
|
private |
Assignment operator.
Private and unimplemented - not copyable.
|
virtual |
startAttachment accessor
Get the line's start position
Implements DtSdc3DTwoPositionedObject.
References myStartAttachment.
Referenced by setStartAttachment().
|
virtual |
startAttachment mutator
Set the line's start position
| startAttachment | attach point type and data |
Implements DtSdc3DTwoPositionedObject.
References DtSdc3DAttachPoint::attachedId(), DtSdc3DAttachPoint::attachmentType(), DtSdc3DAttachPoint::attachmentTypeScene, DtSdc3DAttachPoint::isAttached(), DtSdc3DAttachPoint::location(), myEndAttachment, myLineRecord, myLineStateRecord, myStartAttachment, DtSdc3DAttachPoint::relativePosition(), Dt3DGraphicalObjectStateRecord::setAttachment(), setEndAttachment(), Dt3DGraphicalObjectStateRecord::setNumberOfAttachments(), and startAttachment().
Referenced by setEndAttachment().
|
virtual |
endAttachment accessor
Get the line's end position
Implements DtSdc3DTwoPositionedObject.
References myEndAttachment.
Referenced by setEndAttachment().
|
virtual |
endAttachment mutator
Set the line's end position
| endAttachment | attach point type and data |
Implements DtSdc3DTwoPositionedObject.
References DtSdc3DAttachPoint::attachedId(), DtSdc3DAttachPoint::attachmentType(), DtSdc3DAttachPoint::attachmentTypeScene, endAttachment(), DtSdc3DAttachPoint::isAttached(), DtSdc3DAttachPoint::location(), myEndAttachment, myLineRecord, myLineStateRecord, myStartAttachment, DtSdc3DAttachPoint::relativePosition(), Dt3DGraphicalObjectStateRecord::setAttachment(), Dt3DGraphicalObjectStateRecord::setNumberOfAttachments(), and setStartAttachment().
Referenced by setStartAttachment().
|
virtual |
offset accessor
Get the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise
References myOffset.
|
virtual |
offset mutator
Set the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise
| offset | [X, Y, Z] |
References myLineStateRecord, myOffset, and Dt3DGraphicalObjectStateRecord::setOffset().
|
virtual |
numSegments accessor
Get the number of segments in this line
Implements DtSdcLineObjectInterface.
References myLineSegments.
Referenced by DtSdcLine3DObject().
|
virtual |
numSegments mutator
Set the number of individual segments that make up this line
| numSegments | 0 to N |
Implements DtSdcLineObjectInterface.
References myLineSegments, myLineStateRecord, and Dt3DGraphicalObjectLineStateRecord::setNumberOfSegments().
Referenced by DtSdcLine3DObject().
|
virtual |
color accessor
Get the color assigned to the indicated segment
| segment | The segment to retrieve the color from |
References myLineSegments.
|
virtual |
Reimplemented from DtSdcObject.
|
virtual |
color mutator
Set the color to use when drawing the indicated segment
| color | The DtSdcColor to use |
| segment | The segment to apply the color to |
References DtSdcColor::alpha(), DtSdcColor::blue(), Dt3DGraphicalObjectLineStateRecord::getSegment(), DtSdcColor::green(), myLineSegments, myLineStateRecord, DtSdcColor::red(), DtLineSegmentDescriptor::setColor(), and Dt3DGraphicalObjectLineStateRecord::setSegment().
Referenced by DtSdcLine3DObject(), and setColor().
|
virtual |
Reimplemented from DtSdcObject.
References setColor().
|
virtual |
lineStyle accessor
Get the lineStyle assigned to the indicated segment
| segment | The segment to retrieve the lineStyle from |
Implements DtSdcLineObjectInterface.
References myLineSegments.
|
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 DtSdcLineObjectInterface.
References Dt3DGraphicalObjectLineStateRecord::getSegment(), myLineSegments, myLineStateRecord, DtLineSegmentDescriptor::setLineStyle(), and Dt3DGraphicalObjectLineStateRecord::setSegment().
Referenced by DtSdcLine3DObject().
|
virtual |
arrowStyle accessor
Get the arrowStyle assigned to the indicated segment
| segment | The segment to retrieve the arrowStyle from |
Implements DtSdcLineObjectInterface.
References myLineSegments.
|
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 DtSdcLineObjectInterface.
References Dt3DGraphicalObjectLineStateRecord::getSegment(), myLineSegments, myLineStateRecord, DtLineSegmentDescriptor::setArrowStyle(), and Dt3DGraphicalObjectLineStateRecord::setSegment().
Referenced by DtSdcLine3DObject().
|
virtual |
pattern accessor
Get the stipple pattern used when drawing the indicated segment
| segment | The segment to retrieve the pattern from |
Implements DtSdcLineObjectInterface.
References myLineSegments.
|
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 DtSdcLineObjectInterface.
References Dt3DGraphicalObjectLineStateRecord::getSegment(), myLineSegments, myLineStateRecord, DtLineSegmentDescriptor::setLinePattern(), and Dt3DGraphicalObjectLineStateRecord::setSegment().
Referenced by DtSdcLine3DObject().
|
virtual |
thickness accessor
Get the thickness assigned to the indicated segment
| segment | The segment to retrieve the thickness from |
Implements DtSdcLineObjectInterface.
References myLineSegments.
|
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's implementation dependent. |
| segment | The segment to apply the thickness to |
Implements DtSdcLineObjectInterface.
References Dt3DGraphicalObjectLineStateRecord::getSegment(), myLineSegments, myLineStateRecord, DtLineSegmentDescriptor::setLineWidth(), and Dt3DGraphicalObjectLineStateRecord::setSegment().
Referenced by DtSdcLine3DObject().
|
virtual |
percentage accessor
Get the percentage of the line that the indicated segment occupies
| segment | The segment to retrieve the percentage from |
Implements DtSdcLineObjectInterface.
References myLineSegments.
|
virtual |
percentage mutator
Set the percentage of the line that the indicated segment should occupy. Note that it's 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 DtSdcLineObjectInterface.
References Dt3DGraphicalObjectLineStateRecord::getSegment(), myLineSegments, myLineStateRecord, DtLineSegmentDescriptor::setPercentage(), and Dt3DGraphicalObjectLineStateRecord::setSegment().
Referenced by DtSdcLine3DObject().
|
virtual |
flashing accessor
Get the boolean that indicates whether or not the line should flash
Reimplemented from DtSdcObject.
References myFlashing.
Referenced by setFlashing().
|
virtual |
flashing mutator
Set the boolean that indicates whether or not the line should flash
| flashing | true or false |
Reimplemented from DtSdcObject.
References flashing(), myFlashing, myLineStateRecord, and Dt3DGraphicalObjectStateRecord::setFlashing().
|
virtual |
checkLos accessor
Get the boolean that indicates whether or not the line is checked for terrain collisions
References myCheckLos.
Referenced by setCheckLos().
|
virtual |
checkLos mutator
Set the boolean that indicates whether or not the line is checked for terrain collisions
| checkLos | true or false |
References checkLos(), myCheckLos, myLineStateRecord, and Dt3DGraphicalObjectLineStateRecord::setCheckLos().
|
virtual |
projected accessor
Get the boolean that indicates whether or not the line (if it is a 3D line) should be projected onto the overlay (preventing terrain occlusion)
References myProjected.
Referenced by setProjected().
|
virtual |
projected mutator
Set the boolean that indicates whether or not the line (if it is a 3D line) should be projected onto the overlay (preventing terrain occlusion)
| projected | true or false |
References myLineStateRecord, myProjected, projected(), and Dt3DGraphicalObjectStateRecord::setProjected().
|
virtual |
Reimplemented from DtSdcObject.
References myLineStateRecord, Dt3DGraphicalObjectStateRecord::setNumberOfParentOverlays(), and Dt3DGraphicalObjectStateRecord::setParentOverlay().
|
virtual |
update the internal pdu
Make sure the internal pdu reflects the actual state of the draw control object's members. This is necessary because some members can be modified directly (which make the interface easier to use). DtStealthRemoteDrawer::update() calls this, so the user doesn't need to; but if the user is accessing the pdu directly (via the pdu() accessor) this should be called before using the pdu.
Implements DtSdcObject.
References myLineRecord, myLineStateRecord, and DtSdcObject::myPublisher.
|
protected |
References DtSdc3DAttachPoint::attachedId(), DtSdc3DAttachPoint::attachmentType(), DtSdc3DAttachPoint::attachmentTypeScene, DtSdc3DAttachPoint::isAttached(), DtSdc3DAttachPoint::location(), myCheckLos, myEndAttachment, myFlashing, myLineRecord, myLineStateRecord, myOffset, myProjected, myStartAttachment, DtSdc3DAttachPoint::relativePosition(), Dt3DGraphicalObjectStateRecord::setAttachment(), Dt3DGraphicalObjectLineStateRecord::setCheckLos(), Dt3DGraphicalObjectStateRecord::setFlashing(), Dt3DGraphicalObjectStateRecord::setNumberOfAttachments(), Dt3DGraphicalObjectStateRecord::setOffset(), and Dt3DGraphicalObjectStateRecord::setProjected().
Referenced by DtSdcLine3DObject().
|
protected |
Referenced by initRecords(), setEndAttachment(), setStartAttachment(), and startAttachment().
|
protected |
Referenced by endAttachment(), initRecords(), setEndAttachment(), and setStartAttachment().
|
protected |
Referenced by initRecords(), offset(), and setOffset().
|
protected |
Referenced by flashing(), initRecords(), and setFlashing().
|
protected |
Referenced by checkLos(), initRecords(), and setCheckLos().
|
protected |
Referenced by initRecords(), projected(), and setProjected().
|
protected |
Referenced by arrowStyle(), color(), lineStyle(), numSegments(), pattern(), percentage(), setArrowStyle(), setColor(), setLineStyle(), setNumSegments(), setPattern(), setPercentage(), setThickness(), and thickness().
|
protected |
Referenced by initRecords(), setEndAttachment(), setStartAttachment(), and update().
|
protected |