VR-Engage  2.3
Loading...
Searching...
No Matches
DtVortexDynamicsPart Class Reference

Detailed Description

Used for parts that rely on the Vortex dynamics extension, such as wheels and tracks.

#include <vortexPart.h>

Inheritance diagram for DtVortexDynamicsPart:
[legend]

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
 

Member Enumeration Documentation

◆ PartType

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.

Enumerator
UNKNOWN_TYPE 

Unknown or uninitialized part type.

WHEEL 

Standard car wheel.

TRACK_WHEEL 

Wheel on a tracked vehicle (position relative to sprocket)

IDLER 

Track idler wheel at the rear of a tracked vehicle.

SPROCKET 

Drive sprocket at the front of a tracked vehicle.

◆ PartSide

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.

Constructor & Destructor Documentation

◆ DtVortexDynamicsPart()

DtVortexDynamicsPart::DtVortexDynamicsPart ( Vx::VxWeakPtr< VxSim::VxExtension > dynamicsExt,
makVre::DtVortexSimArtPartDescriptor * desc,
DtVortexBasePart * parent )

Constructor.

Parameters
dynamicsExtThe Vortex dynamics extension
descPart descriptor
parentPointer to the parent part

References DtVortexBasePart::DtVortexBasePart(), and DtVortexBasePart::parent().

◆ ~DtVortexDynamicsPart()

virtual DtVortexDynamicsPart::~DtVortexDynamicsPart ( )
overridevirtual

Destructor.

Member Function Documentation

◆ init()

virtual bool DtVortexDynamicsPart::init ( )
overridevirtual

Initializes the part.

Returns
True if initialization succeeded, false otherwise

Implements DtVortexBasePart.

◆ update()

virtual void DtVortexDynamicsPart::update ( )
overridevirtual

Updates the part state from Vortex.

Implements DtVortexBasePart.

◆ transform()

virtual Vx::VxTransform DtVortexDynamicsPart::transform ( ) const
overridevirtual

Gets the local transform.

Returns
Local transform in Vortex coordinates

Implements DtVortexBasePart.

◆ worldTransform()

virtual Vx::VxTransform DtVortexDynamicsPart::worldTransform ( ) const
overridevirtual

Gets the world transform.

Returns
World transform in Vortex coordinates

Implements DtVortexBasePart.

◆ wheelRadius()

double DtVortexDynamicsPart::wheelRadius ( ) const

Gets the wheel radius.

Returns
Wheel radius in meters

◆ wheelWidth()

double DtVortexDynamicsPart::wheelWidth ( ) const

Gets the wheel width.

Returns
Wheel width in meters

◆ restPosition()

VxMath::Vector3 DtVortexDynamicsPart::restPosition ( ) const

Gets the rest position of the part.

Returns
Rest position vector in Vortex coordinates

◆ resetInitialPartPositions()

virtual void DtVortexDynamicsPart::resetInitialPartPositions ( )
overridevirtual

Resets the initial part positions.

Reimplemented from DtVortexBasePart.

◆ reset()

virtual void DtVortexDynamicsPart::reset ( )
overridevirtual

Resets the part to its initial state.

See DtVortexBasePart::reset()

Reimplemented from DtVortexBasePart.

◆ getDynamicPartType()

PartType DtVortexDynamicsPart::getDynamicPartType ( ) const
inline

Gets the type of this dynamics part.

Returns
The PartType indicating whether this is a wheel, track wheel, idler, or sprocket
See also
PartType

References myDynamicPartType.

◆ getDynamicPartSide()

PartSide DtVortexDynamicsPart::getDynamicPartSide ( ) const
inline

Gets the side of the vehicle this part is on.

Returns
The PartSide indicating left, right, or unknown side
See also
PartSide

References myDynamicPartSide.

◆ getWheelId()

int DtVortexDynamicsPart::getWheelId ( ) const
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.

Returns
The wheel index (0-based), or -1 if not a track wheel

References myWheelId.

◆ initializeCarWheel()

virtual bool DtVortexDynamicsPart::initializeCarWheel ( )
protectedvirtual

Initializes a car wheel.

Returns
True if initialization succeeded, false otherwise

◆ initializeTrackSprocket()

virtual bool DtVortexDynamicsPart::initializeTrackSprocket ( )
protectedvirtual

Initializes a track sprocket.

Returns
True if initialization succeeded, false otherwise

◆ initializeTrackIdler()

virtual bool DtVortexDynamicsPart::initializeTrackIdler ( )
protectedvirtual

Initializes a track idler.

Returns
True if initialization succeeded, false otherwise

◆ initializeTrackWheel()

virtual bool DtVortexDynamicsPart::initializeTrackWheel ( )
protectedvirtual

Initializes a track wheel.

Returns
True if initialization succeeded, false otherwise

Member Data Documentation

◆ myDynamicWheelRadius

double DtVortexDynamicsPart::myDynamicWheelRadius
protected

Wheel radius for dynamics calculations.

◆ myDynamicWheelWidth

double DtVortexDynamicsPart::myDynamicWheelWidth
protected

Wheel width for dynamics calculations.

◆ myDOFTransform

Vx::VxTransform DtVortexDynamicsPart::myDOFTransform
protected

Degree of freedom transform.

◆ myDynamicsExt

Vx::VxWeakPtr<VxSim::VxExtension> DtVortexDynamicsPart::myDynamicsExt
protected

The dynamics extension.

◆ myDynamicsTransform

VxData::FieldBase* DtVortexDynamicsPart::myDynamicsTransform
protected

The dynamics transform field.

◆ myDynamicsContactMaterial

VxData::FieldBase* DtVortexDynamicsPart::myDynamicsContactMaterial
protected

The dynamics contact material field.

◆ myDynamicPartType

PartType DtVortexDynamicsPart::myDynamicPartType
protected

The type of dynamics part (wheel, track wheel, idler, sprocket)

Referenced by getDynamicPartType().

◆ myDynamicPartSide

PartSide DtVortexDynamicsPart::myDynamicPartSide
protected

The side of the vehicle this part is on (left, right)

Referenced by getDynamicPartSide().

◆ myWheelId

int DtVortexDynamicsPart::myWheelId
protected

The wheel index for track wheels, -1 otherwise.

Referenced by getWheelId().


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