PxVehiclePhysXConstraintStatesUpdate
Defined in include/vehicle2/physxConstraints/PxVehiclePhysXConstraintFunctions.h
-
void PxVehiclePhysXConstraintStatesUpdate(const PxVehicleSuspensionParams &suspensionParams, const PxVehiclePhysXSuspensionLimitConstraintParams &suspensionLimitParams, const PxVehicleSuspensionState &suspensionState, const PxVehicleSuspensionComplianceState &suspensionComplianceState, const PxVec3 &groundPlaneNormal, const PxReal tireStickyDampingLong, const PxReal tireStickyDampingLat, const PxVehicleTireDirectionState &tireDirectionState, const PxVehicleTireStickyState &tireStickyState, const PxVehicleRigidBodyState &rigidBodyState, PxVehiclePhysXConstraintState &constraintState)
Read constraint data from the vehicle’s internal state for a single wheel and write it to a structure that will be read by the associated PxScene and used to impose the constraints during the next PxScene::simulate() step.
Note
Constraints include suspension constraints to account for suspension travel limit and sticky tire constraints that bring the vehicle to rest at low longitudinal and lateral speed.
- Parameters
suspensionParams – [in] describes the suspension frame.
suspensionLimitParams – [in] describes the restitution value applied to any constraint triggered by the suspension travel limit.
suspensionState – [in] describes the excess suspension compression beyond the suspension travel limit that will be resolved with a constraint.
suspensionComplianceState – [in] describes the effect of suspension compliance on the effective application point of the suspension force.
groundPlaneNormal – [in] The normal direction of the ground plane the wheel is driving on. A normalized vector is expected.
tireStickyDampingLong – [in] The damping coefficient to use in the constraint to approach a zero target velocity along the longitudinal tire axis.
tireStickyDampingLat – [in] Same concept as tireStickyDampingLong but for the lateral tire axis.
tireDirectionState – [in] describes the longitudinal and lateral directions of the tire in the world frame.
tireStickyState – [in] describes the low speed state of the tire in the longitudinal and lateral directions.
rigidBodyState – [in] describes the pose of the rigid body.
constraintState – [out] is the data structure that will be read by the associated PxScene in the next call to PxScene::simulate().