![]() |
VR-Vantage 1.4.1 API Class Documentation
|
A class for representing cylinders. More...

Public Member Functions | |
| DtSdcCylinderObject (DtExerciseConn *exConn, unsigned id, const DtSdc3DAttachPoint &attachment, double length, const DtSdcVector2D &diameters, const DtVector &offset=DtVector::zero(), const DtTaitBryan &rotation=zeros, DtSdcColor color=DtSdcColor::DtSdcWhite, bool flashing=false) | |
| Construct the Cylindrical Draw Control Object attached at one point. | |
| DtSdcCylinderObject (DtExerciseConn *exConn, unsigned id, const DtSdc3DAttachPoint &startAttachment, const DtSdc3DAttachPoint &endAttachment, const DtSdcVector2D &diameters, const DtVector &offset=DtVector::zero(), DtSdcColor color=DtSdcColor::DtSdcWhite, bool flashing=false) | |
| Construct the Cylindrical Draw Control Object attached at two points. | |
| virtual | ~DtSdcCylinderObject () |
| virtual const DtSdc3DAttachPoint & | attachment () const |
| attachment accessor | |
| virtual void | setAttachment (const DtSdc3DAttachPoint &attachment) |
| attachment mutator | |
| virtual const DtSdc3DAttachPoint & | startAttachment () const |
| startAttachment accessor | |
| virtual void | setStartAttachment (const DtSdc3DAttachPoint &startAttachment) |
| startAttachment mutator | |
| virtual const DtSdc3DAttachPoint & | endAttachment () const |
| endAttachment accessor | |
| virtual void | setEndAttachment (const DtSdc3DAttachPoint &endAttachment) |
| endAttachment mutator | |
| virtual const DtVector & | offset () const |
| offset accessor | |
| virtual void | setOffset (const DtVector &off) |
| offset mutator | |
| virtual double | length () const |
| length accessor | |
| virtual void | setLength (double length) |
| length mutator | |
| virtual const DtSdcVector2D & | diameters () const |
| diameters accessor | |
| virtual void | setDiameters (const DtSdcVector2D &diameters) |
| diameters mutator | |
| virtual const DtTaitBryan & | rotation () const |
| rotation accessor | |
| virtual void | setRotation (const DtTaitBryan &rotation) |
| rotation mutator | |
| virtual const DtSdcColor & | color () 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 | |
Protected Member Functions | |
| void | initRecords () |
Protected Attributes | |
| DtSdc3DAttachPoint | myStartAttachment |
| DtSdc3DAttachPoint | myEndAttachment |
| double | myLength |
| DtSdcVector2D | myDiameters |
| DtVector | myOffset |
| DtSdcColor | myColor |
| DtTaitBryan | myRotation |
| bool | myFlashing |
| Dt3DGraphicalObjectStateRecord | myStateRecord |
| DtEnvironmentalFixedCylinderRecord | myFixedCylinderRecord |
| DtEnvironmentalArticulatingCylinderRecord | myArticulatingCylinderRecord |
Private Member Functions | |
| DtSdcCylinderObject () | |
| Default constructor. | |
| DtSdcCylinderObject (const DtSdcCylinderObject &orig) | |
| Copy constructor. | |
| DtSdcCylinderObject & | operator= (const DtSdcCylinderObject &rhs) |
| Assignment operator. | |
Static Private Attributes | |
| static DtTaitBryan | zeros = DtTaitBryan(0., 0., 0.) |
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).
| DtSdcCylinderObject::DtSdcCylinderObject | ( | DtExerciseConn * | exConn, |
| unsigned | id, | ||
| const DtSdc3DAttachPoint & | attachment, | ||
| double | length, | ||
| const DtSdcVector2D & | diameters, | ||
| const DtVector & | offset = DtVector::zero(), |
||
| const DtTaitBryan & | rotation = zeros, |
||
| DtSdcColor | color = DtSdcColor::DtSdcWhite, |
||
| bool | flashing = false |
||
| ) |
Construct the Cylindrical Draw Control Object attached at one point.
| id | Passed to DtSdcObject base (see) |
| attachment | DtSdc3DAttachPoint indicating the center of the cylinder in 3D |
| length | length of the cylinder, in meters |
| diameters | Diameters of the cylinder; since these can be different, it means that cylinders can be created with elliptical cross sections |
| enuOffset | a 3D vector indicating an east/north/up offset (in meters) from the base attachment |
| rotation | rotations to apply to the object, about the Geocentric Z, Y and X axes (DIS/HLA-RPR). Values go from 0 to 2 PI |
| color | The color of the object outline (and fill, if filled) |
| flashing | A boolean parameter indicating whether or not the object should be flashing |
References Dt3DGraphicalObjectCategoryCylinder, Dt3DGraphicalObjectKind, DtSdcObject::id(), initRecords(), and DtSdcObject::myPublisher.
| DtSdcCylinderObject::DtSdcCylinderObject | ( | DtExerciseConn * | exConn, |
| unsigned | id, | ||
| const DtSdc3DAttachPoint & | startAttachment, | ||
| const DtSdc3DAttachPoint & | endAttachment, | ||
| const DtSdcVector2D & | diameters, | ||
| const DtVector & | offset = DtVector::zero(), |
||
| DtSdcColor | color = DtSdcColor::DtSdcWhite, |
||
| bool | flashing = false |
||
| ) |
Construct the Cylindrical Draw Control Object attached at two points.
| id | Passed to DtSdcObject base (see) |
| startAttachment | DtSdc3DAttachPoint indicating where one end of the cylinder is placed in 3D |
| endAttachment | DtSdc3DAttachPoint indicating where the other end of the cylinder is placed in 3D |
| diameters | Diameters of the cylinder; since these can be different, it means that cylinders can be created with elliptical cross sections |
| enuOffset | a 3D vector indicating an east/north/up offset (in meters) from the base attachment |
| color | The color of the object outline (and fill, if filled) |
| flashing | A boolean parameter indicating whether or not the object should be flashing |
References Dt3DGraphicalObjectCategoryCylinder, Dt3DGraphicalObjectKind, DtSdcObject::id(), initRecords(), and DtSdcObject::myPublisher.
| DtSdcCylinderObject::~DtSdcCylinderObject | ( | ) | [virtual] |
| DtSdcCylinderObject::DtSdcCylinderObject | ( | ) | [private] |
Default constructor.
Private and not implemented - you must supply an id and basic geometric parameters to construct the Ellipsoid or Cuboid
| DtSdcCylinderObject::DtSdcCylinderObject | ( | const DtSdcCylinderObject & | orig | ) | [private] |
Copy constructor.
Private and unimplemented - not copyable.
| DtSdcCylinderObject& DtSdcCylinderObject::operator= | ( | const DtSdcCylinderObject & | rhs | ) | [private] |
Assignment operator.
Private and unimplemented - not copyable.
| const DtSdc3DAttachPoint & DtSdcCylinderObject::attachment | ( | ) | const [virtual] |
attachment accessor
Get the object's attachment information when attached at a single point
References myStartAttachment.
Referenced by setAttachment().
| void DtSdcCylinderObject::setAttachment | ( | const DtSdc3DAttachPoint & | attachment | ) | [virtual] |
attachment mutator
Set the object's attachment information when attached at a single point
| attachment |
References attachment(), and myStartAttachment.
| const DtSdc3DAttachPoint & DtSdcCylinderObject::startAttachment | ( | ) | const [virtual] |
startAttachment accessor
Get the object's first attachment information when attached at two points
Implements DtSdc3DTwoPositionedObject.
References myStartAttachment.
Referenced by setStartAttachment().
| void DtSdcCylinderObject::setStartAttachment | ( | const DtSdc3DAttachPoint & | startAttachment | ) | [virtual] |
startAttachment mutator
Set the object's startAttachment information when attached at two points
| startAttachment |
Implements DtSdc3DTwoPositionedObject.
References DtSdc3DAttachPoint::attachedId(), DtSdc3DAttachPoint::attachmentType(), DtSdc3DAttachPoint::attachmentTypeScene, DtSdc3DAttachPoint::isAttached(), DtSdc3DAttachPoint::location(), myArticulatingCylinderRecord, myEndAttachment, myFixedCylinderRecord, myStartAttachment, myStateRecord, DtSdc3DAttachPoint::relativePosition(), Dt3DGraphicalObjectStateRecord::setAttachment(), setEndAttachment(), Dt3DGraphicalObjectStateRecord::setNumberOfAttachments(), DtEnvironmentalArticulatingCylinderRecord::setStartingLocation(), DtEnvironmentalFixedCylinderRecord::setStartingLocation(), and startAttachment().
Referenced by setEndAttachment().
| const DtSdc3DAttachPoint & DtSdcCylinderObject::endAttachment | ( | ) | const [virtual] |
endAttachment accessor
Get the object's second attachment information when attached at two points
Implements DtSdc3DTwoPositionedObject.
References myEndAttachment.
Referenced by setEndAttachment().
| void DtSdcCylinderObject::setEndAttachment | ( | const DtSdc3DAttachPoint & | endAttachment | ) | [virtual] |
endAttachment mutator
Set the object's endAttachment information when attached at two points
| endAttachment |
Implements DtSdc3DTwoPositionedObject.
References DtSdc3DAttachPoint::attachedId(), DtSdc3DAttachPoint::attachmentType(), DtSdc3DAttachPoint::attachmentTypeScene, endAttachment(), DtSdc3DAttachPoint::isAttached(), DtSdc3DAttachPoint::location(), myEndAttachment, myFixedCylinderRecord, myStartAttachment, myStateRecord, DtSdc3DAttachPoint::relativePosition(), Dt3DGraphicalObjectStateRecord::setAttachment(), DtEnvironmentalFixedCylinderRecord::setEndingLocation(), Dt3DGraphicalObjectStateRecord::setNumberOfAttachments(), and setStartAttachment().
Referenced by setStartAttachment().
| const DtVector & DtSdcCylinderObject::offset | ( | ) | const [virtual] |
offset accessor
Get the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise
References myOffset.
Referenced by setOffset().
| void DtSdcCylinderObject::setOffset | ( | const DtVector & | off | ) | [virtual] |
offset mutator
Set the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise
| enuOffset | [X, Y, Z] |
References myOffset, myStateRecord, offset(), and Dt3DGraphicalObjectStateRecord::setOffset().
| double DtSdcCylinderObject::length | ( | ) | const [virtual] |
length accessor
Get the cylinder's length (when attached at a single point) /return cylinder length, in meters
References myLength.
Referenced by setLength().
| void DtSdcCylinderObject::setLength | ( | double | length | ) | [virtual] |
length mutator
Set the cylinder's length (when attached at a single point) /param length, in meters
References length(), myArticulatingCylinderRecord, myLength, and DtEnvironmentalArticulatingCylinderRecord::setCylinderLength().
| const DtSdcVector2D & DtSdcCylinderObject::diameters | ( | ) | const [virtual] |
diameters accessor
Get the object's cross section diameters (in Y and Z)
References myDiameters.
Referenced by setDiameters().
| void DtSdcCylinderObject::setDiameters | ( | const DtSdcVector2D & | diameters | ) | [virtual] |
diameters mutator
Set the object's diameters
| diameters | [Y, Z] diameters in meters |
References diameters(), myArticulatingCylinderRecord, myDiameters, myFixedCylinderRecord, DtEnvironmentalArticulatingCylinderRecord::setXRadius(), DtEnvironmentalFixedCylinderRecord::setXRadius(), DtEnvironmentalArticulatingCylinderRecord::setYRadius(), DtEnvironmentalFixedCylinderRecord::setYRadius(), DtSdcVector2D::x(), and DtSdcVector2D::y().
| const DtTaitBryan & DtSdcCylinderObject::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)
References myRotation.
Referenced by setRotation().
| void DtSdcCylinderObject::setRotation | ( | const DtTaitBryan & | rotation | ) | [virtual] |
rotation mutator
Set the counter-clockwise rotations of the object about it's axes (only applies when cylinder is attached at a single point)
| rotation | [psi, theta, phi] radians |
References myArticulatingCylinderRecord, myRotation, rotation(), and DtEnvironmentalArticulatingCylinderRecord::setRotation().
| const DtSdcColor & DtSdcCylinderObject::color | ( | ) | const [virtual] |
color accessor
Get the color assigned to this object
Reimplemented from DtSdcObject.
References myColor.
Referenced by setColor().
| void DtSdcCylinderObject::setColor | ( | const DtSdcColor & | color | ) | [virtual] |
color mutator
Set the color to use when drawing (and filling) this object
| color | The DtSdcColor to use |
Reimplemented from DtSdcObject.
References DtSdcColor::alpha(), DtSdcColor::blue(), color(), DtSdcColor::green(), myColor, myStateRecord, DtSdcColor::red(), and Dt3DGraphicalObjectStateRecord::setColor().
| bool DtSdcCylinderObject::flashing | ( | ) | const [virtual] |
flashing accessor
Get the boolean that indicates whether or not the object should flash
Reimplemented from DtSdcObject.
References myFlashing.
Referenced by setFlashing().
| void DtSdcCylinderObject::setFlashing | ( | bool | flashing | ) | [virtual] |
flashing mutator
Set the boolean that indicates whether or not the object should flash
| flashing | true or false |
Reimplemented from DtSdcObject.
References flashing(), myFlashing, myStateRecord, and Dt3DGraphicalObjectStateRecord::setFlashing().
| void DtSdcCylinderObject::setRemoteGraphicSet | ( | const std::string & | setName | ) | [virtual] |
Reimplemented from DtSdcObject.
References myStateRecord, Dt3DGraphicalObjectStateRecord::setNumberOfParentOverlays(), and Dt3DGraphicalObjectStateRecord::setParentOverlay().
| void DtSdcCylinderObject::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 DtSdcColor::alpha(), DtSdc3DAttachPoint::attachmentType(), DtSdc3DAttachPoint::attachmentTypeUndefined, DtSdcColor::blue(), DtSdcColor::green(), myArticulatingCylinderRecord, myColor, myEndAttachment, myFixedCylinderRecord, myFlashing, myOffset, DtSdcObject::myPublisher, myStateRecord, DtSdcColor::red(), Dt3DGraphicalObjectStateRecord::setColor(), Dt3DGraphicalObjectStateRecord::setFlashing(), and Dt3DGraphicalObjectStateRecord::setOffset().
| void DtSdcCylinderObject::initRecords | ( | ) | [protected] |
References DtSdcColor::alpha(), DtSdc3DAttachPoint::attachedId(), DtSdc3DAttachPoint::attachmentType(), DtSdc3DAttachPoint::attachmentTypeScene, DtSdcColor::blue(), DtSdcColor::green(), DtSdc3DAttachPoint::isAttached(), DtSdc3DAttachPoint::location(), myArticulatingCylinderRecord, myColor, myDiameters, myEndAttachment, myFixedCylinderRecord, myFlashing, myLength, myOffset, myStartAttachment, myStateRecord, DtSdcColor::red(), DtSdc3DAttachPoint::relativePosition(), Dt3DGraphicalObjectStateRecord::setAttachment(), Dt3DGraphicalObjectStateRecord::setColor(), DtEnvironmentalArticulatingCylinderRecord::setCylinderLength(), DtEnvironmentalFixedCylinderRecord::setEndingLocation(), Dt3DGraphicalObjectStateRecord::setFlashing(), Dt3DGraphicalObjectStateRecord::setNumberOfAttachments(), Dt3DGraphicalObjectStateRecord::setOffset(), DtEnvironmentalArticulatingCylinderRecord::setStartingLocation(), DtEnvironmentalFixedCylinderRecord::setStartingLocation(), DtEnvironmentalArticulatingCylinderRecord::setXRadius(), DtEnvironmentalFixedCylinderRecord::setXRadius(), DtEnvironmentalArticulatingCylinderRecord::setYRadius(), DtEnvironmentalFixedCylinderRecord::setYRadius(), DtSdcVector2D::x(), and DtSdcVector2D::y().
Referenced by DtSdcCylinderObject().
DtTaitBryan DtSdcCylinderObject::zeros = DtTaitBryan(0., 0., 0.) [static, private] |
Referenced by attachment(), initRecords(), setAttachment(), setEndAttachment(), setStartAttachment(), and startAttachment().
Referenced by endAttachment(), initRecords(), setEndAttachment(), setStartAttachment(), and update().
double DtSdcCylinderObject::myLength [protected] |
Referenced by initRecords(), length(), and setLength().
DtSdcVector2D DtSdcCylinderObject::myDiameters [protected] |
Referenced by diameters(), initRecords(), and setDiameters().
DtVector DtSdcCylinderObject::myOffset [protected] |
Referenced by initRecords(), offset(), setOffset(), and update().
DtSdcColor DtSdcCylinderObject::myColor [protected] |
Referenced by color(), initRecords(), setColor(), and update().
DtTaitBryan DtSdcCylinderObject::myRotation [protected] |
Referenced by rotation(), and setRotation().
bool DtSdcCylinderObject::myFlashing [protected] |
Referenced by flashing(), initRecords(), setFlashing(), and update().
Referenced by initRecords(), setColor(), setEndAttachment(), setFlashing(), setOffset(), setRemoteGraphicSet(), setStartAttachment(), and update().
Referenced by initRecords(), setDiameters(), setEndAttachment(), setStartAttachment(), and update().
DtEnvironmentalArticulatingCylinderRecord DtSdcCylinderObject::myArticulatingCylinderRecord [protected] |
Referenced by initRecords(), setDiameters(), setLength(), setRotation(), setStartAttachment(), and update().