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

Public Member Functions | |
| DtSdcTriangle2DObject (DtExerciseConn *exConn, unsigned id, const DtSdcVector2D &vertex1, const DtSdcVector2D &vertex2, const DtSdcVector2D &vertex3, const DtSdcVector2D &offset=DtSdcVector2D::zero(), const DtSdcVector2D &scale=DtSdcVector2D::ones(), double rotation=0.0, DtSdcColor color=DtSdcColor::DtSdcWhite, bool fill=false, unsigned pattern=0xffffffff, bool flashing=false) | |
| Construct the Triangle Draw Control Object. | |
| DtSdcTriangle2DObject (const DtSdcTriangle2DObject &orig) | |
| Copy constructor. | |
| DtSdcTriangle2DObject & | operator= (const DtSdcTriangle2DObject &rhs) |
| Assignment operator. | |
| virtual | ~DtSdcTriangle2DObject () |
| virtual DtSdcVector2D | vertex1 () const |
| vertex1 accessor | |
| virtual void | setVertex1 (const DtSdcVector2D &vertex) |
| vertex1 mutator | |
| virtual DtSdcVector2D | vertex2 () const |
| vertex2 accessor | |
| virtual void | setVertex2 (const DtSdcVector2D &vertex) |
| vertex2 mutator | |
| virtual DtSdcVector2D | vertex3 () const |
| vertex3 accessor | |
| virtual void | setVertex3 (const DtSdcVector2D &vertex) |
| vertex3 mutator | |
| virtual DtSdcVector2D | offset () const |
| offset accessor | |
| virtual void | setOffset (const DtSdcVector2D &offset) |
| offset mutator | |
| virtual DtSdcVector2D | scale () const |
| scale accessor | |
| virtual void | setScale (const DtSdcVector2D &scale) |
| scale mutator | |
| virtual double | rotation () const |
| rotation accessor | |
| virtual void | setRotation (double rotation) |
| rotation mutator | |
| virtual const DtSdcColor & | color () const |
| color accessor | |
| virtual void | setColor (const DtSdcColor &color) |
| color mutator | |
| virtual bool | fill () const |
| fill accessor | |
| virtual void | setFill (bool fill) |
| fill mutator | |
| virtual unsigned | pattern () const |
| pattern accessor | |
| virtual void | setPattern (unsigned pattern) |
| pattern mutator | |
| virtual bool | flashing () const |
| flashing accessor | |
| virtual void | setFlashing (bool flashing) |
| flashing mutator | |
| virtual void | setRemoteGraphicSet (const std::string &setName) |
| virtual void | update () |
| update the internal pdu | |
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 | |
| virtual DtSdcVector2D | transformVertex (const DtSdcVector2D &v, const DtSdcVector2D ¢er) const |
| virtual void | transformVertices () |
Protected Attributes | |
| DtSdcVector2D | myVertex1 |
| DtSdcVector2D | myVertex2 |
| DtSdcVector2D | myVertex3 |
| DtSdcVector2D | myOffset |
| DtSdcVector2D | myScale |
| DtSdcColor | myColor |
| unsigned | myPattern |
| bool | myFill |
| double | myRotation |
| bool | myFlashing |
| Dt2DGraphicalObjectStateRecord * | myStateRecord |
Protected Attributes inherited from DtSdcObject | |
| unsigned | myId |
| DtEnvironmentProcessPublisher | myPublisher |
| bool | myVisible |
| DtSdcColor | myEmptyColor |
Private Member Functions | |
| DtSdcTriangle2DObject () | |
| Default constructor. | |
A 2D triangular Stealth Draw Control Object.
DtSdcTriangle2DObject represents an Triangular Draw Control Object that can be sent to a MAK Stealth to be drawn on it's main view. The class inherits DtSdcObject
| DtSdcTriangle2DObject::DtSdcTriangle2DObject | ( | DtExerciseConn * | exConn, |
| unsigned | id, | ||
| const DtSdcVector2D & | vertex1, | ||
| const DtSdcVector2D & | vertex2, | ||
| const DtSdcVector2D & | vertex3, | ||
| const DtSdcVector2D & | offset = DtSdcVector2D::zero(), |
||
| const DtSdcVector2D & | scale = DtSdcVector2D::ones(), |
||
| double | rotation = 0.0, |
||
| DtSdcColor | color = DtSdcColor::DtSdcWhite, |
||
| bool | fill = false, |
||
| unsigned | pattern = 0xffffffff, |
||
| bool | flashing = false |
||
| ) |
Construct the Triangle Draw Control Object.
| id | Passed to DtSdcObject base (see) |
| vertex1 | Coordinates of the 1st vertex of the triangle. Values go from [0.,0.] to [1.,1.] |
| vertex2 | Coordinates of the 2nd vertex of the triangle. Values go from [0.,0.] to [1.,1.] |
| vertex3 | Coordinates of the 3rd vertex of the triangle. Values go from [0.,0.] to [1.,1.] |
| offset | These coordinate values are added to the coordinates of each vertex specified. Values go from [0.,0.] to [1.,1.] |
| scale | Scaling factor for an object Values go from [0.,0.] to [1.,1.] (the size of the screen along the X, y axes) |
| rotation | A counter-clockwise rotation to apply to the object - values go from 0 to 2 PI |
| color | The color of the object outline (and fill, if filled) |
| fill | A boolean parameter indicating whether or not the object should be filled |
| pattern | A pattern used when filling the object - values go from 0x00000000 (no fill) to 0xFFFFFF (solid) |
| flashing | A boolean parameter indicating whether or not the object should be flashing |
References Dt2DGraphicalObjectCategoryTriangle, Dt2DGraphicalObjectKind, DtEnv2DGraphicalObjectStateRecordType, DtSdcObject::id(), myColor, myFill, myFlashing, myOffset, myPattern, DtSdcObject::myPublisher, myRotation, myScale, myStateRecord, myVertex1, myVertex2, myVertex3, setColor(), setFill(), setFlashing(), Dt2DGraphicalObjectStateRecord::setNumberOfVertices(), setOffset(), setPattern(), setRotation(), setScale(), setVertex1(), setVertex2(), and setVertex3().
| DtSdcTriangle2DObject::DtSdcTriangle2DObject | ( | const DtSdcTriangle2DObject & | orig | ) |
Copy constructor.
If you're really cloning a Draw Control Object, be sure to give it a unique id after cloning using the setId() method.
|
virtual |
|
private |
Default constructor.
Private and not implemented - you must supply an id and basic geometric parameters to construct the ellipse or rectangle
| DtSdcTriangle2DObject& DtSdcTriangle2DObject::operator= | ( | const DtSdcTriangle2DObject & | rhs | ) |
Assignment operator.
|
virtual |
vertex1 accessor
Get the position of the triangle's first vertex.
References myVertex1.
Referenced by setVertex1().
|
virtual |
vertex1 mutator
Set the position of the triangle's first vertex.
| vertex | [0.,0.] to [1.,1.] |
References myVertex1, transformVertices(), and vertex1().
Referenced by DtSdcTriangle2DObject().
|
virtual |
vertex2 accessor
Get the position of the triangle's second vertex.
References myVertex2.
Referenced by setVertex2().
|
virtual |
vertex2 mutator
Set the position of the triangle's second vertex.
| vertex | [0.,0.] to [1.,1.] |
References myVertex2, transformVertices(), and vertex2().
Referenced by DtSdcTriangle2DObject().
|
virtual |
vertex3 accessor
Get the position of the triangle's third vertex.
References myVertex3.
Referenced by setVertex3().
|
virtual |
vertex3 mutator
Set the position of the triangle's third vertex.
| vertex | [0.,0.] to [1.,1.] |
References myVertex3, transformVertices(), and vertex3().
Referenced by DtSdcTriangle2DObject().
|
virtual |
offset accessor
Get the object's offset
References myOffset.
Referenced by setOffset().
|
virtual |
offset mutator
Set the object's offset
| offset | [0.,0.] to [1.,1.] |
References myOffset, offset(), and transformVertices().
Referenced by DtSdcTriangle2DObject().
|
virtual |
scale accessor
Get the object's scale factor in X and Y
References myScale.
Referenced by setScale().
|
virtual |
scale mutator
Set the object's scale factor in X and Y
| scale | [0.,0.] to [1.,1.] |
References myScale, scale(), and transformVertices().
Referenced by DtSdcTriangle2DObject().
|
virtual |
rotation accessor
Get the counter-clockwise rotation of the object about its center
References myRotation.
|
virtual |
rotation mutator
Set the counter-clockwise rotation of the object about center
| rotation | 0. to 2 PI radians |
Referenced by DtSdcTriangle2DObject().
|
virtual |
color accessor
Get the color assigned to this object
Reimplemented from DtSdcObject.
References myColor.
Referenced by setColor().
|
virtual |
color mutator
Set the color to use when drawing (and filling) this object
| color | The DtSdcColor to use |
Reimplemented from DtSdcObject.
References DtSdcColor::alpha(), DtSdcColor::blue(), color(), DtSdcColor::green(), myColor, myStateRecord, DtSdcColor::red(), and Dt2DGraphicalObjectStateRecord::setColor().
Referenced by DtSdcTriangle2DObject().
|
virtual |
fill accessor
Get the boolean that indicates whether or not the object should be filled when drawn.
References myFill.
|
virtual |
fill mutator
Set the boolean that indicates whether or not the object should be filled when drawn.
| fill | true or false |
References myStateRecord, and Dt2DGraphicalObjectStateRecord::setVertex().
Referenced by DtSdcTriangle2DObject().
|
virtual |
pattern accessor
Get the fill pattern to use if the object will be filled
References myPattern.
Referenced by setPattern().
|
virtual |
pattern mutator
Set the fill pattern to use if the object will be filled
| pattern | The fill pattern, 0x00000000 to 0xFFFFFFFF. The object is filled by a series of vertical lines that conform to the pattern, where each on bit results in a vertical line of the object's color |
References myPattern, myStateRecord, pattern(), and Dt2DGraphicalObjectStateRecord::setFillPattern().
Referenced by DtSdcTriangle2DObject().
|
virtual |
flashing accessor
Get the boolean that indicates whether or not the object should flash
Reimplemented from DtSdcObject.
References myFlashing.
Referenced by setFlashing().
|
virtual |
flashing mutator
Set the boolean that indicates whether or not the object should flash
| flashing | true or false |
Reimplemented from DtSdcObject.
References flashing(), myFlashing, myStateRecord, and Dt2DGraphicalObjectStateRecord::setFlashing().
Referenced by DtSdcTriangle2DObject().
|
virtual |
Reimplemented from DtSdcObject.
References myStateRecord, Dt2DGraphicalObjectStateRecord::setNumberOfParentOverlays(), and Dt2DGraphicalObjectStateRecord::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 DtSdcObject::myPublisher, and myStateRecord.
|
protectedvirtual |
References myOffset, myRotation, myScale, DtSdcVector2D::x(), and DtSdcVector2D::y().
Referenced by transformVertices().
|
protectedvirtual |
References myStateRecord, myVertex1, myVertex2, myVertex3, Dt2DGraphicalObjectStateRecord::setVertex(), and transformVertex().
Referenced by setOffset(), setScale(), setVertex1(), setVertex2(), and setVertex3().
|
protected |
Referenced by DtSdcTriangle2DObject(), setVertex1(), transformVertices(), and vertex1().
|
protected |
Referenced by DtSdcTriangle2DObject(), setVertex2(), transformVertices(), and vertex2().
|
protected |
Referenced by DtSdcTriangle2DObject(), setVertex3(), transformVertices(), and vertex3().
|
protected |
Referenced by DtSdcTriangle2DObject(), offset(), setOffset(), and transformVertex().
|
protected |
Referenced by DtSdcTriangle2DObject(), scale(), setScale(), and transformVertex().
|
protected |
Referenced by color(), DtSdcTriangle2DObject(), and setColor().
|
protected |
Referenced by DtSdcTriangle2DObject(), pattern(), and setPattern().
|
protected |
Referenced by DtSdcTriangle2DObject(), and fill().
|
protected |
Referenced by DtSdcTriangle2DObject(), rotation(), and transformVertex().
|
protected |
Referenced by DtSdcTriangle2DObject(), flashing(), and setFlashing().
|
protected |
Referenced by DtSdcTriangle2DObject(), setColor(), setFill(), setFlashing(), setPattern(), setRemoteGraphicSet(), transformVertices(), and update().