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

#include <PxVehicleSuspensionComponents.h>

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

Public Member Functions

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.
 

Detailed Description

Member Function Documentation

◆ 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]axleDescriptionmust be returned as a non-null pointer to a single PxVehicleAxleDescription instance that describes the wheels and axles of the vehicle.
[out]suspensionStateCalculationParamsmust be returned as a non-null pointer to a single PxVehicleSuspensionStateCalculationParams instance that describes the jounce computation type etc.
[out]steerResponseStatesmust be returned as a non-null pointer to a single PxVehicleSteerCommandResponseStates instance that describes the steer state of the wheels.
[out]rigidBodyStatemust 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]wheelParamsmust be set to a non-null pointer to an array of PxVehicleWheelParams containing per-wheel parameters for each wheel referenced by axleDescription.
[out]suspensionParamsmust be set to a non-null pointer to an array of PxVehicleSuspensionParams containing per-wheel parameters for each wheel referenced by axleDescription.
[out]suspensionComplianceParamsmust be set to a non-null pointer to an array of PxVehicleSuspensionComplianceParams containing per-wheel parameters for each wheel referenced by axleDescription.
[out]suspensionForceParamsmust be set to a non-null pointer to an array of PxVehicleSuspensionForceLegacyParams containing per-wheel parameters for each wheel referenced by axleDescription.
[out]antiRollForceParamsis 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]wheelRoadGeomStatesmust be set to non-null pointer to an array of PxVehicleRoadGeometryState containing per-wheel road geometry for each wheel referenced by axleDescription.
[out]suspensionStatesmust be set to a non-null pointer to an array of PxVehicleSuspensionState containing per-wheel suspension state for each wheel referenced by axleDescription.
[out]suspensionComplianceStatesmust 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]suspensionForcesmust be set to a non-null pointer to an array of PxVehicleSuspensionForce containing per-wheel suspension forces for each wheel referenced by axleDescription.
[out]antiRollTorqueis 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()

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

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]dtis the simulation time that has passed since the last call to PxVehicleSuspensionComponent::update()
[in]contextdescribes 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: