VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
vrvControlToolkit::DtEllipseRectangleBase Class Reference

A common base class for representing ellipses and rectangles. More...

Inheritance diagram for vrvControlToolkit::DtEllipseRectangleBase:
Inheritance graph
[legend]

Public Member Functions

virtual DtVdcVector2D position () const
 position accessor More...
 
virtual void setPosition (const DtVdcVector2D &position)
 position mutator More...
 
virtual DtVdcVector2D size () const
 size accessor More...
 
virtual void setSize (const DtVdcVector2D &size)
 size mutator More...
 
virtual double rotation () const
 rotation accessor More...
 
virtual void setRotation (double rotation)
 rotation mutator More...
 
virtual const DtVdcColorcolor () const
 color accessor More...
 
virtual void setColor (const DtVdcColor &color)
 color mutator More...
 
virtual bool fill () const
 fill accessor More...
 
virtual void setFill (bool fill)
 fill mutator More...
 
virtual unsigned pattern () const
 pattern accessor More...
 
virtual void setPattern (unsigned pattern)
 pattern mutator More...
 
virtual bool flashing () const
 flashing accessor More...
 
virtual void setFlashing (bool flashing)
 flashing mutator More...
 
virtual double scale () const
 scale accessor More...
 
virtual void setScale (double scale)
 scale mutator More...
 
virtual void setRemoteGraphicSet (const std::string &setName)
 
virtual void update ()
 update the internal pdu More...
 
- Public Member Functions inherited from vrvControlToolkit::Dt2DPositionedObject
 Dt2DPositionedObject (DtExerciseConn *exConn, unsigned id, const DtString &objName)
 
virtual ~Dt2DPositionedObject ()
 
- Public Member Functions inherited from vrvControlToolkit::DtDrawControlObject
 DtDrawControlObject (DtExerciseConn *exConn, unsigned id, const DtString &objName)
 Parameterized constructor. More...
 
virtual ~DtDrawControlObject ()
 Virtual destructor. More...
 
virtual unsigned id () const
 id accessor More...
 
virtual void setId (unsigned id)
 id mutator More...
 
virtual const
DtGlobalObjectDesignator
globalId () const
 
virtual void setVisible (bool yesNo)
 
virtual bool visible () const
 

Protected Member Functions

 DtEllipseRectangleBase (DtExerciseConn *exConn, unsigned id, const DtString &objName, const DtVdcVector2D &position, const DtVdcVector2D &size, double rotation=0.0, double scale=1.0, DtVdcColor color=DtVdcColor::DtVdcWhite, bool fill=false, unsigned pattern=0xffffffff, bool flashing=false)
 Construct the basis of an Ellipse or Rectangle Draw Control Object. More...
 
virtual ~DtEllipseRectangleBase ()
 

Protected Attributes

DtVdcVector2D myPosition
 
DtVdcVector2D mySize
 
DtVdcColor myColor
 
unsigned myPattern
 
bool myFill
 
double myRotation
 
bool myFlashing
 
double myScale
 
Dt2DGraphicalObjectStateRecordmyStateRecord
 
- Protected Attributes inherited from vrvControlToolkit::DtDrawControlObject
unsigned myId
 
DtEnvironmentProcessPublishermyPublisher
 
bool myVisible
 
DtVdcColor myEmptyColor
 

Private Member Functions

 DtEllipseRectangleBase ()
 Default constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from vrvControlToolkit::DtDrawControlObject
static void setPublisherCreator (DtEnvironmentProcessPublisherCreator *creator)
 
- Static Protected Attributes inherited from vrvControlToolkit::DtDrawControlObject
static
DtEnvironmentProcessPublisherCreator
thePublisherCreator
 

Detailed Description

A common base class for representing ellipses and rectangles.

DtEllipseRectangleBase in inherited by both DtEllipseObject and DtRectangleObject. 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).

Constructor & Destructor Documentation

vrvControlToolkit::DtEllipseRectangleBase::DtEllipseRectangleBase ( DtExerciseConn *  exConn,
unsigned  id,
const DtString objName,
const DtVdcVector2D position,
const DtVdcVector2D size,
double  rotation = 0.0,
double  scale = 1.0,
DtVdcColor  color = DtVdcColor::DtVdcWhite,
bool  fill = false,
unsigned  pattern = 0xffffffff,
bool  flashing = false 
)
protected

Construct the basis of an Ellipse or Rectangle Draw Control Object.

Parameters
idPassed to DtDrawControlObject base (see)
positionPosition on the screen - values go from [0.,0.] (left, bottom) to [1.,1.] (right, top) For rectangles, this is the bottom left corner of the rectangle, and for ellipses, this is the center of the ellipse
sizeSize of object along the X and Y axes (before rotation) = values go from [0.,0.] to [1.,1.] (the entire screen). For rectangles, this specifies the dimensions, and for ellipses, this specifies the radii.
rotationA counter-clockwise rotation to apply to the object - values go from 0 to 2 PI
colorThe color of the object outline (and fill, if filled)
fillA boolean parameter indicating whether or not the object should be filled
patternA pattern used when filling the object - values go from 0x00000000 (no fill) to 0xFFFFFF (solid)
flashingA boolean parameter indicating whether or not the object should be flashing
virtual vrvControlToolkit::DtEllipseRectangleBase::~DtEllipseRectangleBase ( )
protectedvirtual
vrvControlToolkit::DtEllipseRectangleBase::DtEllipseRectangleBase ( )
private

Default constructor.

Private and not implemented - you must supply an id and basic geometric parameters to construct the ellipse or rectangle

Member Function Documentation

virtual DtVdcVector2D vrvControlToolkit::DtEllipseRectangleBase::position ( ) const
virtual

position accessor

Get the object's center position

Returns
[0.,0.] (left, bottom) to [1.,1.] (right, top)

Implements vrvControlToolkit::Dt2DPositionedObject.

virtual void vrvControlToolkit::DtEllipseRectangleBase::setPosition ( const DtVdcVector2D position)
virtual

position mutator

Set the object's center position

Parameters
position[0.,0.] (left, bottom) to [1.,1.] (right, top)

Implements vrvControlToolkit::Dt2DPositionedObject.

virtual DtVdcVector2D vrvControlToolkit::DtEllipseRectangleBase::size ( ) const
virtual

size accessor

Get the object's size

Returns
[0.,0.] to [1.,1.] (the entire screen)
virtual void vrvControlToolkit::DtEllipseRectangleBase::setSize ( const DtVdcVector2D size)
virtual

size mutator

Set the object's size

Parameters
size[0.,0.] to [1.,1.] (the entire screen)
virtual double vrvControlToolkit::DtEllipseRectangleBase::rotation ( ) const
virtual

rotation accessor

Get the counter-clockwise rotation of the object about its center

Returns
0. to 2 PI radians
virtual void vrvControlToolkit::DtEllipseRectangleBase::setRotation ( double  rotation)
virtual

rotation mutator

Set the counter-clockwise rotation of the object about center

Parameters
rotation0. to 2 PI radians
virtual const DtVdcColor& vrvControlToolkit::DtEllipseRectangleBase::color ( ) const
virtual

color accessor

Get the color assigned to this object

Returns
Instance of DtVdcColor

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual void vrvControlToolkit::DtEllipseRectangleBase::setColor ( const DtVdcColor color)
virtual

color mutator

Set the color to use when drawing (and filling) this object

Parameters
colorThe DtVdcColor to use

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual bool vrvControlToolkit::DtEllipseRectangleBase::fill ( ) const
virtual

fill accessor

Get the boolean that indicates whether or not the object should be filled when drawn.

Returns
Boolean fill value
virtual void vrvControlToolkit::DtEllipseRectangleBase::setFill ( bool  fill)
virtual

fill mutator

Set the boolean that indicates whether or not the object should be filled when drawn.

Parameters
filltrue or false
virtual unsigned vrvControlToolkit::DtEllipseRectangleBase::pattern ( ) const
virtual

pattern accessor

Get the fill pattern to use if the object will be filled

Returns
The fill pattern, 0x00000000 to 0xFFFFFFFF
virtual void vrvControlToolkit::DtEllipseRectangleBase::setPattern ( unsigned  pattern)
virtual

pattern mutator

Set the fill pattern to use if the object will be filled

Parameters
patternThe 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
virtual bool vrvControlToolkit::DtEllipseRectangleBase::flashing ( ) const
virtual

flashing accessor

Get the boolean that indicates whether or not the object should flash

Returns
true or false

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual void vrvControlToolkit::DtEllipseRectangleBase::setFlashing ( bool  flashing)
virtual

flashing mutator

Set the boolean that indicates whether or not the object should flash

Parameters
flashingtrue or false

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual double vrvControlToolkit::DtEllipseRectangleBase::scale ( ) const
virtual

scale accessor

Get the scale factor applied to the object's size

Returns
0+
virtual void vrvControlToolkit::DtEllipseRectangleBase::setScale ( double  scale)
virtual

scale mutator

Set the scale factor applied to the object's size

Parameters
scale0+
virtual void vrvControlToolkit::DtEllipseRectangleBase::setRemoteGraphicSet ( const std::string &  setName)
virtual
virtual void vrvControlToolkit::DtEllipseRectangleBase::update ( )
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 vrvControlToolkit::DtDrawControlObject.

Member Data Documentation

DtVdcVector2D vrvControlToolkit::DtEllipseRectangleBase::myPosition
protected
DtVdcVector2D vrvControlToolkit::DtEllipseRectangleBase::mySize
protected
DtVdcColor vrvControlToolkit::DtEllipseRectangleBase::myColor
protected
unsigned vrvControlToolkit::DtEllipseRectangleBase::myPattern
protected
bool vrvControlToolkit::DtEllipseRectangleBase::myFill
protected
double vrvControlToolkit::DtEllipseRectangleBase::myRotation
protected
bool vrvControlToolkit::DtEllipseRectangleBase::myFlashing
protected
double vrvControlToolkit::DtEllipseRectangleBase::myScale
protected
Dt2DGraphicalObjectStateRecord* vrvControlToolkit::DtEllipseRectangleBase::myStateRecord
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)