RavEngine
Loading...
Searching...
No Matches
physx::vehicle2::PxVehicleRigidBodyComponent Class Referenceabstract

Forward integrate the momentum and pose of the vehicle's rigid body after applying forces and torques from the suspension, tires and anti-roll bars. More...

#include <PxVehicleRigidBodyComponents.h>

Inheritance diagram for physx::vehicle2::PxVehicleRigidBodyComponent:
[legend]
Collaboration diagram for physx::vehicle2::PxVehicleRigidBodyComponent:
[legend]

Public Member Functions

virtual void getDataForRigidBodyComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehicleRigidBodyParams *&rigidBodyParams, PxVehicleArrayData< const PxVehicleSuspensionForce > &suspensionForces, PxVehicleArrayData< const PxVehicleTireForce > &tireForces, const PxVehicleAntiRollTorque *&antiRollTorque, PxVehicleRigidBodyState *&rigidBodyState)=0
 Retrieve pointers to the parameter and state data required to update the dynamic state of a rigid body.
 
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 

Detailed Description

Forward integrate the momentum and pose of the vehicle's rigid body after applying forces and torques from the suspension, tires and anti-roll bars.

Member Function Documentation

◆ getDataForRigidBodyComponent()

virtual void physx::vehicle2::PxVehicleRigidBodyComponent::getDataForRigidBodyComponent ( const PxVehicleAxleDescription *&  axleDescription,
const PxVehicleRigidBodyParams *&  rigidBodyParams,
PxVehicleArrayData< const PxVehicleSuspensionForce > &  suspensionForces,
PxVehicleArrayData< const PxVehicleTireForce > &  tireForces,
const PxVehicleAntiRollTorque *&  antiRollTorque,
PxVehicleRigidBodyState *&  rigidBodyState 
)
pure virtual

Retrieve pointers to the parameter and state data required to update the dynamic state of a rigid body.

Parameters
[out]axleDescriptionmust be returned as a non-null pointer to a single PxVehicleAxleDescription instance that describes the wheels and axles of the vehicle.
[out]rigidBodyParamsmust be returned as a non-null pointer to a single PxVehicleRigidBodyParams instance that describes the mass and moment of inertia of the rigid body.
[out]suspensionForcesmust be returned as a non-null pointer to an array of suspension forces and torques in the world frame. The suspension forces and torques will be applied to the rigid body to update rigidBodyState.
[out]tireForcesmust be returned as a non-null pointer to an array of tire forces and torques in the world frame. The tire forces and torques will be applied to the rigid body to update rigidBodyState.
[out]antiRollTorquemay be returned an optionally non-null pointer to a single PxVehicleAntiRollTorque instance that contains the accumulated anti-roll torque to apply to the rigid body.
[out]rigidBodyStateimust be returned as a non-null pointer to a single PxVehicleRigidBodyState instance that is to be forward integrated.
Note
The suspensionForces array must contain an entry for each wheel listed as an active wheel in axleDescription.
The tireForces array must contain an entry for each wheel listed as an active wheel in axleDescription.
If antiRollTorque is returned as a null pointer then zero anti-roll torque will be applied to the rigid body.

Implemented in snippetvehicle2::BaseVehicle.

◆ update()

virtual bool physx::vehicle2::PxVehicleRigidBodyComponent::update ( const PxReal  dt,
const PxVehicleSimulationContext &  context 
)
inlinevirtual

Update function for a vehicle component.

Parameters
[in]dtThe timestep size to use for the update step.
[in]contextVehicle simulation context holding global data or data that usually applies to a large group of vehicles.
Returns
True if subsequent components in a sequence should get updated, false if the sequence should be aborted.
See also
PxVehicleComponentSequence

Implements physx::vehicle2::PxVehicleComponent.


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