|
VR-Engage
2.2
|
Provides common functionality for different types of parts including position, orientation, and motion tracking. Derived classes implement specific behaviors for different part types such as wheels and turrets.
#include <vortexPart.h>
Public Types | |
| enum | DtPartMotion { X = 0x01 , Y = 0x02 , Z = 0x04 , TRANSLATION = X | Y | Z , AZIMUTH = 0x10 , ELEVATION = 0x20 , ROTATION = 0x40 , ORIENTATION = AZIMUTH | ELEVATION | ROTATION } |
Public Member Functions | |
| DtVortexBasePart (makVre::DtVortexSimArtPartDescriptor *desc, DtVortexBasePart *parent) | |
| virtual | ~DtVortexBasePart () |
| virtual const std::vector< int > & | paramIds () const |
| virtual bool | init ()=0 |
| virtual void | update ()=0 |
| virtual Vx::VxTransform | transform () const =0 |
| virtual Vx::VxTransform | worldTransform () const =0 |
| virtual void | resetInitialPartPositions () |
| virtual void | reset () |
| virtual DtVortexBasePart & | parent () const |
| virtual bool | hasMotion (DtPartMotion motion) const |
| virtual int | partId () const |
| virtual int | parentId () const |
| virtual DtVector | position () const |
| virtual DtVector | velocity () const |
| virtual DtVector | acceleration () const |
| virtual DtTaitBryan | orientation () const |
| virtual DtVector | angularVelocity () const |
| virtual const std::string & | name () const |
Protected Attributes | |
| std::string | myName |
| DtVortexBasePart * | myParent |
| makVre::DtVortexSimArtPartDescriptor * | myDescriptor |
| int | myParentId |
| int | myPartId |
| int | myMotion |
| std::vector< int > | myParamterIds |
| DtVector | myPosition |
| DtVector | myVelocity |
| DtVector | myAcceleration |
| DtTaitBryan | myOrientation |
| DtVector | myAngularVelocity |
Enumeration defining possible part motion types.
These flags can be combined to define which degrees of freedom a part supports.
| DtVortexBasePart::DtVortexBasePart | ( | makVre::DtVortexSimArtPartDescriptor * | desc, |
| DtVortexBasePart * | parent ) |
Constructor.
Creates a part with the specified descriptor and parent.
| desc | The part descriptor containing configuration |
| parent | The parent part, or nullptr for root parts |
References DtVortexBasePart(), and parent().
Referenced by DtVortexBasePart(), DtVortexDynamicsPart::DtVortexDynamicsPart(), DtVortexModularPart::DtVortexModularPart(), DtVortexPart::DtVortexPart(), and parent().
|
virtual |
Virtual destructor.
|
inlinevirtual |
Gets the parameter IDs associated with this part.
References myParamterIds.
|
pure virtual |
Initializes the part.
Sets up the part and its connections to the physics engine.
Implemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.
|
pure virtual |
Updates the part state.
Called every frame by the movement actuator. Takes data from Vortex and produces values translated for publishing.
Implemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.
|
pure virtual |
Gets the local transform in Vortex coordinates.
Implemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.
|
pure virtual |
Gets the world transform in Vortex coordinates.
Implemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.
|
inlinevirtual |
Resets the initial part positions.
Derived classes may implement this to reset specific part positions.
Reimplemented in DtVortexDynamicsPart, and DtVortexPart.
|
virtual |
Resets the part to its initial state in Vortex.
Reimplemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.
|
virtual |
Gets the parent part.
References DtVortexBasePart().
Referenced by DtVortexBasePart(), DtVortexDynamicsPart::DtVortexDynamicsPart(), DtVortexModularPart::DtVortexModularPart(), and DtVortexPart::DtVortexPart().
|
virtual |
Checks if this part has the specified motion capability.
| motion | The motion type to check (from DtPartMotion enum) |
|
inlinevirtual |
Gets the part ID.
Gets this part's articulated part ID (see disEnums.h).
References myPartId.
|
inlinevirtual |
|
inlinevirtual |
Gets the position in NED coordinate system.
Returns the position in the articulated part standard coordinate system.
References myPosition.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Gets the current orientation.
References myOrientation.
|
inlinevirtual |
Gets the current angular velocity.
References myAngularVelocity.
|
inlinevirtual |
Gets the part name.
Returns the name of this part as defined in the descriptor.
References myName.
|
protected |
Part name.
Referenced by name().
|
protected |
Parent part.
|
protected |
Part descriptor.
|
protected |
Parent part ID.
Referenced by parentId().
|
protected |
This part's ID.
Referenced by partId().
|
protected |
Supported motion types (bitmask)
|
protected |
Parameter IDs for this part.
Referenced by paramIds().
|
protected |
Current position.
Referenced by position().
|
protected |
Current velocity.
Referenced by velocity().
|
protected |
Current acceleration.
Referenced by acceleration().
|
protected |
Current orientation.
Referenced by orientation().
|
protected |
Current angular velocity.
Referenced by angularVelocity().