VR-Vantage API Documentation
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtSdcText3DObject Class Reference

A 3D Text Stealth Draw Control Object. More...

Inheritance diagram for DtSdcText3DObject:
Inheritance graph
[legend]

Public Member Functions

 DtSdcText3DObject (DtExerciseConn *exConn, unsigned id, const DtString &text, const DtSdc3DAttachPoint &attachment, const DtVector &enuOffset=DtVector::zero(), DtSdcColor color=DtSdcColor::DtSdcWhite, bool flashing=false)
 Construct the text Draw Control Object.
virtual ~DtSdcText3DObject ()
virtual const DtString & text () const
 text accessor
virtual void setText (const DtString &text)
 text mutator
virtual const DtSdc3DAttachPointattachment () const
 attachment accessor
virtual void setAttachment (const DtSdc3DAttachPoint &attachment)
 attachment mutator
virtual const DtVector & offset () const
 offset accessor
virtual void setOffset (const DtVector &off)
 offset mutator
virtual const DtSdcColorcolor () const
 color accessor
virtual void setColor (const DtSdcColor &color)
 color 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 DtSdc3DPositionedObject
 DtSdc3DPositionedObject (DtExerciseConn *exConn, unsigned id, const DtString &objName)
virtual ~DtSdc3DPositionedObject ()
- 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 myAttachment
DtVector myOffset
DtSdcColor myColor
bool myFlashing
DtString myText
DtEnvironmentalPointRecord myPointRecord
Dt3DGraphicalObjectStateRecord myStateRecord

Private Member Functions

 DtSdcText3DObject ()
 Default constructor.
 DtSdcText3DObject (const DtSdcText3DObject &orig)
 Copy constructor.
DtSdcText3DObjectoperator= (const DtSdcText3DObject &rhs)
 Assignment operator.

Detailed Description

A 3D Text Stealth Draw Control Object.

DtSdcText3DObject represents text that can be positioned and displayed in the 3D scene. A color can be specified; and the text can flash, if desired.

Constructor & Destructor Documentation

DtSdcText3DObject::DtSdcText3DObject ( DtExerciseConn *  exConn,
unsigned  id,
const DtString &  text,
const DtSdc3DAttachPoint attachment,
const DtVector &  enuOffset = DtVector::zero(),
DtSdcColor  color = DtSdcColor::DtSdcWhite,
bool  flashing = false 
)

Construct the text Draw Control Object.

Parameters
idPassed to DtSdcObject base (see)
textThe text to draw
attachmentDtSdc3DAttachPoint indicating how the text object is positioned in 3D
enuOffseta 3D vector indicating an east/north/up offset (in meters) from the base attachment
colorThe color of the text
flashingA boolean parameter indicating whether or not the text should be flashing

References Dt3DGraphicalObjectCategoryText, Dt3DGraphicalObjectKind, DtSdcObject::id(), initRecords(), and DtSdcObject::myPublisher.

DtSdcText3DObject::~DtSdcText3DObject ( )
virtual
DtSdcText3DObject::DtSdcText3DObject ( )
private

Default constructor.

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

DtSdcText3DObject::DtSdcText3DObject ( const DtSdcText3DObject orig)
private

Copy constructor.

Private and unimplemented - not copyable.

Member Function Documentation

DtSdcText3DObject& DtSdcText3DObject::operator= ( const DtSdcText3DObject rhs)
private

Assignment operator.

Private and unimplemented - not copyable.

const DtString & DtSdcText3DObject::text ( ) const
virtual

text accessor

Get the actual text to draw

Returns
Text

References myText.

Referenced by setText().

void DtSdcText3DObject::setText ( const DtString &  text)
virtual

text mutator

Set the text to be drawn

Parameters
textThe actual text to draw

References myStateRecord, myText, Dt3DGraphicalObjectStateRecord::setUserData(), and text().

const DtSdc3DAttachPoint & DtSdcText3DObject::attachment ( ) const
virtual

attachment accessor

Get the text's attachment information

Returns
DtSdc3DAttachPoint, which contains the attachment type and associated data

Implements DtSdc3DPositionedObject.

References myAttachment.

Referenced by setAttachment().

void DtSdcText3DObject::setAttachment ( const DtSdc3DAttachPoint attachment)
virtual
const DtVector & DtSdcText3DObject::offset ( ) const
virtual

offset accessor

Get the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise

Returns
[X, Y, Z] enuOffset

References myOffset.

void DtSdcText3DObject::setOffset ( const DtVector &  off)
virtual

offset mutator

Set the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise

Parameters
enuOffset[X, Y, Z]

References myOffset, myStateRecord, and Dt3DGraphicalObjectStateRecord::setOffset().

const DtSdcColor & DtSdcText3DObject::color ( ) const
virtual

color accessor

Get the color assigned to the text

Returns
Instance of DtSdcColor

Reimplemented from DtSdcObject.

References myColor.

Referenced by setColor().

void DtSdcText3DObject::setColor ( const DtSdcColor color)
virtual

color mutator

Set the color to use when drawing the text

Parameters
colorThe DtSdcColor to use

Reimplemented from DtSdcObject.

References DtSdcColor::alpha(), DtSdcColor::blue(), color(), DtSdcColor::green(), myColor, myStateRecord, DtSdcColor::red(), and Dt3DGraphicalObjectStateRecord::setColor().

bool DtSdcText3DObject::flashing ( ) const
virtual

flashing accessor

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

Returns
true or false

Reimplemented from DtSdcObject.

References myFlashing.

Referenced by setFlashing().

void DtSdcText3DObject::setFlashing ( bool  flashing)
virtual

flashing mutator

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

Parameters
flashingtrue or false

Reimplemented from DtSdcObject.

References flashing(), myFlashing, myStateRecord, and Dt3DGraphicalObjectStateRecord::setFlashing().

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

References myPointRecord, DtSdcObject::myPublisher, and myStateRecord.

void DtSdcText3DObject::initRecords ( )
protected

Member Data Documentation

DtSdc3DAttachPoint DtSdcText3DObject::myAttachment
protected
DtVector DtSdcText3DObject::myOffset
protected

Referenced by initRecords(), offset(), and setOffset().

DtSdcColor DtSdcText3DObject::myColor
protected

Referenced by color(), initRecords(), and setColor().

bool DtSdcText3DObject::myFlashing
protected

Referenced by flashing(), initRecords(), and setFlashing().

DtString DtSdcText3DObject::myText
protected

Referenced by initRecords(), setText(), and text().

DtEnvironmentalPointRecord DtSdcText3DObject::myPointRecord
protected

Referenced by initRecords(), setAttachment(), and update().

Dt3DGraphicalObjectStateRecord DtSdcText3DObject::myStateRecord
protected

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


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)