VR-Forces 4.7 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::DtTriangle2DObject Class Reference

A 2D triangular Stealth Draw Control Object. More...

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

Public Member Functions

 DtTriangle2DObject (DtExerciseConn *exConn, unsigned id, const DtVdcVector2D &vertex1, const DtVdcVector2D &vertex2, const DtVdcVector2D &vertex3, const DtVdcVector2D &offset=DtVdcVector2D::zero(), const DtVdcVector2D &scale=DtVdcVector2D::ones(), double rotation=0.0, DtVdcColor color=DtVdcColor::DtVdcWhite, bool fill=false, unsigned pattern=0xffffffff, bool flashing=false)
 Construct the Triangle Draw Control Object.
 DtTriangle2DObject (const DtTriangle2DObject &orig)
 Copy constructor.
DtTriangle2DObjectoperator= (const DtTriangle2DObject &rhs)
 Assignment operator.
virtual ~DtTriangle2DObject ()
virtual DtVdcVector2D vertex1 () const
 vertex1 accessor
virtual void setVertex1 (const DtVdcVector2D &vertex)
 vertex1 mutator
virtual DtVdcVector2D vertex2 () const
 vertex2 accessor
virtual void setVertex2 (const DtVdcVector2D &vertex)
 vertex2 mutator
virtual DtVdcVector2D vertex3 () const
 vertex3 accessor
virtual void setVertex3 (const DtVdcVector2D &vertex)
 vertex3 mutator
virtual DtVdcVector2D offset () const
 offset accessor
virtual void setOffset (const DtVdcVector2D &offset)
 offset mutator
virtual DtVdcVector2D scale () const
 scale accessor
virtual void setScale (const DtVdcVector2D &scale)
 scale mutator
virtual double rotation () const
 rotation accessor
virtual void setRotation (double rotation)
 rotation mutator
virtual const DtVdcColorcolor () const
 color accessor
virtual void setColor (const DtVdcColor &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 vrvControlToolkit::DtDrawControlObject
 DtDrawControlObject (DtExerciseConn *exConn, unsigned id, const DtString &objName)
 Parameterized constructor.
virtual ~DtDrawControlObject ()
 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 DtVdcVector2D transformVertex (const DtVdcVector2D &v, const DtVdcVector2D &center) const
virtual void transformVertices ()

Protected Attributes

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

Private Member Functions

 DtTriangle2DObject ()
 Default constructor.

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 2D triangular Stealth Draw Control Object.

DtTriangle2DObject represents an Triangular Draw Control Object that can be sent to a MAK Stealth to be drawn on its main view. The class inherits DtDrawControlObject

Constructor & Destructor Documentation

vrvControlToolkit::DtTriangle2DObject::DtTriangle2DObject ( DtExerciseConn *  exConn,
unsigned  id,
const DtVdcVector2D vertex1,
const DtVdcVector2D vertex2,
const DtVdcVector2D vertex3,
const DtVdcVector2D offset = DtVdcVector2D::zero(),
const DtVdcVector2D scale = DtVdcVector2D::ones(),
double  rotation = 0.0,
DtVdcColor  color = DtVdcColor::DtVdcWhite,
bool  fill = false,
unsigned  pattern = 0xffffffff,
bool  flashing = false 
)

Construct the Triangle Draw Control Object.

Parameters
idPassed to DtDrawControlObject base (see)
vertex1Coordinates of the 1st vertex of the triangle. Values go from [0.,0.] to [1.,1.]
vertex2Coordinates of the 2nd vertex of the triangle. Values go from [0.,0.] to [1.,1.]
vertex3Coordinates of the 3rd vertex of the triangle. Values go from [0.,0.] to [1.,1.]
offsetThese coordinate values are added to the coordinates of each vertex specified. Values go from [0.,0.] to [1.,1.]
scaleScaling factor for an object Values go from [0.,0.] to [1.,1.] (the size of the screen along the X, y axes)
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
vrvControlToolkit::DtTriangle2DObject::DtTriangle2DObject ( const DtTriangle2DObject 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 vrvControlToolkit::DtTriangle2DObject::~DtTriangle2DObject ( )
virtual
vrvControlToolkit::DtTriangle2DObject::DtTriangle2DObject ( )
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

DtTriangle2DObject& vrvControlToolkit::DtTriangle2DObject::operator= ( const DtTriangle2DObject rhs)

Assignment operator.

virtual DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::vertex1 ( ) const
virtual

vertex1 accessor

Get the position of the triangle's first vertex.

Returns
[0.,0.] to [1.,1.]
virtual void vrvControlToolkit::DtTriangle2DObject::setVertex1 ( const DtVdcVector2D vertex)
virtual

vertex1 mutator

Set the position of the triangle's first vertex.

Parameters
vertex[0.,0.] to [1.,1.]
virtual DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::vertex2 ( ) const
virtual

vertex2 accessor

Get the position of the triangle's second vertex.

Returns
[0.,0.] to [1.,1.]
virtual void vrvControlToolkit::DtTriangle2DObject::setVertex2 ( const DtVdcVector2D vertex)
virtual

vertex2 mutator

Set the position of the triangle's second vertex.

Parameters
vertex[0.,0.] to [1.,1.]
virtual DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::vertex3 ( ) const
virtual

vertex3 accessor

Get the position of the triangle's third vertex.

Returns
[0.,0.] to [1.,1.]
virtual void vrvControlToolkit::DtTriangle2DObject::setVertex3 ( const DtVdcVector2D vertex)
virtual

vertex3 mutator

Set the position of the triangle's third vertex.

Parameters
vertex[0.,0.] to [1.,1.]
virtual DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::offset ( ) const
virtual

offset accessor

Get the object's offset

Returns
[0.,0.] to [1.,1.]
virtual void vrvControlToolkit::DtTriangle2DObject::setOffset ( const DtVdcVector2D offset)
virtual

offset mutator

Set the object's offset

Parameters
offset[0.,0.] to [1.,1.]
virtual DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::scale ( ) const
virtual

scale accessor

Get the object's scale factor in X and Y

Returns
[0.,0.] to [1.,1.]
virtual void vrvControlToolkit::DtTriangle2DObject::setScale ( const DtVdcVector2D scale)
virtual

scale mutator

Set the object's scale factor in X and Y

Parameters
scale[0.,0.] to [1.,1.]
virtual double vrvControlToolkit::DtTriangle2DObject::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::DtTriangle2DObject::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::DtTriangle2DObject::color ( ) const
virtual

color accessor

Get the color assigned to this object

Returns
Instance of DtVdcColor

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual void vrvControlToolkit::DtTriangle2DObject::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::DtTriangle2DObject::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::DtTriangle2DObject::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::DtTriangle2DObject::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::DtTriangle2DObject::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::DtTriangle2DObject::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::DtTriangle2DObject::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 void vrvControlToolkit::DtTriangle2DObject::setRemoteGraphicSet ( const std::string &  setName)
virtual
virtual void vrvControlToolkit::DtTriangle2DObject::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.

virtual DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::transformVertex ( const DtVdcVector2D v,
const DtVdcVector2D center 
) const
protectedvirtual
virtual void vrvControlToolkit::DtTriangle2DObject::transformVertices ( )
protectedvirtual

Member Data Documentation

DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::myVertex1
protected
DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::myVertex2
protected
DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::myVertex3
protected
DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::myOffset
protected
DtVdcVector2D vrvControlToolkit::DtTriangle2DObject::myScale
protected
DtVdcColor vrvControlToolkit::DtTriangle2DObject::myColor
protected
unsigned vrvControlToolkit::DtTriangle2DObject::myPattern
protected
bool vrvControlToolkit::DtTriangle2DObject::myFill
protected
double vrvControlToolkit::DtTriangle2DObject::myRotation
protected
bool vrvControlToolkit::DtTriangle2DObject::myFlashing
protected
Dt2DGraphicalObjectStateRecord* vrvControlToolkit::DtTriangle2DObject::myStateRecord
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)