VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtSdcLine3DObject Class Reference

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

Inheritance diagram for DtSdcLine3DObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtSdcLine3DObject (DtExerciseConn *exConn, unsigned id, const DtSdc3DAttachPoint &startAttachment, const DtSdc3DAttachPoint &endAttachment, int numSegments=1, const DtVector &offset=DtVector::zero(), DtSdcColor color=DtSdcColor::DtSdcWhite, DtSdcLineSegment::DtSdcSegmentStyle lineStyle=DtSdcLineSegment::DtSdcSegmentStyleStraight, DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle=DtSdcLineSegment::DtSdcSegmentArrowStyleNoArrow, unsigned thickness=1, unsigned pattern=0xffffff, bool flashing=false, bool checkLos=false, bool projected=false)
 Construct the Line Draw Control Object.
virtual ~DtSdcLine3DObject ()
virtual const DtSdc3DAttachPointstartAttachment () const
 startAttachment accessor
virtual void setStartAttachment (const DtSdc3DAttachPoint &startAttachment)
 startAttachment mutator
virtual const DtSdc3DAttachPointendAttachment () const
 endAttachment accessor
virtual void setEndAttachment (const DtSdc3DAttachPoint &endAttachment)
 endAttachment mutator
virtual const DtVectoroffset () const
 offset accessor
virtual void setOffset (const DtVector &off)
 offset mutator
virtual int numSegments () const
 numSegments accessor
virtual void setNumSegments (int numSegments)
 numSegments mutator
virtual const DtSdcColorcolor (int segment) const
 color accessor
virtual const DtSdcColorcolor () const
virtual void setColor (const DtSdcColor &color, int segment)
 color mutator
virtual void setColor (const DtSdcColor &color)
virtual
DtSdcLineSegment::DtSdcSegmentStyle 
lineStyle (int segment=0) const
 lineStyle accessor
virtual void setLineStyle (DtSdcLineSegment::DtSdcSegmentStyle lineStyle, int segment=0)
 lineStyle mutator
virtual
DtSdcLineSegment::DtSdcSegmentArrowStyle 
arrowStyle (int segment=0) const
 arrowStyle accessor
virtual void setArrowStyle (DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle, int segment=0)
 arrowStyle mutator
virtual unsigned pattern (int segment=0) const
 pattern accessor
virtual void setPattern (unsigned pattern, int segment=0)
 pattern mutator
virtual unsigned thickness (int segment=0) const
 thickness accessor
virtual void setThickness (unsigned thickness, int segment=0)
 thickness mutator
virtual double percentage (int segment) const
 percentage accessor
virtual void setPercentage (double percentage, int segment)
 percentage mutator
virtual bool flashing () const
 flashing accessor
virtual void setFlashing (bool flashing)
 flashing mutator
virtual bool checkLos () const
 checkLos accessor
virtual void setCheckLos (bool checkLos)
 checkLos mutator
virtual bool projected () const
 projected accessor
virtual void setProjected (bool projected)
 projected mutator
virtual void setRemoteGraphicSet (const std::string &setName)
virtual void update ()
 update the internal pdu

Protected Member Functions

void initRecords ()

Protected Attributes

DtSdc3DAttachPoint myStartAttachment
DtSdc3DAttachPoint myEndAttachment
DtVector myOffset
bool myFlashing
bool myCheckLos
bool myProjected
std::vector< DtSdcLineSegmentmyLineSegments
DtEnvironmentalLineRecord myLineRecord
Dt3DGraphicalObjectLineStateRecord myLineStateRecord

Private Member Functions

 DtSdcLine3DObject ()
 Default constructor.
 DtSdcLine3DObject (const DtSdcLine3DObject &orig)
 Copy constructor.
DtSdcLine3DObjectoperator= (const DtSdcLine3DObject &rhs)
 Assignment operator.

Detailed Description

A 3D Line Stealth Draw Control Object.

DtSdcLine3DObject represents a line that can be positioned and displayed in the scene. The line may be divided into multiple segments of varying relative lengths. A color, line style, arrow style, pattern and thickness may be specified for each segment; and the line can flash, if desired.


Constructor & Destructor Documentation

DtSdcLine3DObject::DtSdcLine3DObject ( DtExerciseConn *  exConn,
unsigned  id,
const DtSdc3DAttachPoint startAttachment,
const DtSdc3DAttachPoint endAttachment,
int  numSegments = 1,
const DtVector offset = DtVector::zero(),
DtSdcColor  color = DtSdcColor::DtSdcWhite,
DtSdcLineSegment::DtSdcSegmentStyle  lineStyle = DtSdcLineSegment::DtSdcSegmentStyleStraight,
DtSdcLineSegment::DtSdcSegmentArrowStyle  arrowStyle = DtSdcLineSegment::DtSdcSegmentArrowStyleNoArrow,
unsigned  thickness = 1,
unsigned  pattern = 0xffffff,
bool  flashing = false,
bool  checkLos = false,
bool  projected = false 
)

Construct the Line Draw Control Object.

Note that the color and subsequent default parameters are applied to all segments; multi-segmented lines are constructed with all segments being equally proportioned. The segment proportions and individual stylistic elements may all be modified after construction.

Parameters:
idPassed to DtSdcObject base (see)
startAttachmentStarting attachment of the line
endAttachmentEnding attachment of the line
numSegmentsThe number of segments the line should be divided into. Note that this can be changed at any time
enuOffseta 3D vector indicating an east/north/up offset (in meters) from the base attachment that is applied to both start and end positions
colorThe color to apply to all segments constructed
lineStyleA style enumeration from DtSdcLineSegment applied to all segments constructed
arrowStyleAn arrow style enumeration from DtSdcLineSegment applied to all segments constructed
thicknessThe number of pixels thick to draw all segments constructed
patternA stipple pattern used to draw all segments constructed
flashingA boolean parameter indicating whether or not the line should be flashing
checkLosA boolean parameter indicating whether or not the line should be terminated upon collision with the terrain. A check is made going from the starting attachment point to the end attachment point. If any terrain is intersected, that point of intersection becomes the new (temporary) end attach point. This is re-evaluated each frame, so may become CPU intensive for long lines or complex terrains
projectedA boolean parameter indicating whether or not the line should be projected onto the overlay. This prevents terrain occlusion

Default constructor.

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

Copy constructor.

Private and unimplemented - not copyable.


Member Function Documentation

DtSdcLine3DObject& DtSdcLine3DObject::operator= ( const DtSdcLine3DObject rhs) [private]

Assignment operator.

Private and unimplemented - not copyable.

virtual const DtSdc3DAttachPoint& DtSdcLine3DObject::startAttachment ( ) const [virtual]

startAttachment accessor

Get the line's start position

Returns:
attach point type and data

Implements DtSdc3DTwoPositionedObject.

virtual void DtSdcLine3DObject::setStartAttachment ( const DtSdc3DAttachPoint startAttachment) [virtual]

startAttachment mutator

Set the line's start position

Parameters:
startAttachmentattach point type and data

Implements DtSdc3DTwoPositionedObject.

virtual const DtSdc3DAttachPoint& DtSdcLine3DObject::endAttachment ( ) const [virtual]

endAttachment accessor

Get the line's end position

Returns:
attach point type and data

Implements DtSdc3DTwoPositionedObject.

virtual void DtSdcLine3DObject::setEndAttachment ( const DtSdc3DAttachPoint endAttachment) [virtual]

endAttachment mutator

Set the line's end position

Parameters:
endAttachmentattach point type and data

Implements DtSdc3DTwoPositionedObject.

virtual const DtVector& DtSdcLine3DObject::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] offset
virtual void DtSdcLine3DObject::setOffset ( const DtVector off) [virtual]

offset mutator

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

Parameters:
offset[X, Y, Z]
virtual int DtSdcLine3DObject::numSegments ( ) const [virtual]

numSegments accessor

Get the number of segments in this line

Returns:
0 to N

Implements DtSdcLineObjectInterface.

virtual void DtSdcLine3DObject::setNumSegments ( int  numSegments) [virtual]

numSegments mutator

Set the number of individual segments that make up this line

Parameters:
numSegments0 to N

Implements DtSdcLineObjectInterface.

virtual const DtSdcColor& DtSdcLine3DObject::color ( int  segment) const [virtual]

color accessor

Get the color assigned to the indicated segment

Parameters:
segmentThe segment to retrieve the color from
Returns:
The segment's color
virtual const DtSdcColor& DtSdcLine3DObject::color ( ) const [virtual]

Reimplemented from DtSdcObject.

virtual void DtSdcLine3DObject::setColor ( const DtSdcColor color,
int  segment 
) [virtual]

color mutator

Set the color to use when drawing the indicated segment

Parameters:
colorThe DtSdcColor to use
segmentThe segment to apply the color to
virtual void DtSdcLine3DObject::setColor ( const DtSdcColor color) [virtual]

Reimplemented from DtSdcObject.

virtual DtSdcLineSegment::DtSdcSegmentStyle DtSdcLine3DObject::lineStyle ( int  segment = 0) const [virtual]

lineStyle accessor

Get the lineStyle assigned to the indicated segment

Parameters:
segmentThe segment to retrieve the lineStyle from
Returns:
A DtSdcLineSegment::DtSdcSegmentStyle indicating the segment's style

Implements DtSdcLineObjectInterface.

virtual void DtSdcLine3DObject::setLineStyle ( DtSdcLineSegment::DtSdcSegmentStyle  lineStyle,
int  segment = 0 
) [virtual]

lineStyle mutator

Set the lineStyle to use when drawing the indicated segment

Parameters:
lineStyleThe lineStyle to use for the indicated segment
segmentThe segment to apply the lineStyle to

Implements DtSdcLineObjectInterface.

virtual DtSdcLineSegment::DtSdcSegmentArrowStyle DtSdcLine3DObject::arrowStyle ( int  segment = 0) const [virtual]

arrowStyle accessor

Get the arrowStyle assigned to the indicated segment

Parameters:
segmentThe segment to retrieve the arrowStyle from
Returns:
A DtSdcLineSegment::DtSdcSegmentArrowStyle indicating the segment's arrow style

Implements DtSdcLineObjectInterface.

virtual void DtSdcLine3DObject::setArrowStyle ( DtSdcLineSegment::DtSdcSegmentArrowStyle  arrowStyle,
int  segment = 0 
) [virtual]

arrowStyle mutator

Set the arrowStyle to use when drawing the indicated segment

Parameters:
arrowStyleThe arrowStyle to use for the indicated segment
segmentThe segment to apply the arrowStyle to

Implements DtSdcLineObjectInterface.

virtual unsigned DtSdcLine3DObject::pattern ( int  segment = 0) const [virtual]

pattern accessor

Get the stipple pattern used when drawing the indicated segment

Parameters:
segmentThe segment to retrieve the pattern from
Returns:
The stipple pattern, 0x00000000 to 0xFFFFFFFF

Implements DtSdcLineObjectInterface.

virtual void DtSdcLine3DObject::setPattern ( unsigned  pattern,
int  segment = 0 
) [virtual]

pattern mutator

Set the stipple pattern to use when drawing the indicated segment

Parameters:
patternThe stipple pattern, 0x00000000 to 0xFFFFFFFF.
segmentThe segment to apply the pattern to

Implements DtSdcLineObjectInterface.

virtual unsigned DtSdcLine3DObject::thickness ( int  segment = 0) const [virtual]

thickness accessor

Get the thickness assigned to the indicated segment

Parameters:
segmentThe segment to retrieve the thickness from
Returns:
The segments's thickness, in pixels (0-255)

Implements DtSdcLineObjectInterface.

virtual void DtSdcLine3DObject::setThickness ( unsigned  thickness,
int  segment = 0 
) [virtual]

thickness mutator

Set the thickness to use when drawing the indicated segment

Parameters:
thicknessThe thickness in pixels, (0-255). Note that GL may not actually be willing or able to draw a line 255 pixels wide. It's implementation dependent.
segmentThe segment to apply the thickness to

Implements DtSdcLineObjectInterface.

virtual double DtSdcLine3DObject::percentage ( int  segment) const [virtual]

percentage accessor

Get the percentage of the line that the indicated segment occupies

Parameters:
segmentThe segment to retrieve the percentage from
Returns:
The line's thickness, in pixels (0-255)

Implements DtSdcLineObjectInterface.

virtual void DtSdcLine3DObject::setPercentage ( double  percentage,
int  segment 
) [virtual]

percentage mutator

Set the percentage of the line that the indicated segment should occupy. Note that it's the responsibility of the user to ensure that the sum of the individual segment's percentages is 1.

Parameters:
percentageThe percentage (0. to 1.)
segmentThe segment to apply the precentage to

Implements DtSdcLineObjectInterface.

virtual bool DtSdcLine3DObject::flashing ( ) const [virtual]

flashing accessor

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

Returns:
true or false

Reimplemented from DtSdcObject.

virtual void DtSdcLine3DObject::setFlashing ( bool  flashing) [virtual]

flashing mutator

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

Parameters:
flashingtrue or false

Reimplemented from DtSdcObject.

virtual bool DtSdcLine3DObject::checkLos ( ) const [virtual]

checkLos accessor

Get the boolean that indicates whether or not the line is checked for terrain collisions

Returns:
true or false
virtual void DtSdcLine3DObject::setCheckLos ( bool  checkLos) [virtual]

checkLos mutator

Set the boolean that indicates whether or not the line is checked for terrain collisions

Parameters:
checkLostrue or false
virtual bool DtSdcLine3DObject::projected ( ) const [virtual]

projected accessor

Get the boolean that indicates whether or not the line (if it is a 3D line) should be projected onto the overlay (preventing terrain occlusion)

Returns:
true or false
virtual void DtSdcLine3DObject::setProjected ( bool  projected) [virtual]

projected mutator

Set the boolean that indicates whether or not the line (if it is a 3D line) should be projected onto the overlay (preventing terrain occlusion)

Parameters:
projectedtrue or false
virtual void DtSdcLine3DObject::setRemoteGraphicSet ( const std::string &  setName) [virtual]

Reimplemented from DtSdcObject.

virtual void DtSdcLine3DObject::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.

void DtSdcLine3DObject::initRecords ( ) [protected]

Member Data Documentation

DtEnvironmentalLineRecord DtSdcLine3DObject::myLineRecord [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)