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

DtSdc3DAttachPoint represents the 3 methods for attaching a 3D draw control object in 3-space. More...

Public Types

enum  DtSdc3DAttachmentType { attachmentTypeUndefined = 0, attachmentTypeScene = 1, attachmentTypeEntity = 2, attachmentTypeDrawObject = 3 }

Public Member Functions

 DtSdc3DAttachPoint (const DtVector &location)
 Geocentric coordinates constructor.
 DtSdc3DAttachPoint (const DtGlobalObjectDesignator &entityId)
 HLA/DIS object id constructor.
 DtSdc3DAttachPoint (const DtGlobalObjectDesignator &drawObjectId, double relativePosition)
 HLA/DIS object id constructor.
 DtSdc3DAttachPoint (const DtSdc3DAttachPoint &orig)
 Copy constructor.
DtSdc3DAttachPointoperator= (const DtSdc3DAttachPoint &rhs)
 Assignment operator.
virtual ~DtSdc3DAttachPoint ()
 Virtual destructor.
 DtSdc3DAttachPoint ()
 Default constructor.
virtual DtSdc3DAttachmentType attachmentType () const
 Attachment Type accessor.
virtual DtVector location () const
 Location accessor.
virtual DtVector & location ()
virtual void setLocation (DtVector location)
 Location mutator.
virtual const
DtGlobalObjectDesignator & 
drawObjectId () const
 Draw Object ID accessor.
virtual void setDrawObjectId (const DtGlobalObjectDesignator &drawObjectId)
 Draw Object Id mutator.
virtual double relativePosition () const
 Draw Object relative position accessor; draw object attached only.
virtual void setRelativePosition (double relativePosition)
 Draw Object relative position mutator.
virtual DtGlobalObjectDesignator entityId () const
 Entity ID accessor.
virtual void setEntityId (const DtGlobalObjectDesignator &entityId)
 Entity Id mutator.
virtual bool isAttached () const
virtual const
DtGlobalObjectDesignator & 
attachedId () const

Protected Attributes

DtVector myLocation
DtGlobalObjectDesignator myAttachedId
double myRelativePosition
DtSdc3DAttachmentType myAttachmentType

Detailed Description

DtSdc3DAttachPoint represents the 3 methods for attaching a 3D draw control object in 3-space.

DtSdc3DAttachPoint defines the interface and storage for a class that functions as a discriminated union representing the 3 methods for attaching a 3D draw control object in 3-space. Objects can be placed in the scene by specifying 3D geocentric coordinates; an HLA/DIS entity id (DtGlobalObjectDesignator); or the id of another draw control object.

Member Enumeration Documentation

Enumerator:
attachmentTypeUndefined 
attachmentTypeScene 
attachmentTypeEntity 
attachmentTypeDrawObject 

Constructor & Destructor Documentation

DtSdc3DAttachPoint::DtSdc3DAttachPoint ( const DtVector &  location)

Geocentric coordinates constructor.

Parameters
locationGeocentric location in the scene at which to place this object
DtSdc3DAttachPoint::DtSdc3DAttachPoint ( const DtGlobalObjectDesignator &  entityId)

HLA/DIS object id constructor.

Parameters
entityIdHLA/DIS global object designator of entity to attach to
DtSdc3DAttachPoint::DtSdc3DAttachPoint ( const DtGlobalObjectDesignator &  drawObjectId,
double  relativePosition 
)

HLA/DIS object id constructor.

Parameters
drawObjectIdid of draw object to attach to
relativePositionIf the attachment is to a draw control object that has 2 ends (line or cylinder) then a relative position can be specified that indicates the position between those two end points. 0. to 100. percent (default 0.)
DtSdc3DAttachPoint::DtSdc3DAttachPoint ( const DtSdc3DAttachPoint orig)

Copy constructor.

DtSdc3DAttachPoint::~DtSdc3DAttachPoint ( )
virtual

Virtual destructor.

DtSdc3DAttachPoint::DtSdc3DAttachPoint ( )

Default constructor.

Member Function Documentation

DtSdc3DAttachPoint & DtSdc3DAttachPoint::operator= ( const DtSdc3DAttachPoint rhs)

Assignment operator.

References myAttachedId, myAttachmentType, myLocation, and myRelativePosition.

DtSdc3DAttachPoint::DtSdc3DAttachmentType DtSdc3DAttachPoint::attachmentType ( ) const
virtual
DtVector DtSdc3DAttachPoint::location ( ) const
virtual
DtVector & DtSdc3DAttachPoint::location ( )
virtual

References myLocation.

void DtSdc3DAttachPoint::setLocation ( DtVector  location)
virtual

Location mutator.

Set the geocentric location to attached to. This also sets the attachment type to attachmentTypeScene as a side effect

Parameters
locationGeocentric location to attach to

References attachmentTypeScene, location(), myAttachedId, myAttachmentType, and myLocation.

const DtGlobalObjectDesignator & DtSdc3DAttachPoint::drawObjectId ( ) const
virtual

Draw Object ID accessor.

Get the ID of the draw object to attach to

Returns
Draw Object ID if attachment type is attachmentTypeDrawObject; 0 otherwise

References myAttachedId.

Referenced by setDrawObjectId().

void DtSdc3DAttachPoint::setDrawObjectId ( const DtGlobalObjectDesignator &  drawObjectId)
virtual

Draw Object Id mutator.

Set the draw object to attached to. This also sets the attachment type to attachmentTypeDrawObject as a side effect

Parameters
drawObjectIdID of draw object to attach to

References attachmentTypeDrawObject, drawObjectId(), myAttachedId, myAttachmentType, and myLocation.

double DtSdc3DAttachPoint::relativePosition ( ) const
virtual
void DtSdc3DAttachPoint::setRelativePosition ( double  relativePosition)
virtual

Draw Object relative position mutator.

Parameters
relativePosition0. to 100. (percent)

References myRelativePosition, and relativePosition().

DtGlobalObjectDesignator DtSdc3DAttachPoint::entityId ( ) const
virtual

Entity ID accessor.

Get the Global Object Designator of the entity to attach to

Returns
Global Object Designator if attachment type is attachmentTypeDrawEntity; GlobalObjectDesignator::nullId() (in HLA) or GlobalObjectDesignator::nullString() (in DIS) otherwise

References myAttachedId.

Referenced by setEntityId().

void DtSdc3DAttachPoint::setEntityId ( const DtGlobalObjectDesignator &  entityId)
virtual

Entity Id mutator.

Set the entity to attached to. This also sets the attachment type to attachmentTypeEntity as a side effect

Parameters
entityIdGlobal Object Designator of entity to attach to

References attachmentTypeEntity, entityId(), myAttachedId, myAttachmentType, and myLocation.

bool DtSdc3DAttachPoint::isAttached ( ) const
virtual
const DtGlobalObjectDesignator & DtSdc3DAttachPoint::attachedId ( ) const
virtual

Member Data Documentation

DtVector DtSdc3DAttachPoint::myLocation
protected
DtGlobalObjectDesignator DtSdc3DAttachPoint::myAttachedId
protected
double DtSdc3DAttachPoint::myRelativePosition
protected
DtSdc3DAttachmentType DtSdc3DAttachPoint::myAttachmentType
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)