PxVehicleRigidBodyComponent

Defined in include/vehicle2/rigidBody/PxVehicleRigidBodyComponents.h

class PxVehicleRigidBodyComponent : public PxVehicleComponent

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.

Public Functions

inline PxVehicleRigidBodyComponent()
inline virtual ~PxVehicleRigidBodyComponent()
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.

Note

The suspensionForces array must contain an entry for each wheel listed as an active wheel in axleDescription.

Note

The tireForces array must contain an entry for each wheel listed as an active wheel in axleDescription.

Note

If antiRollTorque is returned as a null pointer then zero anti-roll torque will be applied to the rigid body.

Parameters
  • axleDescription[out] must be returned as a non-null pointer to a single PxVehicleAxleDescription instance that describes the wheels and axles of the vehicle.

  • rigidBodyParams[out] must be returned as a non-null pointer to a single PxVehicleRigidBodyParams instance that describes the mass and moment of inertia of the rigid body.

  • suspensionForces[out] must 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.

  • tireForces[out] must 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.

  • antiRollTorque[out] may 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.

  • rigidBodyState[out] imust be returned as a non-null pointer to a single PxVehicleRigidBodyState instance that is to be forward integrated.

inline virtual bool update(const PxReal dt, const PxVehicleSimulationContext &context)

Update function for a vehicle component.

See also

PxVehicleComponentSequence

Parameters
  • dt[in] The timestep size to use for the update step.

  • context[in] Vehicle 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.