29#ifndef PX_VEHICLE_UPDATE_H
30#define PX_VEHICLE_UPDATE_H
32#include "vehicle/PxVehicleSDK.h"
33#include "vehicle/PxVehicleTireFriction.h"
34#include "foundation/PxSimpleTypes.h"
35#include "foundation/PxMemory.h"
36#include "foundation/PxTransform.h"
37#include "PxQueryFiltering.h"
44 class PxContactModifyPair;
45 class PxVehicleWheels;
46 class PxVehicleDrivableSurfaceToTireFrictionPairs;
47 class PxVehicleTelemetryData;
48 class PxBatchQueryExt;
61 tireSurfaceType = PxU32(PxVehicleDrivableSurfaceType::eSURFACE_TYPE_UNKNOWN);
251 hitActorForce(
PxVec3(0,0,0)),
252 hitActorForcePosition(
PxVec3(0,0,0))
261 PxVec3 hitActorForcePosition;
276 : concurrentWheelUpdates(NULL),
277 nbConcurrentWheelUpdates(0),
278 linearMomentumChange(
PxVec3(0,0,0)),
279 angularMomentumChange(
PxVec3(0,0,0)),
301 PxVec3 linearMomentumChange;
302 PxVec3 angularMomentumChange;
345 const bool* vehiclesToRaycast = NULL,
407 const PxU16 nbHitsPerQuery,
408 const bool* vehiclesToSweep = NULL,
409 const PxF32 sweepWidthScale = 1.0f,
const PxF32 sweepRadiusScale = 1.0f,
const PxF32 sweepInflation = 0.0f,
449 const PxF32 wheelTangentVelocityMultiplier,
const PxReal maxImpulse,
501 const PxReal timestep,
const PxVec3& gravity,
546#if PX_DEBUG_VEHICLE_ON
585 PX_DEPRECATED void PxVehicleUpdateSingleVehicleAndStoreTelemetryData
586 (
const PxReal timestep,
const PxVec3& gravity,
589 PxVehicleTelemetryData& telemetryData,
PxActor is the base class for the main simulation objects in the physics SDK.
Definition PxActor.h:201
Definition PxSceneQueryExt.h:337
Material class to represent a set of surface properties.
Definition PxMaterial.h:149
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
Definition PxRigidDynamic.h:82
Abstract class for collision shapes.
Definition PxShape.h:146
3 Element vector class.
Definition PxVec3.h:50
Common parameters and settings used for the vehicle simulation.
Definition PxVehicleSDK.h:244
Friction for each combination of driving surface type and tire type.
Definition PxVehicleTireFriction.h:62
Definition PxVehicleUpdate.cpp:4519
Data structure with instanced dynamics data and configuration data of a vehicle with just wheels.
Definition PxVehicleWheels.h:827
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_DEPRECATED PxU32 PxVehicleModifyWheelContacts(const PxVehicleWheels &vehicle, const PxU32 wheelId, const PxF32 wheelTangentVelocityMultiplier, const PxReal maxImpulse, PxContactModifyPair &contactModifyPair, const PxVehicleContext &context=PxVehicleGetDefaultContext())
A function called from PxContactModifyCallback::onContactModify. The function determines if rigid bod...
Definition PxVehicleUpdate.cpp:404
PX_FORCE_INLINE void * PxMemZero(void *dest, PxU32 count)
Sets the bytes of the provided buffer to zero.
Definition PxMemory.h:53
PX_DEPRECATED void PxVehicleSuspensionSweeps(PxBatchQueryExt *batchQuery, const PxU32 nbVehicles, PxVehicleWheels **vehicles, const PxU16 nbHitsPerQuery, const bool *vehiclesToSweep=NULL, const PxF32 sweepWidthScale=1.0f, const PxF32 sweepRadiusScale=1.0f, const PxF32 sweepInflation=0.0f, const PxQueryFlags queryFlags=PxQueryFlag::eSTATIC|PxQueryFlag::eDYNAMIC|PxQueryFlag::ePREFILTER, const PxVehicleContext &context=PxVehicleGetDefaultContext())
Perform sweeps for all suspension lines for all vehicles.
Definition PxVehicleUpdate.cpp:7497
PX_DEPRECATED void PxVehiclePostUpdates(const PxVehicleConcurrentUpdateData *vehicleConcurrentUpdates, const PxU32 nbVehicles, PxVehicleWheels **vehicles, const PxVehicleContext &context=PxVehicleGetDefaultContext())
Apply actor changes that were computed in concurrent calls to PxVehicleUpdates or PxVehicleUpdateSing...
Definition PxVehicleUpdate.cpp:7097
PX_DEPRECATED void PxVehicleSuspensionRaycasts(PxBatchQueryExt *batchQuery, const PxU32 nbVehicles, PxVehicleWheels **vehicles, const bool *vehiclesToRaycast=NULL, const PxQueryFlags queryFlags=PxQueryFlag::eSTATIC|PxQueryFlag::eDYNAMIC|PxQueryFlag::ePREFILTER)
Perform raycasts for all suspension lines for all vehicles.
Definition PxVehicleUpdate.cpp:7260
PX_DEPRECATED const PxVehicleContext & PxVehicleGetDefaultContext()
Get the default vehicle context.
Definition PxVehicleUpdate.cpp:120
PX_DEPRECATED void PxVehicleShiftOrigin(const PxVec3 &shift, const PxU32 nbVehicles, PxVehicleWheels **vehicles)
Shift the origin of vehicles by the specified vector.
Definition PxVehicleUpdate.cpp:7105
PX_DEPRECATED void PxVehicleUpdates(const PxReal timestep, const PxVec3 &gravity, const PxVehicleDrivableSurfaceToTireFrictionPairs &vehicleDrivableSurfaceToTireFrictionPairs, const PxU32 nbVehicles, PxVehicleWheels **vehicles, PxVehicleWheelQueryResult *vehicleWheelQueryResults, PxVehicleConcurrentUpdateData *vehicleConcurrentUpdates=NULL, const PxVehicleContext &context=PxVehicleGetDefaultContext())
Update an array of vehicles by either applying an acceleration to the rigid body actor associated wit...
Definition PxVehicleUpdate.cpp:7084
@ eSTATIC
Traverse static shapes.
Definition PxQueryFiltering.h:58
@ ePREFILTER
Run the pre-intersection-test filter (see PxQueryFilterCallback::preFilter())
Definition PxQueryFiltering.h:62
@ eDYNAMIC
Traverse dynamic shapes.
Definition PxQueryFiltering.h:60
Structure containing data that is computed for a vehicle and its wheels during concurrent calls to Px...
Definition PxVehicleUpdate.h:272
PxVehicleWheelConcurrentUpdateData * concurrentWheelUpdates
Pointer to an PxVehicleWheelConcurrentUpdate buffer of length nbConcurrentWheelUpdates The concurrent...
Definition PxVehicleUpdate.h:291
PxU32 nbConcurrentWheelUpdates
The length of the concurrentWheelUpdates buffer. This value corresponds to the number of wheels in th...
Definition PxVehicleUpdate.h:297
Structure containing data that is computed for a wheel during concurrent calls to PxVehicleUpdates or...
Definition PxVehicleUpdate.h:245
Definition PxVehicleUpdate.h:220
PxWheelQueryResult * wheelQueryResults
Pointer to an PxWheelQueryResult buffer of length nbWheelQueryResults The wheelQueryResults buffer mu...
Definition PxVehicleUpdate.h:229
PxU32 nbWheelQueryResults
The length of the wheelQueryResults buffer. This value corresponds to the number of wheels in the ass...
Definition PxVehicleUpdate.h:235
Structure containing data describing the non-persistent state of each suspension/wheel/tire unit....
Definition PxVehicleUpdate.h:56
PxReal suspLineLength
Lengths of suspension line raycast/sweep used in raycast/sweep completed immediately before PxVehicle...
Definition PxVehicleUpdate.h:84
PxVec3 tireContactPoint
Point on the drivable surface hit by the most recent suspension raycast or sweep.
Definition PxVehicleUpdate.h:133
PxVec3 suspLineStart
Start point of suspension line raycast/sweep used in the raycast/sweep completed immediately before P...
Definition PxVehicleUpdate.h:70
PxReal longitudinalSlip
Longitudinal slip of the tire.
Definition PxVehicleUpdate.h:195
PxReal steerAngle
Steer angle of the wheel about the "up" vector accounting for input steer and toe and,...
Definition PxVehicleUpdate.h:211
PxU32 tireSurfaceType
Surface type integer that corresponds to the mapping between tireSurfaceMaterial and integer as descr...
Definition PxVehicleUpdate.h:126
PxVec3 tireContactNormal
Normal on the drivable surface at the hit point of the most recent suspension raycast or sweep.
Definition PxVehicleUpdate.h:140
PxReal lateralSlip
Lateral slip of the tire.
Definition PxVehicleUpdate.h:205
PxTransform localPose
Local pose of the wheel.
Definition PxVehicleUpdate.h:216
const PxMaterial * tireSurfaceMaterial
PxMaterial instance of the driving surface under the corresponding vehicle wheel.
Definition PxVehicleUpdate.h:115
PxVec3 tireLateralDir
Lateral direction of the wheel/tire accounting for steer/toe/camber angle projected on to the contact...
Definition PxVehicleUpdate.h:185
PxShape * tireContactShape
PxShape instance of the driving surface under the corresponding vehicle wheel.
Definition PxVehicleUpdate.h:108
PxVec3 tireLongitudinalDir
Forward direction of the wheel/tire accounting for steer/toe/camber angle projected on to the contact...
Definition PxVehicleUpdate.h:177
bool isInAir
If suspension travel limits forbid the wheel from touching the drivable surface then isInAir is true.
Definition PxVehicleUpdate.h:94
PxReal tireFriction
Friction experienced by the tire for the combination of tire type and surface type after accounting f...
Definition PxVehicleUpdate.h:150
PxActor * tireContactActor
PxActor instance of the driving surface under the corresponding vehicle wheel.
Definition PxVehicleUpdate.h:101
PxReal suspSpringForce
Magnitude of force applied by the suspension spring along the direction of suspension travel.
Definition PxVehicleUpdate.h:169
PxReal suspJounce
Compression of the suspension spring.
Definition PxVehicleUpdate.h:160
PxVec3 suspLineDir
Directions of suspension line raycast/sweep used in the raycast/sweep completed immediately before Px...
Definition PxVehicleUpdate.h:77