VR-Engage  2.2
Loading...
Searching...
No Matches
DtVortexBasePart Class Referenceabstract

Detailed Description

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>

Inheritance diagram for DtVortexBasePart:
[legend]

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 DtVortexBasePartparent () 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
 
DtVortexBasePartmyParent
 
makVre::DtVortexSimArtPartDescriptormyDescriptor
 
int myParentId
 
int myPartId
 
int myMotion
 
std::vector< int > myParamterIds
 
DtVector myPosition
 
DtVector myVelocity
 
DtVector myAcceleration
 
DtTaitBryan myOrientation
 
DtVector myAngularVelocity
 

Member Enumeration Documentation

◆ DtPartMotion

Enumeration defining possible part motion types.

These flags can be combined to define which degrees of freedom a part supports.

Enumerator

Motion along X axis.

Motion along Y axis.

Motion along Z axis.

TRANSLATION 

All translational motion.

AZIMUTH 

Rotation around Z axis.

ELEVATION 

Rotation around Y axis.

ROTATION 

Rotation around X axis.

ORIENTATION 

All rotational motion.

Constructor & Destructor Documentation

◆ DtVortexBasePart()

DtVortexBasePart::DtVortexBasePart ( makVre::DtVortexSimArtPartDescriptor * desc,
DtVortexBasePart * parent )

Constructor.

Creates a part with the specified descriptor and parent.

Parameters
descThe part descriptor containing configuration
parentThe parent part, or nullptr for root parts

References DtVortexBasePart(), and parent().

Referenced by DtVortexBasePart(), DtVortexDynamicsPart::DtVortexDynamicsPart(), DtVortexModularPart::DtVortexModularPart(), DtVortexPart::DtVortexPart(), and parent().

◆ ~DtVortexBasePart()

virtual DtVortexBasePart::~DtVortexBasePart ( )
virtual

Virtual destructor.

Member Function Documentation

◆ paramIds()

virtual const std::vector< int > & DtVortexBasePart::paramIds ( ) const
inlinevirtual

Gets the parameter IDs associated with this part.

Returns
Vector of parameter IDs

References myParamterIds.

◆ init()

virtual bool DtVortexBasePart::init ( )
pure virtual

Initializes the part.

Sets up the part and its connections to the physics engine.

Returns
True if initialization succeeded, false otherwise

Implemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.

◆ update()

virtual void DtVortexBasePart::update ( )
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.

◆ transform()

virtual Vx::VxTransform DtVortexBasePart::transform ( ) const
pure virtual

Gets the local transform in Vortex coordinates.

Returns
Local transform in NWU coordinates

Implemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.

◆ worldTransform()

virtual Vx::VxTransform DtVortexBasePart::worldTransform ( ) const
pure virtual

Gets the world transform in Vortex coordinates.

Returns
World transform in NWU coordinates

Implemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.

◆ resetInitialPartPositions()

virtual void DtVortexBasePart::resetInitialPartPositions ( )
inlinevirtual

Resets the initial part positions.

Derived classes may implement this to reset specific part positions.

Reimplemented in DtVortexDynamicsPart, and DtVortexPart.

◆ reset()

virtual void DtVortexBasePart::reset ( )
virtual

Resets the part to its initial state in Vortex.

Reimplemented in DtVortexDynamicsPart, DtVortexModularPart, and DtVortexPart.

◆ parent()

virtual DtVortexBasePart & DtVortexBasePart::parent ( ) const
virtual

◆ hasMotion()

virtual bool DtVortexBasePart::hasMotion ( DtPartMotion motion) const
virtual

Checks if this part has the specified motion capability.

Parameters
motionThe motion type to check (from DtPartMotion enum)
Returns
True if this part is configured with the specified motion

◆ partId()

virtual int DtVortexBasePart::partId ( ) const
inlinevirtual

Gets the part ID.

Gets this part's articulated part ID (see disEnums.h).

Returns
The part ID

References myPartId.

◆ parentId()

virtual int DtVortexBasePart::parentId ( ) const
inlinevirtual

Gets the parent part ID.

Returns
The parent part ID

References myParentId.

◆ position()

virtual DtVector DtVortexBasePart::position ( ) const
inlinevirtual

Gets the position in NED coordinate system.

Returns the position in the articulated part standard coordinate system.

Returns
Current part position

References myPosition.

◆ velocity()

virtual DtVector DtVortexBasePart::velocity ( ) const
inlinevirtual

Gets the current velocity.

Returns
Current velocity vector

References myVelocity.

◆ acceleration()

virtual DtVector DtVortexBasePart::acceleration ( ) const
inlinevirtual

Gets the current acceleration.

Returns
Current acceleration vector

References myAcceleration.

◆ orientation()

virtual DtTaitBryan DtVortexBasePart::orientation ( ) const
inlinevirtual

Gets the current orientation.

Returns
Current orientation as Tait-Bryan angles

References myOrientation.

◆ angularVelocity()

virtual DtVector DtVortexBasePart::angularVelocity ( ) const
inlinevirtual

Gets the current angular velocity.

Returns
Current angular velocity vector

References myAngularVelocity.

◆ name()

virtual const std::string & DtVortexBasePart::name ( ) const
inlinevirtual

Gets the part name.

Returns the name of this part as defined in the descriptor.

Returns
Part name

References myName.

Member Data Documentation

◆ myName

std::string DtVortexBasePart::myName
protected

Part name.

Referenced by name().

◆ myParent

DtVortexBasePart* DtVortexBasePart::myParent
protected

Parent part.

◆ myDescriptor

makVre::DtVortexSimArtPartDescriptor* DtVortexBasePart::myDescriptor
protected

Part descriptor.

◆ myParentId

int DtVortexBasePart::myParentId
protected

Parent part ID.

Referenced by parentId().

◆ myPartId

int DtVortexBasePart::myPartId
protected

This part's ID.

Referenced by partId().

◆ myMotion

int DtVortexBasePart::myMotion
protected

Supported motion types (bitmask)

◆ myParamterIds

std::vector<int> DtVortexBasePart::myParamterIds
protected

Parameter IDs for this part.

Referenced by paramIds().

◆ myPosition

DtVector DtVortexBasePart::myPosition
protected

Current position.

Referenced by position().

◆ myVelocity

DtVector DtVortexBasePart::myVelocity
protected

Current velocity.

Referenced by velocity().

◆ myAcceleration

DtVector DtVortexBasePart::myAcceleration
protected

Current acceleration.

Referenced by acceleration().

◆ myOrientation

DtTaitBryan DtVortexBasePart::myOrientation
protected

Current orientation.

Referenced by orientation().

◆ myAngularVelocity

DtVector DtVortexBasePart::myAngularVelocity
protected

Current angular velocity.

Referenced by angularVelocity().


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