![]() |
VR-Vantage API Documentation
|
A common base class for representing ellipses and rectangles. More...

Public Member Functions | |
| virtual DtSdcVector2D | position () const |
| position accessor | |
| virtual void | setPosition (const DtSdcVector2D &position) |
| position mutator | |
| virtual DtSdcVector2D | size () const |
| size accessor | |
| virtual void | setSize (const DtSdcVector2D &size) |
| size 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 double | scale () const |
| scale accessor | |
| virtual void | setScale (double scale) |
| scale mutator | |
| virtual void | setRemoteGraphicSet (const std::string &setName) |
| virtual void | update () |
| update the internal pdu | |
Public Member Functions inherited from DtSdc2DPositionedObject | |
| DtSdc2DPositionedObject (DtExerciseConn *exConn, unsigned id, const DtString &objName) | |
| virtual | ~DtSdc2DPositionedObject () |
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 | |
| DtSdcEllRectBase (DtExerciseConn *exConn, unsigned id, const DtString &objName, const DtSdcVector2D &position, const DtSdcVector2D &size, double rotation=0.0, double scale=1.0, DtSdcColor color=DtSdcColor::DtSdcWhite, bool fill=false, unsigned pattern=0xffffffff, bool flashing=false) | |
| Construct the basis of an Ellipse or Rectangle Draw Control Object. | |
| virtual | ~DtSdcEllRectBase () |
Protected Attributes | |
| DtSdcVector2D | myPosition |
| DtSdcVector2D | mySize |
| DtSdcColor | myColor |
| unsigned | myPattern |
| bool | myFill |
| double | myRotation |
| bool | myFlashing |
| double | myScale |
| Dt2DGraphicalObjectStateRecord * | myStateRecord |
Private Member Functions | |
| DtSdcEllRectBase () | |
| Default constructor. | |
A common base class for representing ellipses and rectangles.
DtSdcEllRectBase in inherited by both DtSdcEllipseObject and DtSdcRectangleObject. Ellipses and rectangles are represented in the exact same way on the network, except for a type field which indicates which should be drawn. This base class provides mutators that allow the user to specify the position, shape, rotation, and color of the ellipse or rectangle on the Stealth screen; specify whether the object should be filled (and specify a fill pattern if it is); and optionally, make the object flash. This class shuold not be instantiated on its own (and its constructors are protected to prevent that).
|
protected |
Construct the basis of an Ellipse or Rectangle Draw Control Object.
| id | Passed to DtSdcObject base (see) |
| position | Center position on the screen - values go from [0.,0.] (left, bottom) to [1.,1.] (right, top) |
| size | Size of object along the X and Y axes (before rotation) = values go from [0.,0.] to [1.,1.] (the entire screen) |
| 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 DtEnv2DGraphicalObjectStateRecordType, myColor, myFill, myFlashing, myPattern, myPosition, myRotation, myScale, mySize, myStateRecord, setColor(), setFill(), setFlashing(), Dt2DGraphicalObjectStateRecord::setNumberOfVertices(), setPattern(), setPosition(), setRotation(), setScale(), setSize(), Dt2DGraphicalObjectStateRecord::setVertex(), and update().
|
protectedvirtual |
References myStateRecord.
|
private |
Default constructor.
Private and not implemented - you must supply an id and basic geometric parameters to construct the ellipse or rectangle
|
virtual |
position accessor
Get the object's center position
Implements DtSdc2DPositionedObject.
References myPosition.
Referenced by setPosition().
|
virtual |
position mutator
Set the object's center position
| position | [0.,0.] (left, bottom) to [1.,1.] (right, top) |
Implements DtSdc2DPositionedObject.
References Dt2DGraphicalObjectStateRecord::getVertex(), myPosition, myStateRecord, position(), Dt2DGraphicalObjectStateRecord::setVertex(), DtSdcVector2D::x(), and DtSdcVector2D::y().
Referenced by DtSdcEllRectBase().
|
virtual |
|
virtual |
size mutator
Set the object's size
| size | [0.,0.] to [1.,1.] (the entire screen) |
References Dt2DGraphicalObjectStateRecord::getVertex(), mySize, myStateRecord, Dt2DGraphicalObjectStateRecord::setVertex(), size(), DtSdcVector2D::x(), and DtSdcVector2D::y().
Referenced by DtSdcEllRectBase().
|
virtual |
rotation accessor
Get the counter-clockwise rotation of the object about its center
References myRotation.
Referenced by setRotation().
|
virtual |
rotation mutator
Set the counter-clockwise rotation of the object about center
| rotation | 0. to 2 PI radians |
References Dt2DGraphicalObjectStateRecord::getVertex(), myRotation, myStateRecord, rotation(), and Dt2DGraphicalObjectStateRecord::setVertex().
Referenced by DtSdcEllRectBase().
|
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 DtSdcEllRectBase().
|
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 DtSdcEllRectBase().
|
virtual |
pattern accessor
Get the fill pattern to use if the object will be filled
References myPattern.
|
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 myStateRecord, and Dt2DGraphicalObjectStateRecord::setFillPattern().
Referenced by DtSdcEllRectBase().
|
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 DtSdcEllRectBase().
|
virtual |
scale accessor
Get the scale factor applied to the object's size
References myScale.
Referenced by setScale().
|
virtual |
scale mutator
Set the scale factor applied to the object's size
| scale | 0+ |
References Dt2DGraphicalObjectStateRecord::getVertex(), myScale, myStateRecord, scale(), and Dt2DGraphicalObjectStateRecord::setVertex().
Referenced by DtSdcEllRectBase().
|
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.
Referenced by DtSdcEllRectBase().
|
protected |
Referenced by DtSdcEllRectBase(), position(), and setPosition().
|
protected |
Referenced by DtSdcEllRectBase(), setSize(), and size().
|
protected |
Referenced by color(), DtSdcEllRectBase(), and setColor().
|
protected |
Referenced by DtSdcEllRectBase(), and pattern().
|
protected |
Referenced by DtSdcEllRectBase(), and fill().
|
protected |
Referenced by DtSdcEllRectBase(), rotation(), and setRotation().
|
protected |
Referenced by DtSdcEllRectBase(), flashing(), and setFlashing().
|
protected |
Referenced by DtSdcEllRectBase(), scale(), and setScale().
|
protected |
Referenced by DtSdcEllRectBase(), setColor(), setFill(), setFlashing(), setPattern(), setPosition(), setRemoteGraphicSet(), setRotation(), setScale(), setSize(), update(), and ~DtSdcEllRectBase().