14#include <matrix/vlVector.h>
15#include <matrix/vlTaitBryan.h>
17#include <Vx/VxTransform.h>
18#include <Vx/VxSmartPtr.h>
20#include <VxSim/VxSmartInterface.h>
29class DtArticulatedPartStateRepository;
32class DtArticulatedPart;
33class DtUpdateRepositoryOutputPortGroup;
71class VxPluginExtension;
73class VxSimulationState;
208 virtual inline const std::string&
name()
const {
return myName; }
505 VxSim::VxWeakInterface<VxDynamics::Part>
myPart;
int myMotion
Supported motion types (bitmask)
Definition vortexPart.h:218
std::string myName
Part name.
Definition vortexPart.h:211
DtTaitBryan myOrientation
Current orientation.
Definition vortexPart.h:226
DtVector myPosition
Current position.
Definition vortexPart.h:222
DtVector myAngularVelocity
Current angular velocity.
Definition vortexPart.h:227
virtual void update()=0
Updates the part state.
virtual DtVector velocity() const
Gets the current velocity.
Definition vortexPart.h:186
virtual DtTaitBryan orientation() const
Gets the current orientation.
Definition vortexPart.h:196
virtual const std::string & name() const
Gets the part name.
Definition vortexPart.h:208
int myPartId
This part's ID.
Definition vortexPart.h:216
DtVortexBasePart * myParent
Parent part.
Definition vortexPart.h:212
std::vector< int > myParamterIds
Parameter IDs for this part.
Definition vortexPart.h:220
virtual int parentId() const
Gets the parent part ID.
Definition vortexPart.h:174
virtual DtVector position() const
Gets the position in NED coordinate system.
Definition vortexPart.h:181
makVre::DtVortexSimArtPartDescriptor * myDescriptor
Part descriptor.
Definition vortexPart.h:213
virtual ~DtVortexBasePart()
Virtual destructor.
virtual const std::vector< int > & paramIds() const
Gets the parameter IDs associated with this part.
Definition vortexPart.h:120
virtual bool hasMotion(DtPartMotion motion) const
Checks if this part has the specified motion capability.
virtual void resetInitialPartPositions()
Resets the initial part positions.
Definition vortexPart.h:148
virtual void reset()
Resets the part to its initial state in Vortex.
virtual DtVector angularVelocity() const
Gets the current angular velocity.
Definition vortexPart.h:201
virtual int partId() const
Gets the part ID.
Definition vortexPart.h:169
DtPartMotion
Enumeration defining possible part motion types.
Definition vortexPart.h:94
@ X
Motion along X axis.
Definition vortexPart.h:95
@ Y
Motion along Y axis.
Definition vortexPart.h:96
@ Z
Motion along Z axis.
Definition vortexPart.h:97
@ ORIENTATION
All rotational motion.
Definition vortexPart.h:102
@ ELEVATION
Rotation around Y axis.
Definition vortexPart.h:100
@ TRANSLATION
All translational motion.
Definition vortexPart.h:98
@ AZIMUTH
Rotation around Z axis.
Definition vortexPart.h:99
@ ROTATION
Rotation around X axis.
Definition vortexPart.h:101
virtual DtVector acceleration() const
Gets the current acceleration.
Definition vortexPart.h:191
DtVortexBasePart(makVre::DtVortexSimArtPartDescriptor *desc, DtVortexBasePart *parent)
Constructor.
DtVector myVelocity
Current velocity.
Definition vortexPart.h:223
virtual Vx::VxTransform transform() const =0
Gets the local transform in Vortex coordinates.
virtual DtVortexBasePart & parent() const
Gets the parent part.
int myParentId
Parent part ID.
Definition vortexPart.h:215
virtual bool init()=0
Initializes the part.
virtual Vx::VxTransform worldTransform() const =0
Gets the world transform in Vortex coordinates.
DtVector myAcceleration
Current acceleration.
Definition vortexPart.h:224
virtual bool init() override
Initializes the part.
VxData::FieldBase * myDynamicsTransform
The dynamics transform field.
Definition vortexPart.h:440
PartType myDynamicPartType
The type of dynamics part (wheel, track wheel, idler, sprocket)
Definition vortexPart.h:443
int getWheelId() const
Gets the wheel index for track wheels.
Definition vortexPart.h:413
virtual bool initializeCarWheel()
Initializes a car wheel.
VxMath::Vector3 restPosition() const
Gets the rest position of the part.
virtual bool initializeTrackSprocket()
Initializes a track sprocket.
PartType getDynamicPartType() const
Gets the type of this dynamics part.
Definition vortexPart.h:398
PartSide getDynamicPartSide() const
Gets the side of the vehicle this part is on.
Definition vortexPart.h:404
int myWheelId
The wheel index for track wheels, -1 otherwise.
Definition vortexPart.h:445
double myDynamicWheelRadius
Wheel radius for dynamics calculations.
Definition vortexPart.h:436
virtual Vx::VxTransform transform() const override
Gets the local transform.
virtual void reset() override
Resets the part to its initial state.
PartSide myDynamicPartSide
The side of the vehicle this part is on (left, right)
Definition vortexPart.h:444
PartSide
Enumerates the side of the vehicle the part is on.
Definition vortexPart.h:334
@ LEFT
Part is on the left side of the vehicle.
Definition vortexPart.h:336
@ UNKNOWN_SIDE
Unknown or uninitialized side.
Definition vortexPart.h:335
@ RIGHT
Part is on the right side of the vehicle.
Definition vortexPart.h:337
virtual Vx::VxTransform worldTransform() const override
Gets the world transform.
PartType
Enumerates the type of dynamics part.
Definition vortexPart.h:321
@ TRACK_WHEEL
Wheel on a tracked vehicle (position relative to sprocket)
Definition vortexPart.h:324
@ UNKNOWN_TYPE
Unknown or uninitialized part type.
Definition vortexPart.h:322
@ WHEEL
Standard car wheel.
Definition vortexPart.h:323
@ IDLER
Track idler wheel at the rear of a tracked vehicle.
Definition vortexPart.h:325
@ SPROCKET
Drive sprocket at the front of a tracked vehicle.
Definition vortexPart.h:326
VxData::FieldBase * myDynamicsContactMaterial
The dynamics contact material field.
Definition vortexPart.h:441
virtual bool initializeTrackIdler()
Initializes a track idler.
virtual void resetInitialPartPositions() override
Resets the initial part positions.
virtual ~DtVortexDynamicsPart() override
Destructor.
double myDynamicWheelWidth
Wheel width for dynamics calculations.
Definition vortexPart.h:437
Vx::VxTransform myDOFTransform
Degree of freedom transform.
Definition vortexPart.h:438
virtual void update() override
Updates the part state from Vortex.
DtVortexDynamicsPart(Vx::VxWeakPtr< VxSim::VxExtension > dynamicsExt, makVre::DtVortexSimArtPartDescriptor *desc, DtVortexBasePart *parent)
Constructor.
virtual bool initializeTrackWheel()
Initializes a track wheel.
double wheelWidth() const
Gets the wheel width.
double wheelRadius() const
Gets the wheel radius.
Vx::VxWeakPtr< VxSim::VxExtension > myDynamicsExt
The dynamics extension.
Definition vortexPart.h:439
virtual void reset() override
Resets the part to its initial state.
DtVortexModularPart(VxSim::VxWeakInterface< VxDynamics::Part > part, makVre::DtVortexSimArtPartDescriptor *desc, DtVortexBasePart *parent)
Constructor.
Vx::VxTransform myTransformToChassis
Transform from part to chassis.
Definition vortexPart.h:506
VxSim::VxWeakInterface< VxDynamics::Part > myPart
The Vortex dynamics part.
Definition vortexPart.h:505
virtual void updateParentTransform()
Updates the parent transform.
virtual bool init() override
Initializes the part.
virtual void update() override
Updates the part state from Vortex.
virtual ~DtVortexModularPart() override
Destructor.
virtual Vx::VxTransform transform() const override
Gets the local transform.
virtual bool isParentTransformValid()
Checks if the parent transform is valid.
virtual Vx::VxTransform worldTransform() const override
Gets the world transform.
virtual VxSim::VxSmartInterface< VxDynamics::Part > getPartInterface()
Get an interface containing the part.
DtVector calculateLinearVelocity()
Calculates the current linear velocity.
DtVector calculateAngularVelocity()
Calculates the current angular velocity.
virtual ~DtVortexPart() override
Destructor.
Vx::VxPart * myPart
The Vortex physics part.
Definition vortexPart.h:304
virtual Vx::VxTransform worldTransform() const override
Gets the world transform.
virtual Vx::VxTransform transform() const override
Gets the local transform.
DtVector calculateAccleration()
Calculates the current acceleration.
virtual Vx::VxPart * getPart()
Gets the underlying Vortex part.
DtVector calculatePosition()
Calculates the current position.
virtual void reset() override
Resets the part to its initial state.
DtTaitBryan calculateOrientation()
Calculates the current orientation.
virtual bool init() override
Initializes the part.
virtual void resetInitialPartPositions() override
Resets the initial part positions.
DtVortexPart(Vx::VxPart *part, makVre::DtVortexSimArtPartDescriptor *desc, DtVortexBasePart *parent)
Constructor.
virtual void update() override
Updates the part state from Vortex.
Articulated part descriptor for Vortex physics simulation.
Definition vortexArtPartDescriptor.h:27
Export macros for the VR-Forces Vortex extension library.
#define VREVRFVORTEX_DLL
Export macro for non-Windows platforms.
Definition export.h:30
Definition vortexConfiguration.h:24
Definition vortexIntegrationModule.h:28
Wheel articulated part IDs used in the system.
Definition surfaceToVxMaterialMapper.h:20
Definition vortexConfiguration.h:29
!
Definition glsVreMessageUtil.h:50
Definition connectorAccessory.h:38