|
VR-Engage
2.3
|
Used for parts that rely on the Vortex dynamics extension, such as wheels and tracks.
#include <vortexPart.h>
Public Types | |
| enum | PartType { UNKNOWN_TYPE = -1 , WHEEL = 0 , TRACK_WHEEL = 1 , IDLER = 2 , SPROCKET = 3 } |
| enum | PartSide { UNKNOWN_SIDE = -1 , LEFT = 0 , RIGHT = 1 } |
Public Types inherited from DtVortexBasePart | |
| 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 | |
| DtVortexDynamicsPart (Vx::VxWeakPtr< VxSim::VxExtension > dynamicsExt, makVre::DtVortexSimArtPartDescriptor *desc, DtVortexBasePart *parent) | |
| virtual | ~DtVortexDynamicsPart () override |
| virtual bool | init () override |
| virtual void | update () override |
| virtual Vx::VxTransform | transform () const override |
| virtual Vx::VxTransform | worldTransform () const override |
| double | wheelRadius () const |
| double | wheelWidth () const |
| VxMath::Vector3 | restPosition () const |
| virtual void | resetInitialPartPositions () override |
| virtual void | reset () override |
| PartType | getDynamicPartType () const |
| PartSide | getDynamicPartSide () const |
| int | getWheelId () const |
Public Member Functions inherited from DtVortexBasePart | |
| DtVortexBasePart (makVre::DtVortexSimArtPartDescriptor *desc, DtVortexBasePart *parent) | |
| virtual | ~DtVortexBasePart () |
| virtual const std::vector< int > & | paramIds () const |
| 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 Member Functions | |
| virtual bool | initializeCarWheel () |
| virtual bool | initializeTrackSprocket () |
| virtual bool | initializeTrackIdler () |
| virtual bool | initializeTrackWheel () |
Protected Attributes | |
| double | myDynamicWheelRadius |
| double | myDynamicWheelWidth |
| Vx::VxTransform | myDOFTransform |
| Vx::VxWeakPtr< VxSim::VxExtension > | myDynamicsExt |
| VxData::FieldBase * | myDynamicsTransform |
| VxData::FieldBase * | myDynamicsContactMaterial |
| PartType | myDynamicPartType |
| PartSide | myDynamicPartSide |
| int | myWheelId |
Protected Attributes inherited from DtVortexBasePart | |
| 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 |
Enumerates the type of dynamics part.
Identifies the role of a part within the vehicle dynamics system, enabling type-specific position updates and physics calculations.
Enumerates the side of the vehicle the part is on.
Used to determine which track system (left or right) a part belongs to for proper position updates on tracked vehicles.
| Enumerator | |
|---|---|
| UNKNOWN_SIDE | Unknown or uninitialized side. |
| LEFT | Part is on the left side of the vehicle. |
| RIGHT | Part is on the right side of the vehicle. |
| DtVortexDynamicsPart::DtVortexDynamicsPart | ( | Vx::VxWeakPtr< VxSim::VxExtension > | dynamicsExt, |
| makVre::DtVortexSimArtPartDescriptor * | desc, | ||
| DtVortexBasePart * | parent ) |
Constructor.
| dynamicsExt | The Vortex dynamics extension |
| desc | Part descriptor |
| parent | Pointer to the parent part |
References DtVortexBasePart::DtVortexBasePart(), and DtVortexBasePart::parent().
|
overridevirtual |
Destructor.
|
overridevirtual |
Initializes the part.
Implements DtVortexBasePart.
|
overridevirtual |
Updates the part state from Vortex.
Implements DtVortexBasePart.
|
overridevirtual |
|
overridevirtual |
| double DtVortexDynamicsPart::wheelRadius | ( | ) | const |
Gets the wheel radius.
| double DtVortexDynamicsPart::wheelWidth | ( | ) | const |
Gets the wheel width.
| VxMath::Vector3 DtVortexDynamicsPart::restPosition | ( | ) | const |
Gets the rest position of the part.
|
overridevirtual |
Resets the initial part positions.
Reimplemented from DtVortexBasePart.
|
overridevirtual |
Resets the part to its initial state.
Reimplemented from DtVortexBasePart.
|
inline |
Gets the type of this dynamics part.
References myDynamicPartType.
|
inline |
Gets the side of the vehicle this part is on.
References myDynamicPartSide.
|
inline |
Gets the wheel index for track wheels.
For TRACK_WHEEL parts, returns the index of the wheel within the track system. This index is parsed from the part name and is used to locate the correct wheel position field in the Vortex dynamics parameters.
References myWheelId.
|
protectedvirtual |
Initializes a car wheel.
|
protectedvirtual |
Initializes a track sprocket.
|
protectedvirtual |
Initializes a track idler.
|
protectedvirtual |
Initializes a track wheel.
|
protected |
Wheel radius for dynamics calculations.
|
protected |
Wheel width for dynamics calculations.
|
protected |
Degree of freedom transform.
|
protected |
The dynamics extension.
|
protected |
The dynamics transform field.
|
protected |
The dynamics contact material field.
|
protected |
The type of dynamics part (wheel, track wheel, idler, sprocket)
Referenced by getDynamicPartType().
|
protected |
The side of the vehicle this part is on (left, right)
Referenced by getDynamicPartSide().
|
protected |
The wheel index for track wheels, -1 otherwise.
Referenced by getWheelId().