#include <PxVehicleSuspensionComponents.h>
|
| virtual void | getDataForLegacySuspensionComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehicleSuspensionStateCalculationParams *&suspensionStateCalculationParams, PxVehicleArrayData< const PxReal > &steerResponseStates, const PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< const PxVehicleWheelParams > &wheelParams, PxVehicleArrayData< const PxVehicleSuspensionParams > &suspensionParams, PxVehicleArrayData< const PxVehicleSuspensionComplianceParams > &suspensionComplianceParams, PxVehicleArrayData< const PxVehicleSuspensionForceLegacyParams > &suspensionForceParams, PxVehicleSizedArrayData< const PxVehicleAntiRollForceParams > &antiRollForceParams, PxVehicleArrayData< const PxVehicleRoadGeometryState > &wheelRoadGeomStates, PxVehicleArrayData< PxVehicleSuspensionState > &suspensionStates, PxVehicleArrayData< PxVehicleSuspensionComplianceState > &suspensionComplianceStates, PxVehicleArrayData< PxVehicleSuspensionForce > &suspensionForces, PxVehicleAntiRollTorque *&antiRollTorque)=0 |
| | Retrieve pointers to the parameter and state data required to compute the suspension state and the forces/torques that arise from the suspension state.
|
| |
| virtual bool | update (const PxReal dt, const PxVehicleSimulationContext &context) |
| | Update the suspension state and suspension compliance state and use those updated states to compute suspension and anti-roll forces/torques to apply to the vehicle's rigid body.
|
| |
◆ getDataForLegacySuspensionComponent()
| virtual void physx::vehicle2::PxVehicleLegacySuspensionComponent::getDataForLegacySuspensionComponent |
( |
const PxVehicleAxleDescription *& |
axleDescription, |
|
|
const PxVehicleSuspensionStateCalculationParams *& |
suspensionStateCalculationParams, |
|
|
PxVehicleArrayData< const PxReal > & |
steerResponseStates, |
|
|
const PxVehicleRigidBodyState *& |
rigidBodyState, |
|
|
PxVehicleArrayData< const PxVehicleWheelParams > & |
wheelParams, |
|
|
PxVehicleArrayData< const PxVehicleSuspensionParams > & |
suspensionParams, |
|
|
PxVehicleArrayData< const PxVehicleSuspensionComplianceParams > & |
suspensionComplianceParams, |
|
|
PxVehicleArrayData< const PxVehicleSuspensionForceLegacyParams > & |
suspensionForceParams, |
|
|
PxVehicleSizedArrayData< const PxVehicleAntiRollForceParams > & |
antiRollForceParams, |
|
|
PxVehicleArrayData< const PxVehicleRoadGeometryState > & |
wheelRoadGeomStates, |
|
|
PxVehicleArrayData< PxVehicleSuspensionState > & |
suspensionStates, |
|
|
PxVehicleArrayData< PxVehicleSuspensionComplianceState > & |
suspensionComplianceStates, |
|
|
PxVehicleArrayData< PxVehicleSuspensionForce > & |
suspensionForces, |
|
|
PxVehicleAntiRollTorque *& |
antiRollTorque |
|
) |
| |
|
pure virtual |
Retrieve pointers to the parameter and state data required to compute the suspension state and the forces/torques that arise from the suspension state.
- Parameters
-
| [out] | axleDescription | must be returned as a non-null pointer to a single PxVehicleAxleDescription instance that describes the wheels and axles of the vehicle. |
| [out] | suspensionStateCalculationParams | must be returned as a non-null pointer to a single PxVehicleSuspensionStateCalculationParams instance that describes the jounce computation type etc. |
| [out] | steerResponseStates | must be returned as a non-null pointer to a single PxVehicleSteerCommandResponseStates instance that describes the steer state of the wheels. |
| [out] | rigidBodyState | must be returned as a non-null pointer to a single PxVehicleRigidBodyState instance that describes the pose and momentum of the vehicle's rigid body. |
| [out] | wheelParams | must be set to a non-null pointer to an array of PxVehicleWheelParams containing per-wheel parameters for each wheel referenced by axleDescription. |
| [out] | suspensionParams | must be set to a non-null pointer to an array of PxVehicleSuspensionParams containing per-wheel parameters for each wheel referenced by axleDescription. |
| [out] | suspensionComplianceParams | must be set to a non-null pointer to an array of PxVehicleSuspensionComplianceParams containing per-wheel parameters for each wheel referenced by axleDescription. |
| [out] | suspensionForceParams | must be set to a non-null pointer to an array of PxVehicleSuspensionForceLegacyParams containing per-wheel parameters for each wheel referenced by axleDescription. |
| [out] | antiRollForceParams | is optionally returned as a non-null pointer to an array of PxVehicleAntiRollForceParams with each element in the array describing a unique anti-roll bar connecting a pair of wheels. |
| [out] | wheelRoadGeomStates | must be set to non-null pointer to an array of PxVehicleRoadGeometryState containing per-wheel road geometry for each wheel referenced by axleDescription. |
| [out] | suspensionStates | must be set to a non-null pointer to an array of PxVehicleSuspensionState containing per-wheel suspension state for each wheel referenced by axleDescription. |
| [out] | suspensionComplianceStates | must be set to a non-null pointer to an array of PxVehicleSuspensionComplianceState containing per-wheel suspension compliance state for each wheel referenced by axleDescription. |
| [out] | suspensionForces | must be set to a non-null pointer to an array of PxVehicleSuspensionForce containing per-wheel suspension forces for each wheel referenced by axleDescription. |
| [out] | antiRollTorque | is optionally returned as a non-null pointer to a single PxVehicleAntiRollTorque instance that will store the accumulated anti-roll torque to be applied to the vheicle's rigid body. |
- Note
- antiRollForceParams and antiRollTorque should be returned either both non-NULL or both NULL.
◆ update()
Update the suspension state and suspension compliance state and use those updated states to compute suspension and anti-roll forces/torques to apply to the vehicle's rigid body.
- Parameters
-
| [in] | dt | is the simulation time that has passed since the last call to PxVehicleSuspensionComponent::update() |
| [in] | context | describes a variety of global simulation constants such as frame and scale of the simulation and the gravitational acceleration of the simulated environment. |
- Note
- The suspension and anti-roll forces are computed in the world frame.
-
PxVehicleLegacySuspensionComponent::update() implements legacy suspension behaviour.
Implements physx::vehicle2::PxVehicleComponent.
The documentation for this class was generated from the following file: