PxVehiclePhysxActorSleepCheck
Defined in include/vehicle2/physxActor/PxVehiclePhysXActorFunctions.h
-
bool PxVehiclePhysxActorSleepCheck(const PxVehicleAxleDescription &axleDescription, const PxRigidBody &physxActor, const PxVehicleEngineParams *engineParams, PxVehicleRigidBodyState &rigidBodyState, PxVehiclePhysXConstraints &physxConstraints, PxVehicleArrayData<PxVehicleWheelRigidBody1dState> &wheelRigidBody1dStates, PxVehicleEngineState *engineState)
Check if the physx actor is sleeping and clear certain vehicle states if it is.
- Parameters
axleDescription – [in] identifies the wheels on each axle.
physxActor – [in] is the PxRigidBody instance associated with the vehicle.
engineParams – [in] The engine parameters. Can be set to NULL if the vehicle does not have an engine. Must be specified, if engineState is specified.
rigidBodyState – [inout] is the state of the rigid body used by the Vehicle SDK.
physxConstraints – [inout] The state of the suspension limit and low speed tire constraints. If the vehicle actor is sleeping and constraints are active, they will be deactivated and marked as dirty.
wheelRigidBody1dStates – [inout] describes the angular speed of the wheels.
engineState – [out] The engine state. Can be set to NULL if the vehicle does not have an engine. If specified, then engineParams has to be specifed too. The engine rotation speed will get set to the idle rotation speed if the actor is sleeping.
- Returns
True if the actor was sleeping, else false.