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

Detailed Description

This actuator provides high-fidelity vehicle physics by connecting a VR-Forces entity to a Vortex physics model. It handles vehicle dynamics simulation, terrain interaction, articulated parts, and player control.

Uses Descriptor Type: DtVortexMovementActuatorDescriptor

#include <vortexMovementActuator.h>

Inheritance diagram for DtVortexMovementActuator:
[legend]

Public Types

using VortexInterfaceMap = std::map<std::string, DtVortexInterface*>
 

Public Member Functions

 DtVortexMovementActuator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVortexMovementActuator () override
 
DtVortexMovementActuator & operator= (const DtVortexMovementActuator &orig)=delete
 
 DtVortexMovementActuator (const DtVortexMovementActuator &orig)=delete
 
virtual bool init () override
 
virtual void tick () override
 
virtual const char * type () const override
 
virtual bool createPorts () override
 
virtual bool createPortGroups () override
 
virtual void preFirstTickInit () override
 
virtual const std::vector< DtVortexBasePart * > & getParts () const
 
virtual bool isInVortexWorld () const
 
virtual bool isVortexPlayerControlled () const
 
virtual bool isBeingTowed () const
 
virtual DtUUID towingTargetUuid () const
 
virtual DtUUID towingTargetUuid (const VxData::FieldBase &field) const
 
virtual void dropAboveTerrain (const DtVector &newLocalPosition, double heading)
 
VxMath::Matrix44 getNextFrameVortexTransform () const
 
VxSim::VxSmartInterface< VxDynamics::Mechanism > getMechanism ()
 
Vx::VxVector3 getNextFrameVortexPosition () const
 
Vx::VxEulerAngles getNextFrameVortexOrientation () const
 
void disableVehicleDynamics ()
 
void enableVehicleDynamics ()
 
void processStartupDynamicsWarmupStep ()
 
virtual void initParametersFromModel ()
 
virtual void updateMassOfChassis ()
 

Static Public Member Functions

static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 

Protected Types

enum  MechanismLoadStatus { NOT_LOADED = 0 , LOADING = 1 , LOADED = 2 }
 

Protected Member Functions

void loadMechanism ()
 
void processTerrainChangeNotification (const DtTerrainChangeNotificationInfo &terrainChangeInfo)
 
void tagDynamicsPartGeometries ()
 
virtual void initArticulatedPartPositions ()
 
virtual void initTrackPartPositions (bool didInitLeftSprocket, bool didInitRightSprocket)
 
virtual const char * trackNameForPart (const DtVortexDynamicsPart &dynamicsPart) const
 
virtual VxData::FieldBase * vehicleParameter (const std::string &parameterName) const
 
virtual bool initFieldFromArticulatedPartPosition (VxData::FieldBase *field, const makVrf::DtArticulatedPartStateRepository *partRepository, const DtVortexDynamicsPart *dynamicsPart) const
 
virtual bool initTrackWheelRelativeToSprocket (VxData::FieldBase *trackWheel, VxData::FieldBase *sprocket, const makVrf::DtArticulatedPartStateRepository *partRepository, const DtVortexDynamicsPart *dynamicsPart) const
 
virtual bool initWheelPositionFromArticulatedPart (DtVortexDynamicsPart *dynamicsPart, const makVrf::DtArticulatedPartStateRepository *partRepository)
 
virtual bool initSprocketPositionFromArticulatedPart (DtVortexDynamicsPart *dynamicsPart, const makVrf::DtArticulatedPartStateRepository *partRepository)
 
virtual void initTrackWheelPositionFromArticulatedPart (DtVortexDynamicsPart *dynamicsPart, const makVrf::DtArticulatedPartStateRepository *partRepository, const char *trackName)
 
virtual void initTrackIdlerDistanceFromArticulatedPart (DtVortexDynamicsPart *dynamicsPart, const makVrf::DtArticulatedPartStateRepository *partRepository, const char *trackName)
 
DtVortexBasePart * findPart (int partId) const
 
virtual bool isVortexMechanismValid () const
 
virtual void getLowestBoundingPointsOfMechanism (std::vector< DtVector > &outputPoints)
 
virtual void processSetVortexWhileUntasked (DtSimMessage *msg)
 
virtual bool createPSR ()
 
virtual bool isHighFidelityCGF () const
 
virtual bool isPlayerControlledAs (std::string role) const
 
virtual void realizeVortexState ()
 
virtual bool isTerrainAvailable () const
 
virtual void detectTerrainFallthrough ()
 
virtual void setVortexMechanismLocation (const Vx::VxVector3 &nwuLocation, double heading)
 
Vx::VxVector3 getVortexLocation (const DtVector &inputCoords) const
 
virtual void sendVehicleDynamicsUpdate (bool enable)
 
virtual void sendExtensionUpdate (VxSim::VxExtension *extension, bool enable)
 
void connectTowingTargetObserver ()
 
void processTowingTargetChanged (const VxData::FieldBase &field)
 
void updateTowingHookGroupState (const DtUUID &currentTowingTargetUuid)
 
void resetTowingHookGroup ()
 
void sendTowingHookGroupUpdate (bool enable)
 
VxSim::VxExtension * findTowingHookGroupExtension ()
 
virtual void checkTaskStatus (bool vortexActive)
 
virtual bool taskConflictsWithVortex (const DtSimTaskMessageType &taskType) const
 
virtual void connectTowingTargetDeletedSignal (const DtUUID &targetUuid)
 
virtual void processTowingTargetDeleted ()
 
virtual void clearTowingTargetTracking ()
 
virtual void sendVehiclePartsUpdate (Vx::VxPart::EntityControlTypeEnum control)
 
virtual void addSetCallbacks ()
 
virtual void removeSetCallbacks ()
 
virtual void handleSetLocation (const DtVector &location)
 
virtual void handleSetHeading (DtReal heading)
 
virtual void resetWheelParts ()
 
virtual void manageWheelPartStateTransitions (bool inVortexWorld)
 
virtual void updateState ()
 
virtual void restoreWheels ()
 
virtual void engageParkingBrakeOnDisengage (bool isDriver)
 
virtual void updateFuel ()
 
virtual void updateDestroyedState ()
 
virtual double fuelLeft () const
 
virtual void useFuel (double fuelUsed)
 
DtVortexBasePart * createPart (makVre::DtVortexSimArtPartDescriptor *desc)
 
virtual void createVortexPartsFromDescriptor ()
 
virtual void setThresholdsFromDescriptor ()
 
virtual void updateGroundInteractionPoint (const DtDcm &localOrientation, const DtVector &localPosition, const DtAttachedTerrain &terrain, bool &dataAvailable) const
 
virtual void createVortexConfigurationsFromDescriptor ()
 
virtual void createVortexInterfacesFromDescriptor ()
 
virtual void connectInterfacesToPorts ()
 
virtual void queueMechanismLoad ()
 
virtual void updatePorts ()
 
virtual void populateArtPartMapProperty ()
 
VxSim::VxSmartInterface< VxDynamics::Part > findPartFromPathRecursive (const VxSim::VxWeakInterface< VxSim::IObject > &objectToLookThroughWeak, const std::vector< std::string > &pathToLookForPart, int index)
 
virtual bool checkDistanceFromCoordinateOriginOverLimit (const DtVector &position, double distance)
 

Static Protected Member Functions

static void terrainChangeNotification (const DtTerrainChangeNotificationInfo &terrainChangeInfo, void *usr)
 
static void setVortexWhileUntaskedCallback (DtSimMessage *msg, void *usrData)
 
static void setHeadingCallback (DtReal heading, void *usrData)
 
static void setLocationCallback (const DtVector &location, void *usrData)
 

Protected Attributes

const DtVortexMovementActuatorDescriptor * myDescriptor
 
DtGroundVehicleStateRepository * myGroundVehicleState
 
DtVortexStateRepository * myVehicleRepository
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
DtArticulatedPartCollection myCollectionWithWheels
 
VxSim::VxSmartInterface< VxDynamics::Mechanism > myMechanism
 
VxSim::VxSmartInterface< DtMechAddon > myMechAddon
 
VxSim::VxExtension * myVehicleExt
 
std::vector< DtVortexBasePart * > myParts
 
VortexInterfaceMap myInterfaces
 
std::shared_ptr< VxSim::VxSimulationFileManagerFacade > mySimulationFileManagerFacade
 
Vx::VxSmartPtr< DtVxSimulationFileManagerFacadeListener > myListener
 
std::shared_ptr< makVre::DtVortexConfiguration > myConfiguration
 
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
 
DtStringOutputPort * myAimingModePort
 
bool myWasInVortexWorldLastTick
 
bool myWasBeingTowedLastTick
 
VxData::DelegateConnection myTowingTargetObserverConnection
 
boost::signals2::scoped_connection myTowingTargetDeletedConnection
 
DtUUID myTowingTargetUuid
 
bool myWasDriverLastTick
 
bool myAutoParkButtonDown
 
bool myNeedsWheelPartRemoval
 
bool myHaveVortexTurretInterface
 
bool myIsVortexDynamicsActive
 
bool myPendingDynamicsDisableAfterStartupStep
 
bool myPendingVortexPhysicsState
 
bool myHasVortexPhysicsRequest
 
bool mySpawnedFromSpawnPoint
 
MechanismLoadStatus myMechanismLoadStatus
 
VxSim::VxUuid myLoadObjectRequestId
 
makVre::DtVortexPhysicalWorld * myVortexPhysicalWorld
 
double myPositionThreshold
 
double myOrientationThreshold
 
double myVelocityThreshold
 
double myAngularVelocityThreshold
 
double myAccelerationThreshold
 
double myPartPositionThreshold
 
double myPartOrientationThreshold
 
double myPartLinearVelocityThreshold
 
double myPartAngularVelocityThreshold
 
double myDropTimer
 
double myVortexPhysicsDisableDelaySeconds
 
double myVortexPhysicsDisableDelayElapsedSeconds
 
bool myAllowVortexWhileDestroyed
 
bool myDetectTerrainFallthrough
 
DtVector myPreviousPosition
 
DtTaitBryan myPreviousOrientation
 
makVre::DtVortexMovementPSR * myProcessState
 

Friends

class DtVxSimulationFileManagerFacadeListener
 

Member Typedef Documentation

◆ VortexInterfaceMap

Type definition for a map of Vortex interfaces by name.

Member Enumeration Documentation

◆ MechanismLoadStatus

Enumerator
NOT_LOADED 
LOADING 
LOADED 

Constructor & Destructor Documentation

◆ DtVortexMovementActuator() [1/2]

DtVortexMovementActuator::DtVortexMovementActuator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Initializes the actuator with the specified parameters.

Parameters
nameComponent name
ownerOwner local object
simManagerSimulation services
descComponent descriptor
parentRegistryParent reader/writer registry

Referenced by DtVortexMovementActuator(), and operator=().

◆ ~DtVortexMovementActuator()

virtual DtVortexMovementActuator::~DtVortexMovementActuator ( )
overridevirtual

Destructor.

◆ DtVortexMovementActuator() [2/2]

DtVortexMovementActuator::DtVortexMovementActuator ( const DtVortexMovementActuator & orig)
delete

Member Function Documentation

◆ operator=()

DtVortexMovementActuator & DtVortexMovementActuator::operator= ( const DtVortexMovementActuator & orig)
delete

Assignment operator and copy constructor not implemented.

References DtVortexMovementActuator().

◆ init()

virtual bool DtVortexMovementActuator::init ( )
overridevirtual

Initializes the actuator.

Registers set callbacks and queues the loading of the physics mechanism.

Returns
True on success, false otherwise

◆ tick()

virtual void DtVortexMovementActuator::tick ( )
overridevirtual

Updates the actuator each simulation frame.

Manages the state of the Vortex mechanism, updates input/output ports, and synchronizes between VR-Forces and Vortex.

◆ type()

virtual const char * DtVortexMovementActuator::type ( ) const
overridevirtual

Gets the type of this actuator.

Returns
DtVortexMovementActuatorType

◆ createPorts()

virtual bool DtVortexMovementActuator::createPorts ( )
overridevirtual

Creates the ports required for actuator operation.

Creates the ports from the VHL Interface.

Returns
True on success, false otherwise

◆ createPortGroups()

virtual bool DtVortexMovementActuator::createPortGroups ( )
overridevirtual

Creates the port groups for the actuator.

Creates the input and output port groups from the VHL Interface.

Returns
True on success, false otherwise

◆ creator()

static DtSimComponent * DtVortexMovementActuator::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
static

Factory method for creating instances of this actuator.

Parameters
nameComponent name
ownerOwner local object
simManagerSimulation services
descComponent descriptor
parentRegistryParent reader/writer registry
Returns
New instance of this class

◆ preFirstTickInit()

virtual void DtVortexMovementActuator::preFirstTickInit ( )
overridevirtual

Initializes the actuator before the first simulation tick.

Calls initializeMovementChooserName() and dropAboveTerrain() to initially place the vehicle on the terrain. Also passes any specified Vortex parameters from the system definition file.

◆ getParts()

virtual const std::vector< DtVortexBasePart * > & DtVortexMovementActuator::getParts ( ) const
virtual

Gets the list of all Vortex parts in this actuator.

Returns
Vector of pointers to Vortex parts

◆ isInVortexWorld()

virtual bool DtVortexMovementActuator::isInVortexWorld ( ) const
virtual

Checks if high-fidelity Vortex physics should be active.

Vortex should be active if the player is driving the vehicle OR if the vehicle is stationary and high-fidelity collision physics are enabled for this vehicle.

Returns
True if Vortex physics should be active, false otherwise

◆ isVortexPlayerControlled()

virtual bool DtVortexMovementActuator::isVortexPlayerControlled ( ) const
virtual

Checks if the entity is player controlled.

Returns
True if the entity is player controlled, false otherwise

◆ isBeingTowed()

virtual bool DtVortexMovementActuator::isBeingTowed ( ) const
virtual

Checks if the entity is being towed by another Vortex entity.

Returns
True if the entity is being towed, false otherwise

◆ towingTargetUuid() [1/2]

virtual DtUUID DtVortexMovementActuator::towingTargetUuid ( ) const
virtual

Gets the entity currently attached to this vehicle's tow hook.

Returns
Current hook target UUID, or null UUID if there is no target

◆ towingTargetUuid() [2/2]

virtual DtUUID DtVortexMovementActuator::towingTargetUuid ( const VxData::FieldBase & field) const
virtual

Converts a Vortex field value to a tow target UUID.

Parameters
fieldVortex field containing the hook target value
Returns
Current hook target UUID, or null UUID if the field has no valid target

◆ dropAboveTerrain()

virtual void DtVortexMovementActuator::dropAboveTerrain ( const DtVector & newLocalPosition,
double heading )
virtual

Drops the vehicle above the terrain at a specified position.

Calculates the terrain height at the new location and positions the vehicle at the appropriate height above the terrain. The additional height above terrain is determined by the descriptor's additionalDropHeight() value (default: 0.5 meters).

This method checks all bounding points of the vehicle mechanism to ensure no part of the vehicle is placed below the terrain surface. The vehicle is positioned such that its lowest point is at the terrain height plus the additional drop height.

Parameters
newLocalPositionWhere to drop the vehicle (in local coordinates)
headingThe heading to set the vehicle at (in radians)
Note
The additional height value is now configured via DtVortexMovementActuatorDescriptor::setAdditionalDropHeight()
See also
DtVortexMovementActuatorDescriptor::additionalDropHeight()

◆ getNextFrameVortexTransform()

VxMath::Matrix44 DtVortexMovementActuator::getNextFrameVortexTransform ( ) const

Gets the next frame's location and orientation as a VxMatrix.

Returns
Matrix containing orientation and position in NWU coordinates

◆ getMechanism()

VxSim::VxSmartInterface< VxDynamics::Mechanism > DtVortexMovementActuator::getMechanism ( )

Gets the current mechanism associated with the actuator.

Returns
Smart interface to the current mechanism

◆ getNextFrameVortexPosition()

Vx::VxVector3 DtVortexMovementActuator::getNextFrameVortexPosition ( ) const

Gets the next frame Vortex location from the entity.

Returns
Location vector in Vortex coordinates

◆ getNextFrameVortexOrientation()

Vx::VxEulerAngles DtVortexMovementActuator::getNextFrameVortexOrientation ( ) const

Gets the next frame Vortex orientation from the entity.

Returns
Euler angles in Vortex coordinates

◆ disableVehicleDynamics()

void DtVortexMovementActuator::disableVehicleDynamics ( )

Disables the vehicle dynamics.

Sets the parts to static and disables vehicle dynamics.

◆ enableVehicleDynamics()

void DtVortexMovementActuator::enableVehicleDynamics ( )

Enables the vehicle dynamics.

Sets the parts to dynamic and enables vehicle dynamics.

◆ processStartupDynamicsWarmupStep()

void DtVortexMovementActuator::processStartupDynamicsWarmupStep ( )

Applies the deferred startup dynamics disable after one physics step.

Called from DtMechAddon::preStep() so the mechanism receives one warm-up step after initial placement before dynamics are disabled.

◆ initParametersFromModel()

virtual void DtVortexMovementActuator::initParametersFromModel ( )
virtual

Initializes Vortex model parameters with data from VR-Forces.

Initializes vehicle mass and wheel articulated part positions from VR-Forces entity parameters. Called by loadMechanism.

◆ updateMassOfChassis()

virtual void DtVortexMovementActuator::updateMassOfChassis ( )
virtual

Updates the chassis mass from entity parameters.

Finds the chassis part (part ID -1) in the Vortex mechanism and updates its mass and inertia tensor based on the entity's mass parameter. The center of mass offset is preserved during the inertia recomputation.

Note
This method iterates through all parts looking for DtVortexPart instances with part ID -1 (chassis).
See also
initParametersFromModel()

◆ loadMechanism()

void DtVortexMovementActuator::loadMechanism ( )
protected

Loads the Vortex mechanism.

Performs the main loading of the mechanism. Called by the Listener in Vortex at a safe time.

◆ terrainChangeNotification()

static void DtVortexMovementActuator::terrainChangeNotification ( const DtTerrainChangeNotificationInfo & terrainChangeInfo,
void * usr )
staticprotected

Static callback for terrain change notifications.

Parameters
terrainChangeInfoInformation about the terrain change
usrPointer to this actuator

◆ processTerrainChangeNotification()

void DtVortexMovementActuator::processTerrainChangeNotification ( const DtTerrainChangeNotificationInfo & terrainChangeInfo)
protected

Processes terrain change notifications.

Checks if the entity is within the spatial extents of the terrain change notification and sets the terrain change flag if needed.

Parameters
terrainChangeInfoInformation about the terrain change

◆ tagDynamicsPartGeometries()

void DtVortexMovementActuator::tagDynamicsPartGeometries ( )
protected

Tags the geometries of all dynamics parts for collision detection.

◆ initArticulatedPartPositions()

virtual void DtVortexMovementActuator::initArticulatedPartPositions ( )
protectedvirtual

Initializes Vortex vehicle-part positions from VR-Forces articulated parts.

Initializes conventional wheels and sprockets before processing track wheels and idlers, which depend on their corresponding sprocket positions.

◆ initTrackPartPositions()

virtual void DtVortexMovementActuator::initTrackPartPositions ( bool didInitLeftSprocket,
bool didInitRightSprocket )
protectedvirtual

Initializes tracked-vehicle wheel and idler positions.

Parameters
didInitLeftSprocketTrue when the left sprocket position was initialized
didInitRightSprocketTrue when the right sprocket position was initialized

◆ trackNameForPart()

virtual const char * DtVortexMovementActuator::trackNameForPart ( const DtVortexDynamicsPart & dynamicsPart) const
protectedvirtual

Gets the Vortex track parameter name for a dynamics part.

Returns
The left or right track parameter name, or nullptr for an invalid side

◆ vehicleParameter()

virtual VxData::FieldBase * DtVortexMovementActuator::vehicleParameter ( const std::string & parameterName) const
protectedvirtual

Gets a named Vortex vehicle parameter.

Logs a warning if the parameter is unavailable.

◆ initFieldFromArticulatedPartPosition()

virtual bool DtVortexMovementActuator::initFieldFromArticulatedPartPosition ( VxData::FieldBase * field,
const makVrf::DtArticulatedPartStateRepository * partRepository,
const DtVortexDynamicsPart * dynamicsPart ) const
protectedvirtual

Initializes a Vortex position field from an articulated-part position.

Returns
True when the field was successfully initialized

◆ initTrackWheelRelativeToSprocket()

virtual bool DtVortexMovementActuator::initTrackWheelRelativeToSprocket ( VxData::FieldBase * trackWheel,
VxData::FieldBase * sprocket,
const makVrf::DtArticulatedPartStateRepository * partRepository,
const DtVortexDynamicsPart * dynamicsPart ) const
protectedvirtual

Initializes a track-wheel position relative to its sprocket.

Returns
True when the field was successfully initialized

◆ initWheelPositionFromArticulatedPart()

virtual bool DtVortexMovementActuator::initWheelPositionFromArticulatedPart ( DtVortexDynamicsPart * dynamicsPart,
const makVrf::DtArticulatedPartStateRepository * partRepository )
protectedvirtual

Initializes a conventional wheel position from an articulated part.

Returns
True when the wheel position was successfully initialized

◆ initSprocketPositionFromArticulatedPart()

virtual bool DtVortexMovementActuator::initSprocketPositionFromArticulatedPart ( DtVortexDynamicsPart * dynamicsPart,
const makVrf::DtArticulatedPartStateRepository * partRepository )
protectedvirtual

Initializes a sprocket position from an articulated part.

Returns
True when the sprocket position was successfully initialized

◆ initTrackWheelPositionFromArticulatedPart()

virtual void DtVortexMovementActuator::initTrackWheelPositionFromArticulatedPart ( DtVortexDynamicsPart * dynamicsPart,
const makVrf::DtArticulatedPartStateRepository * partRepository,
const char * trackName )
protectedvirtual

Initializes a track-wheel position from an articulated part.

◆ initTrackIdlerDistanceFromArticulatedPart()

virtual void DtVortexMovementActuator::initTrackIdlerDistanceFromArticulatedPart ( DtVortexDynamicsPart * dynamicsPart,
const makVrf::DtArticulatedPartStateRepository * partRepository,
const char * trackName )
protectedvirtual

Initializes a track idler's distance from its sprocket.

◆ setVortexWhileUntaskedCallback()

static void DtVortexMovementActuator::setVortexWhileUntaskedCallback ( DtSimMessage * msg,
void * usrData )
staticprotected

Callback for scripted set data request message.

Calls processUseHiFiCollisionsInStationaryCgfState() to process the message.

Parameters
msgThe message to process
usrDataUser data

◆ findPart()

DtVortexBasePart * DtVortexMovementActuator::findPart ( int partId) const
protected

Gets the Vortex part associated with an articulated part ID.

Parameters
partIdThe part ID of the Vortex part to look for
Returns
Pointer to the base part, or nullptr if not found

◆ isVortexMechanismValid()

virtual bool DtVortexMovementActuator::isVortexMechanismValid ( ) const
protectedvirtual

Checks if the Vortex mechanism is valid.

Valid means the following conditions are all true:

  • myMechanism.getExtension() != nullptr
  • myMechanism.getInterface() != nullptr
  • myMechanism.getObject() != nullptr
  • myMechanism.valid()
Returns
True if the mechanism is valid, false otherwise

◆ getLowestBoundingPointsOfMechanism()

virtual void DtVortexMovementActuator::getLowestBoundingPointsOfMechanism ( std::vector< DtVector > & outputPoints)
protectedvirtual

Gets the lowest bounding points of the current mechanism.

The values are returned in NWU (Vortex Coordinate System).

Parameters
outputPointsVector to store the lowest bounding points in current world space

◆ processSetVortexWhileUntasked()

virtual void DtVortexMovementActuator::processSetVortexWhileUntasked ( DtSimMessage * msg)
protectedvirtual

Processes a set data request to enable/disable high-fidelity physics.

Sets the value for useHiFiCollisionInStationaryCgfState in the process state repository from the incoming scripted set data request message.

Parameters
msgThe message to process

◆ createPSR()

virtual bool DtVortexMovementActuator::createPSR ( )
protectedvirtual

Creates a process state repository for this component.

Creates a DtVortexMovementPSR for holding state associated with this component, specifically the useHiFiCollisionInStationaryCgfState flag.

Returns
True on success, false otherwise

◆ isHighFidelityCGF()

virtual bool DtVortexMovementActuator::isHighFidelityCGF ( ) const
protectedvirtual

Checks whether Vortex While Untasked is enabled.

Returns the actuator's configured Vortex While Untasked state without inspecting the entity's current task state.

Returns
True when Vortex While Untasked is enabled and the process state is available, false otherwise

◆ isPlayerControlledAs()

virtual bool DtVortexMovementActuator::isPlayerControlledAs ( std::string role) const
protectedvirtual

Checks if the entity is player controlled in a specific role.

Note that there may be multiple roles associated with a vehicle, so responsibilities for controlling the vehicle may be split across multiple role players, and/or shared with CGF control.

Parameters
roleThe role to check (e.g., "Driver")
Returns
True if player controlled in the specified role, false otherwise

◆ realizeVortexState()

virtual void DtVortexMovementActuator::realizeVortexState ( )
protectedvirtual

Updates the Vortex state based on current conditions.

Adds or removes the Vortex mechanism from the Vortex scene and registers or unregisters this entity as a Vortex entity in the Collision Proxy Generator, as appropriate for the current Vortex Active state.

◆ isTerrainAvailable()

virtual bool DtVortexMovementActuator::isTerrainAvailable ( ) const
protectedvirtual

Checks if terrain is available below the vehicle.

Returns
True if terrain is available below the center of the vehicle, false otherwise

◆ detectTerrainFallthrough()

virtual void DtVortexMovementActuator::detectTerrainFallthrough ( )
protectedvirtual

Detects and logs terrain fall-through conditions.

Checks if the vehicle has fallen through the terrain when terrain data is not available. Logs diagnostic information to help identify terrain loading issues. Called when terrain is unavailable during Vortex simulation.

◆ setVortexMechanismLocation()

virtual void DtVortexMovementActuator::setVortexMechanismLocation ( const Vx::VxVector3 & nwuLocation,
double heading )
protectedvirtual

Sets the Vortex mechanism's location and orientation.

Sets the Vortex mechanism's transform using the location and heading and resets wheel parts to be attached to the mechanism.

Parameters
nwuLocationThe location in NWU coordinates
headingThe heading in radians

◆ getVortexLocation()

Vx::VxVector3 DtVortexMovementActuator::getVortexLocation ( const DtVector & inputCoords) const
protected

Converts local coordinates to Vortex coordinates.

Parameters
inputCoordsThe coordinates in local database coordinates
Returns
The corresponding coordinates in NWU (Vortex) coordinates

◆ sendVehicleDynamicsUpdate()

virtual void DtVortexMovementActuator::sendVehicleDynamicsUpdate ( bool enable)
protectedvirtual

Sends a vehicle dynamics update event.

Internal function that sends the vehicle dynamics update event to Vortex.

Parameters
enableTrue to enable dynamics, false to disable

◆ sendExtensionUpdate()

virtual void DtVortexMovementActuator::sendExtensionUpdate ( VxSim::VxExtension * extension,
bool enable )
protectedvirtual

Sends a Vortex extension update event.

Parameters
extensionThe extension to update
enableTrue to enable the extension, false to disable it

◆ connectTowingTargetObserver()

void DtVortexMovementActuator::connectTowingTargetObserver ( )
protected

Connects to tow-hook target updates from the driver interface.

◆ processTowingTargetChanged()

void DtVortexMovementActuator::processTowingTargetChanged ( const VxData::FieldBase & field)
protected

Processes tow-hook target field changes.

Parameters
fieldVortex field that changed

◆ updateTowingHookGroupState()

void DtVortexMovementActuator::updateTowingHookGroupState ( const DtUUID & currentTowingTargetUuid)
protected

Updates tow-hook group reset state based on the current hook target.

Parameters
currentTowingTargetUuidCurrent hook target UUID

◆ resetTowingHookGroup()

void DtVortexMovementActuator::resetTowingHookGroup ( )
protected

Resets the Vortex tow-hook group extension.

◆ sendTowingHookGroupUpdate()

void DtVortexMovementActuator::sendTowingHookGroupUpdate ( bool enable)
protected

Enables or disables the Vortex tow-hook group extension.

Used to mirror the vehicle-extension in/out-of-world activation path so towing behavior is inactive whenever this actuator is out of the Vortex world.

Parameters
enableTrue to enable the hook group, false to disable it

◆ findTowingHookGroupExtension()

VxSim::VxExtension * DtVortexMovementActuator::findTowingHookGroupExtension ( )
protected

Finds this mechanism's tow-hook group extension.

Returns
Hook-group extension, or nullptr when the mechanism has none

◆ checkTaskStatus()

virtual void DtVortexMovementActuator::checkTaskStatus ( bool vortexActive)
protectedvirtual

Cancels CGF tasks that conflict with Vortex control.

When Vortex is active and the entity is tasked, cancels each top-level task for which taskConflictsWithVortex() returns true, so a CGF controller does not compete with Vortex for vehicle or turret control. Other tasks continue to run. Clears the independently tasked state only when no top-level tasks remain.

Parameters
vortexActiveTrue when Vortex control is active; false leaves task state unchanged

◆ taskConflictsWithVortex()

virtual bool DtVortexMovementActuator::taskConflictsWithVortex ( const DtSimTaskMessageType & taskType) const
protectedvirtual

Determines whether a task type conflicts with Vortex control.

Reads the task categories from the scripted-task action categories and the entity's task execution rule groups. A task conflicts when it is in the Movement category, or when it is in the Weapon category and the Vortex mechanism has a turret interface.

Parameters
taskTypeThe task type to classify
Returns
True if Vortex control must cancel the task

◆ connectTowingTargetDeletedSignal()

virtual void DtVortexMovementActuator::connectTowingTargetDeletedSignal ( const DtUUID & targetUuid)
protectedvirtual

Connects to the current tow target deletion signal.

Parameters
targetUuidThe current tow target UUID

◆ processTowingTargetDeleted()

virtual void DtVortexMovementActuator::processTowingTargetDeleted ( )
protectedvirtual

Processes removal of the currently tracked tow target.

◆ clearTowingTargetTracking()

virtual void DtVortexMovementActuator::clearTowingTargetTracking ( )
protectedvirtual

Clears current tow target tracking.

◆ sendVehiclePartsUpdate()

virtual void DtVortexMovementActuator::sendVehiclePartsUpdate ( Vx::VxPart::EntityControlTypeEnum control)
protectedvirtual

Updates the control state of all vehicle parts.

Sets the control type of all parts to disable or enable collisions and simulation.

Parameters
controlThe control type (Static or Dynamic)

◆ addSetCallbacks()

virtual void DtVortexMovementActuator::addSetCallbacks ( )
protectedvirtual

Adds set callbacks for location and heading.

◆ removeSetCallbacks()

virtual void DtVortexMovementActuator::removeSetCallbacks ( )
protectedvirtual

Removes set callbacks for location and heading.

◆ setHeadingCallback()

static void DtVortexMovementActuator::setHeadingCallback ( DtReal heading,
void * usrData )
staticprotected

Callback for heading changes.

Parameters
headingThe new heading
usrDataUser data

◆ setLocationCallback()

static void DtVortexMovementActuator::setLocationCallback ( const DtVector & location,
void * usrData )
staticprotected

Callback for location changes.

Parameters
locationThe new location
usrDataUser data

◆ handleSetLocation()

virtual void DtVortexMovementActuator::handleSetLocation ( const DtVector & location)
protectedvirtual

Handles a location change request.

Parameters
locationThe new location

◆ handleSetHeading()

virtual void DtVortexMovementActuator::handleSetHeading ( DtReal heading)
protectedvirtual

Handles a heading change request.

Parameters
headingThe new heading

◆ resetWheelParts()

virtual void DtVortexMovementActuator::resetWheelParts ( )
protectedvirtual

Resets wheel parts to their default positions.

Resets all wheel parts to zero position on the network.

◆ manageWheelPartStateTransitions()

virtual void DtVortexMovementActuator::manageWheelPartStateTransitions ( bool inVortexWorld)
protectedvirtual

Manages wheel part state transitions when entering or exiting Vortex world.

Handles the logic for resetting or restoring wheel parts based on whether the vehicle is in the Vortex physics simulation. When exiting Vortex, resets wheel parts to prevent network updates that interfere with VRV automatic wheel control. When entering Vortex, restores the original wheel part collection.

Parameters
inVortexWorldTrue if the vehicle is currently in the Vortex physics world

◆ updateState()

virtual void DtVortexMovementActuator::updateState ( )
protectedvirtual

Updates state properties.

◆ restoreWheels()

virtual void DtVortexMovementActuator::restoreWheels ( )
protectedvirtual

Restores wheel articulated parts.

Restores wheels in the articulated part collection.

◆ engageParkingBrakeOnDisengage()

virtual void DtVortexMovementActuator::engageParkingBrakeOnDisengage ( bool isDriver)
protectedvirtual

Automatically engages parking brake when disengaging from driver role.

Automatically engages the parking brake when a player disengages from the driver role if the brake is not already engaged. Simulates a two-tick button press (down then up) to activate the brake.

Parameters
isDriverTrue if currently controlled as driver, false otherwise

◆ updateFuel()

virtual void DtVortexMovementActuator::updateFuel ( )
protectedvirtual

Updates fuel level.

◆ updateDestroyedState()

virtual void DtVortexMovementActuator::updateDestroyedState ( )
protectedvirtual

◆ fuelLeft()

virtual double DtVortexMovementActuator::fuelLeft ( ) const
protectedvirtual

Gets the current fuel level.

Returns
The amount of fuel left

◆ useFuel()

virtual void DtVortexMovementActuator::useFuel ( double fuelUsed)
protectedvirtual

Consumes fuel.

Parameters
fuelUsedThe amount of fuel to consume

◆ createPart()

DtVortexBasePart * DtVortexMovementActuator::createPart ( makVre::DtVortexSimArtPartDescriptor * desc)
protected

Creates a Vortex part from a descriptor.

Parameters
descThe part descriptor
Returns
Pointer to the created part

◆ createVortexPartsFromDescriptor()

virtual void DtVortexMovementActuator::createVortexPartsFromDescriptor ( )
protectedvirtual

Creates all Vortex parts defined in the descriptor.

◆ setThresholdsFromDescriptor()

virtual void DtVortexMovementActuator::setThresholdsFromDescriptor ( )
protectedvirtual

Sets precision thresholds based on the descriptor.

◆ updateGroundInteractionPoint()

virtual void DtVortexMovementActuator::updateGroundInteractionPoint ( const DtDcm & localOrientation,
const DtVector & localPosition,
const DtAttachedTerrain & terrain,
bool & dataAvailable ) const
protectedvirtual

Updates the ground interaction point under the vehicle.

This is used by the DtGroundVehicleTrailingEffectController to determine the soil type under the vehicle.

Parameters
localOrientationOrientation relative to terrain or parent entity
localPositionPosition relative to terrain or parent entity
terrainThe attached terrain (database or parent entity)
dataAvailableSet to true if terrain data is available

◆ createVortexConfigurationsFromDescriptor()

virtual void DtVortexMovementActuator::createVortexConfigurationsFromDescriptor ( )
protectedvirtual

Creates Vortex configurations from the descriptor.

Creates a Vortex Configuration from the configuration section of the descriptor.

◆ createVortexInterfacesFromDescriptor()

virtual void DtVortexMovementActuator::createVortexInterfacesFromDescriptor ( )
protectedvirtual

Creates Vortex interfaces defined in the descriptor.

Also creates input/output ports and port groups.

◆ connectInterfacesToPorts()

virtual void DtVortexMovementActuator::connectInterfacesToPorts ( )
protectedvirtual

Connects interfaces to ports.

Connects all the values defined in VHL interfaces to Vortex.

◆ queueMechanismLoad()

virtual void DtVortexMovementActuator::queueMechanismLoad ( )
protectedvirtual

Queues the mechanism for loading.

Queues the mechanism to load in a thread-safe manner.

◆ updatePorts()

virtual void DtVortexMovementActuator::updatePorts ( )
protectedvirtual

Updates ports with data from Vortex interfaces.

◆ populateArtPartMapProperty()

virtual void DtVortexMovementActuator::populateArtPartMapProperty ( )
protectedvirtual

◆ findPartFromPathRecursive()

VxSim::VxSmartInterface< VxDynamics::Part > DtVortexMovementActuator::findPartFromPathRecursive ( const VxSim::VxWeakInterface< VxSim::IObject > & objectToLookThroughWeak,
const std::vector< std::string > & pathToLookForPart,
int index )
protected

Recursively finds a part from a path.

Parameters
objectToLookThroughWeakObject to search for the part
pathToLookForPartPath defined in the system definition file
indexCurrent index in the path
Returns
Smart pointer to the part, or null if not found

◆ checkDistanceFromCoordinateOriginOverLimit()

virtual bool DtVortexMovementActuator::checkDistanceFromCoordinateOriginOverLimit ( const DtVector & position,
double distance )
protectedvirtual

Checks if the incoming position is further than distance.

Parameters
positionincoming position. Pass position in geocentric (DIS)
distancedistance
Returns
True if enuPosition is further than distance

Friends And Related Symbol Documentation

◆ DtVxSimulationFileManagerFacadeListener

Member Data Documentation

◆ myDescriptor

const DtVortexMovementActuatorDescriptor* DtVortexMovementActuator::myDescriptor
protected

◆ myGroundVehicleState

DtGroundVehicleStateRepository* DtVortexMovementActuator::myGroundVehicleState
protected

◆ myVehicleRepository

DtVortexStateRepository* DtVortexMovementActuator::myVehicleRepository
protected

◆ myPlatformLocalObjectFacade

DtPlatformLocalObjectFacade DtVortexMovementActuator::myPlatformLocalObjectFacade
protected

◆ myCollectionWithWheels

DtArticulatedPartCollection DtVortexMovementActuator::myCollectionWithWheels
protected

◆ myMechanism

VxSim::VxSmartInterface<VxDynamics::Mechanism> DtVortexMovementActuator::myMechanism
protected

◆ myMechAddon

VxSim::VxSmartInterface<DtMechAddon> DtVortexMovementActuator::myMechAddon
protected

◆ myVehicleExt

VxSim::VxExtension* DtVortexMovementActuator::myVehicleExt
protected

◆ myParts

std::vector<DtVortexBasePart*> DtVortexMovementActuator::myParts
protected

◆ myInterfaces

VortexInterfaceMap DtVortexMovementActuator::myInterfaces
protected

◆ mySimulationFileManagerFacade

std::shared_ptr<VxSim::VxSimulationFileManagerFacade> DtVortexMovementActuator::mySimulationFileManagerFacade
protected

◆ myListener

Vx::VxSmartPtr<DtVxSimulationFileManagerFacadeListener> DtVortexMovementActuator::myListener
protected

◆ myConfiguration

std::shared_ptr<makVre::DtVortexConfiguration> DtVortexMovementActuator::myConfiguration
protected

◆ myUpdateRepositoryOutputPortGroup

DtUpdateRepositoryOutputPortGroup* DtVortexMovementActuator::myUpdateRepositoryOutputPortGroup
protected

◆ myAimingModePort

DtStringOutputPort* DtVortexMovementActuator::myAimingModePort
protected

◆ myWasInVortexWorldLastTick

bool DtVortexMovementActuator::myWasInVortexWorldLastTick
protected

◆ myWasBeingTowedLastTick

bool DtVortexMovementActuator::myWasBeingTowedLastTick
protected

◆ myTowingTargetObserverConnection

VxData::DelegateConnection DtVortexMovementActuator::myTowingTargetObserverConnection
protected

◆ myTowingTargetDeletedConnection

boost::signals2::scoped_connection DtVortexMovementActuator::myTowingTargetDeletedConnection
protected

◆ myTowingTargetUuid

DtUUID DtVortexMovementActuator::myTowingTargetUuid
protected

◆ myWasDriverLastTick

bool DtVortexMovementActuator::myWasDriverLastTick
protected

◆ myAutoParkButtonDown

bool DtVortexMovementActuator::myAutoParkButtonDown
protected

◆ myNeedsWheelPartRemoval

bool DtVortexMovementActuator::myNeedsWheelPartRemoval
protected

◆ myHaveVortexTurretInterface

bool DtVortexMovementActuator::myHaveVortexTurretInterface
protected

◆ myIsVortexDynamicsActive

bool DtVortexMovementActuator::myIsVortexDynamicsActive
protected

◆ myPendingDynamicsDisableAfterStartupStep

bool DtVortexMovementActuator::myPendingDynamicsDisableAfterStartupStep
protected

◆ myPendingVortexPhysicsState

bool DtVortexMovementActuator::myPendingVortexPhysicsState
protected

◆ myHasVortexPhysicsRequest

bool DtVortexMovementActuator::myHasVortexPhysicsRequest
protected

◆ mySpawnedFromSpawnPoint

bool DtVortexMovementActuator::mySpawnedFromSpawnPoint
protected

◆ myMechanismLoadStatus

MechanismLoadStatus DtVortexMovementActuator::myMechanismLoadStatus
protected

◆ myLoadObjectRequestId

VxSim::VxUuid DtVortexMovementActuator::myLoadObjectRequestId
protected

◆ myVortexPhysicalWorld

makVre::DtVortexPhysicalWorld* DtVortexMovementActuator::myVortexPhysicalWorld
protected

◆ myPositionThreshold

double DtVortexMovementActuator::myPositionThreshold
protected

◆ myOrientationThreshold

double DtVortexMovementActuator::myOrientationThreshold
protected

◆ myVelocityThreshold

double DtVortexMovementActuator::myVelocityThreshold
protected

◆ myAngularVelocityThreshold

double DtVortexMovementActuator::myAngularVelocityThreshold
protected

◆ myAccelerationThreshold

double DtVortexMovementActuator::myAccelerationThreshold
protected

◆ myPartPositionThreshold

double DtVortexMovementActuator::myPartPositionThreshold
protected

◆ myPartOrientationThreshold

double DtVortexMovementActuator::myPartOrientationThreshold
protected

◆ myPartLinearVelocityThreshold

double DtVortexMovementActuator::myPartLinearVelocityThreshold
protected

◆ myPartAngularVelocityThreshold

double DtVortexMovementActuator::myPartAngularVelocityThreshold
protected

◆ myDropTimer

double DtVortexMovementActuator::myDropTimer
protected

◆ myVortexPhysicsDisableDelaySeconds

double DtVortexMovementActuator::myVortexPhysicsDisableDelaySeconds
protected

◆ myVortexPhysicsDisableDelayElapsedSeconds

double DtVortexMovementActuator::myVortexPhysicsDisableDelayElapsedSeconds
protected

◆ myAllowVortexWhileDestroyed

bool DtVortexMovementActuator::myAllowVortexWhileDestroyed
protected

Controls whether Vortex physics simulation continues for destroyed entities.

When true, allows Vortex physics to remain active even when the entity is destroyed or mobility-killed. When false (default), Vortex control is disabled for destroyed or mobility-killed entities.

This flag is initialized from the descriptor's allowVortexWhileDestroyed setting during the actuator initialization phase.

Note
Default value is false.
See also
DtVortexMovementActuatorDescriptor::allowVortexWhileDestroyed()

◆ myDetectTerrainFallthrough

bool DtVortexMovementActuator::myDetectTerrainFallthrough
protected

Controls whether terrain fallthrough detection is enabled.

When true, the actuator monitors for terrain availability issues during Vortex simulation and logs diagnostic information when fallthrough conditions are detected. When false (default), fallthrough detection is disabled.

This flag is initialized from the descriptor's detectTerrainFallthrough setting during the actuator initialization phase.

Note
Default value is false.
See also
DtVortexMovementActuatorDescriptor::detectTerrainFallthrough()

◆ myPreviousPosition

DtVector DtVortexMovementActuator::myPreviousPosition
protected

◆ myPreviousOrientation

DtTaitBryan DtVortexMovementActuator::myPreviousOrientation
protected

◆ myProcessState

makVre::DtVortexMovementPSR* DtVortexMovementActuator::myProcessState
protected

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