VR-Forces 5.0.3 Developer's Guide
 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 | Static Private Attributes
vrvControlToolkit::DtCylinderObject Class Reference

A class for representing cylinders.

The DtSdcCylinder class provides mutators that allow the user to specify the attachment, shape, rotation, and color of the cylinder on the Stealth screen; and optionally, make the object flash. The cylinder may be placed at a location which becomes its center, and then a length and rotation specified, OR the cylinder can be attached at either end (in which case there are no length or rotation parameters, although the diameters may still be changed).

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

Public Member Functions

 DtCylinderObject (DtExerciseConn *exConn, unsigned id, const DtVdc3DAttachPoint &attachment, double length, const DtVdcVector2D &diameters, const DtVector &offset=DtVector::zero(), const DtTaitBryan &rotation=zeros, DtVdcColor color=DtVdcColor::DtVdcWhite, bool flashing=false)
 
 DtCylinderObject (DtExerciseConn *exConn, unsigned id, const DtVdc3DAttachPoint &startAttachment, const DtVdc3DAttachPoint &endAttachment, const DtVdcVector2D &diameters, const DtVector &offset=DtVector::zero(), DtVdcColor color=DtVdcColor::DtVdcWhite, bool flashing=false)
 
virtual ~DtCylinderObject ()
 
virtual const DtVdc3DAttachPointattachment () const
 
virtual void setAttachment (const DtVdc3DAttachPoint &attachment)
 
virtual const DtVdc3DAttachPointstartAttachment () const
 
virtual void setStartAttachment (const DtVdc3DAttachPoint &startAttachment)
 
virtual const DtVdc3DAttachPointendAttachment () const
 
virtual void setEndAttachment (const DtVdc3DAttachPoint &endAttachment)
 
virtual const DtVector32 & offset () const
 
virtual void setOffset (const DtVector32 &off)
 
virtual double length () const
 
virtual void setLength (double length)
 
virtual const DtVdcVector2Ddiameters () const
 
virtual void setDiameters (const DtVdcVector2D &diameters)
 
virtual const DtTaitBryan & rotation () const
 
virtual void setRotation (const DtTaitBryan &rotation)
 
virtual const DtVdcColorcolor () const
 
virtual void setColor (const DtVdcColor &color)
 
virtual bool flashing () const
 
virtual void setFlashing (bool flashing)
 
virtual void setRemoteGraphicSet (const std::string &setName)
 
virtual void update ()
 
- Public Member Functions inherited from vrvControlToolkit::Dt3DTwoPositionedObject
 Dt3DTwoPositionedObject (DtExerciseConn *exConn, unsigned id, const DtString &objName)
 
virtual ~Dt3DTwoPositionedObject ()
 
- Public Member Functions inherited from vrvControlToolkit::DtDrawControlObject
 DtDrawControlObject (DtExerciseConn *exConn, unsigned id, const DtString &objName)
 
virtual ~DtDrawControlObject ()
 
virtual unsigned id () const
 
virtual void setId (unsigned id)
 
virtual const
DtGlobalObjectDesignator & 
globalId () const
 
virtual void setVisible (bool yesNo)
 
virtual bool visible () const
 

Protected Member Functions

void initRecords ()
 

Protected Attributes

DtVdc3DAttachPoint myStartAttachment
 
DtVdc3DAttachPoint myEndAttachment
 
double myLength
 
DtVdcVector2D myDiameters
 
DtVector32 myOffset
 
DtVdcColor myColor
 
DtTaitBryan myRotation
 
bool myFlashing
 
Dt3DGraphicalObjectStateRecord myStateRecord
 
DtEnvironmentalFixedCylinderRecord myFixedCylinderRecord
 
DtEnvironmentalArticulatingCylinderRecord myArticulatingCylinderRecord
 
- Protected Attributes inherited from vrvControlToolkit::DtDrawControlObject
unsigned myId
 
DtEnvironmentProcessPublishermyPublisher
 
bool myVisible
 
DtVdcColor myEmptyColor
 

Private Member Functions

 DtCylinderObject ()
 
 DtCylinderObject (const DtCylinderObject &orig)
 
DtCylinderObjectoperator= (const DtCylinderObject &rhs)
 

Static Private Attributes

static DtTaitBryan zeros
 

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
 

Constructor & Destructor Documentation

vrvControlToolkit::DtCylinderObject::DtCylinderObject ( DtExerciseConn *  exConn,
unsigned  id,
const DtVdc3DAttachPoint attachment,
double  length,
const DtVdcVector2D diameters,
const DtVector offset = DtVector::zero(),
const DtTaitBryan &  rotation = zeros,
DtVdcColor  color = DtVdcColor::DtVdcWhite,
bool  flashing = false 
)

Construct the Cylindrical Draw Control Object attached at one point.

Parameters
idPassed to DtDrawControlObject base (see)
attachmentDtVdc3DAttachPoint indicating the center of the cylinder in 3D
lengthlength of the cylinder, in meters
diametersDiameters of the cylinder; since these can be different, it means that cylinders can be created with elliptical cross sections
offseta 3D vector indicating an right/front/down offset (in meters) from the base attachment
rotationrotations to apply to the object, about the Geocentric Z, Y and X axes (DIS/HLA-RPR). Values go from 0 to 2 PI
colorThe color of the object outline (and fill, if filled)
flashingA boolean parameter indicating whether or not the object should be flashing
vrvControlToolkit::DtCylinderObject::DtCylinderObject ( DtExerciseConn *  exConn,
unsigned  id,
const DtVdc3DAttachPoint startAttachment,
const DtVdc3DAttachPoint endAttachment,
const DtVdcVector2D diameters,
const DtVector offset = DtVector::zero(),
DtVdcColor  color = DtVdcColor::DtVdcWhite,
bool  flashing = false 
)

Construct the Cylindrical Draw Control Object attached at two points.

Parameters
idPassed to DtDrawControlObject base (see)
startAttachmentDtVdc3DAttachPoint indicating where one end of the cylinder is placed in 3D
endAttachmentDtVdc3DAttachPoint indicating where the other end of the cylinder is placed in 3D
diametersDiameters of the cylinder; since these can be different, it means that cylinders can be created with elliptical cross sections
offseta 3D vector indicating an right/front/down offset (in meters) from the base attachment
colorThe color of the object outline (and fill, if filled)
flashingA boolean parameter indicating whether or not the object should be flashing
virtual vrvControlToolkit::DtCylinderObject::~DtCylinderObject ( )
virtual
vrvControlToolkit::DtCylinderObject::DtCylinderObject ( )
private

Default constructor.

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

vrvControlToolkit::DtCylinderObject::DtCylinderObject ( const DtCylinderObject orig)
private

Copy constructor.

Private and unimplemented - not copyable.

Member Function Documentation

DtCylinderObject& vrvControlToolkit::DtCylinderObject::operator= ( const DtCylinderObject rhs)
private

Assignment operator.

Private and unimplemented - not copyable.

virtual const DtVdc3DAttachPoint& vrvControlToolkit::DtCylinderObject::attachment ( ) const
virtual

attachment accessor

Get the object's attachment information when attached at a single point

Returns
DtVdc3DAttachPoint, which contains the attachment type and associated data
virtual void vrvControlToolkit::DtCylinderObject::setAttachment ( const DtVdc3DAttachPoint attachment)
virtual

attachment mutator

Set the object's attachment information when attached at a single point

Parameters
attachment
virtual const DtVdc3DAttachPoint& vrvControlToolkit::DtCylinderObject::startAttachment ( ) const
virtual

startAttachment accessor

Get the object's first attachment information when attached at two points

Returns
DtVdc3DAttachPoint, which contains the attachment type and associated data

Implements vrvControlToolkit::Dt3DTwoPositionedObject.

virtual void vrvControlToolkit::DtCylinderObject::setStartAttachment ( const DtVdc3DAttachPoint startAttachment)
virtual

startAttachment mutator

Set the object's startAttachment information when attached at two points

Parameters
startAttachment

Implements vrvControlToolkit::Dt3DTwoPositionedObject.

virtual const DtVdc3DAttachPoint& vrvControlToolkit::DtCylinderObject::endAttachment ( ) const
virtual

endAttachment accessor

Get the object's second attachment information when attached at two points

Returns
DtVdc3DAttachPoint, which contains the attachment type and associated data

Implements vrvControlToolkit::Dt3DTwoPositionedObject.

virtual void vrvControlToolkit::DtCylinderObject::setEndAttachment ( const DtVdc3DAttachPoint endAttachment)
virtual

endAttachment mutator

Set the object's endAttachment information when attached at two points

Parameters
endAttachment

Implements vrvControlToolkit::Dt3DTwoPositionedObject.

virtual const DtVector32& vrvControlToolkit::DtCylinderObject::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 vrvControlToolkit::DtCylinderObject::setOffset ( const DtVector32 &  off)
virtual

offset mutator

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

Parameters
off[X, Y, Z]
virtual double vrvControlToolkit::DtCylinderObject::length ( ) const
virtual

length accessor

Get the cylinder's length (when attached at a single point) /return cylinder length, in meters

virtual void vrvControlToolkit::DtCylinderObject::setLength ( double  length)
virtual

length mutator

Set the cylinder's length (when attached at a single point) /param length, in meters

virtual const DtVdcVector2D& vrvControlToolkit::DtCylinderObject::diameters ( ) const
virtual

diameters accessor

Get the object's cross section diameters (in Y and Z)

Returns
[Y, Z] diameters in meters
virtual void vrvControlToolkit::DtCylinderObject::setDiameters ( const DtVdcVector2D diameters)
virtual

diameters mutator

Set the object's diameters

Parameters
diameters[Y, Z] diameters in meters
virtual const DtTaitBryan& vrvControlToolkit::DtCylinderObject::rotation ( ) const
virtual

rotation accessor

Get the counter-clockwise rotation of the object about its axes (only applies when cylinder is attached at a single point)

Returns
[psi, theta, phi] radians
virtual void vrvControlToolkit::DtCylinderObject::setRotation ( const DtTaitBryan &  rotation)
virtual

rotation mutator

Set the counter-clockwise rotations of the object about its axes (only applies when cylinder is attached at a single point)

Parameters
rotation[psi, theta, phi] radians
virtual const DtVdcColor& vrvControlToolkit::DtCylinderObject::color ( ) const
virtual

color accessor

Get the color assigned to this object

Returns
Instance of DtVdcColor

Reimplemented from vrvControlToolkit::DtDrawControlObject.

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

void vrvControlToolkit::DtCylinderObject::initRecords ( )
protected

Member Data Documentation

DtTaitBryan vrvControlToolkit::DtCylinderObject::zeros
staticprivate
DtVdc3DAttachPoint vrvControlToolkit::DtCylinderObject::myStartAttachment
protected
DtVdc3DAttachPoint vrvControlToolkit::DtCylinderObject::myEndAttachment
protected
double vrvControlToolkit::DtCylinderObject::myLength
protected
DtVdcVector2D vrvControlToolkit::DtCylinderObject::myDiameters
protected
DtVector32 vrvControlToolkit::DtCylinderObject::myOffset
protected
DtVdcColor vrvControlToolkit::DtCylinderObject::myColor
protected
DtTaitBryan vrvControlToolkit::DtCylinderObject::myRotation
protected
bool vrvControlToolkit::DtCylinderObject::myFlashing
protected
Dt3DGraphicalObjectStateRecord vrvControlToolkit::DtCylinderObject::myStateRecord
protected
DtEnvironmentalFixedCylinderRecord vrvControlToolkit::DtCylinderObject::myFixedCylinderRecord
protected
DtEnvironmentalArticulatingCylinderRecord vrvControlToolkit::DtCylinderObject::myArticulatingCylinderRecord
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)