Vehicle
Classes | |
class | PxVehicleChassisData |
class | PxVehicleEngineData |
class | PxVehicleGearsData |
class | PxVehicleAutoBoxData |
class | PxVehicleDifferential4WData |
class | PxVehicleAckermannGeometryData |
class | PxVehicleClutchData |
class | PxVehicleTireLoadFilterData |
Tire load can be strongly dependent on the timestep so it is a good idea to filter it to give less jerky handling behavior. The filtered tire load is used as an input to the tire model. More... | |
class | PxVehicleWheelData |
class | PxVehicleSuspensionData |
class | PxVehicleTireData |
class | PxVehicleDriveSimData |
Data structure describing non-wheel configuration data of a vehicle that has engine, gears, clutch, and auto-box. More... | |
class | PxVehicleDriveDynData |
Data structure with instanced dynamics data for vehicle with engine, clutch, gears, autobox. More... | |
class | PxVehicleDrive |
A complete vehicle with instance dynamics data and configuration data for wheels and engine,clutch,gears,autobox. More... | |
class | PxVehicleDriveSimData4W |
Data structure describing configuration data of a vehicle with up to 4 driven wheels,. More... | |
class | PxVehicleDrive4W |
Data structure with instanced dynamics data and configuration data of a vehicle with up to 4 driven wheels. More... | |
class | PxVehicleDriveTank |
Data structure with instanced dynamics data and configuration data of a tank. More... | |
class | PxVehicleTireForceCalculator |
Structure containing shader data for each tire of a vehicle and a shader function that computes individual tire forces. More... | |
struct | PxVehicleDrivableSurfaceType |
Driving surface type. More... | |
class | PxVehicleDrivableSurfaceToTireFrictionPairs |
Friction for each combination of driving surface type and tire type. More... | |
struct | PxVehicleKeySmoothingData |
Used to produce smooth vehicle driving control values from key inputs. More... | |
struct | PxVehiclePadSmoothingData |
Used to produce smooth analog vehicle control values from analog inputs. More... | |
class | PxVehicleDrive4WRawInputData |
Used to produce smooth vehicle driving control values from analog inputs. More... | |
class | PxVehicleDriveTankRawInputData |
Used to produce smooth analog tank control values from analog inputs. More... | |
class | PxVehicleWheelsSimData |
Data structure describing configuration data of a vehicle with up to 20 wheels,. More... | |
class | PxVehicleWheelsDynData |
Data structure with instanced dynamics data for wheels. More... | |
class | PxVehicleWheels |
Data structure with instanced dynamics data and configuration data of a vehicle with just wheels. More... | |
Defines | |
#define | PX_MAX_NUM_WHEELS (20) |
Maximum number of wheel shapes allowed to be added to the actor. | |
#define | PX_DEBUG_VEHICLE_ON (1) |
Compiler setting to enable recording of telemetry data. | |
Typedefs | |
typedef void(* | PxVehicleComputeTireForce )(const void *shaderData, const PxF32 tireFriction, const PxF32 longSlip, const PxF32 latSlip, const PxF32 camber, const PxF32 wheelOmega, const PxF32 wheelRadius, const PxF32 recipWheelRadius, const PxF32 restTireLoad, const PxF32 normalisedTireLoad, const PxF32 tireLoad, const PxF32 gravity, const PxF32 recipGravity, PxF32 &wheelTorque, PxF32 &tireLongForceMag, PxF32 &tireLatForceMag, PxF32 &tireAlignMoment) |
Prototype of shader function that computes wheel torque and tire forces. | |
Enumerations | |
enum | eVehicleDriveTypes { eVEHICLE_TYPE_DRIVE4W = 0, eVEHICLE_TYPE_DRIVETANK, eVEHICLE_TYPE_USER0, eVEHICLE_TYPE_USER1, eVEHICLE_TYPE_USER2, eVEHICLE_TYPE_USER3, eMAX_NUM_VEHICLE_TYPES } |
Functions | |
PX_COMPILE_TIME_ASSERT (0==(sizeof(PxVehicleChassisData)&0x0f)) | |
PX_C_EXPORT bool PX_CALL_CONV | PxInitVehicleSDK (PxPhysics &physics) |
Call this before using any of the vehicle functions. | |
PX_C_EXPORT void PX_CALL_CONV | PxCloseVehicleSDK () |
Shut down the PhysXVehicle library. | |
void | PxVehicleSetBasisVectors (const PxVec3 &up, const PxVec3 &forward) |
Set the basis vectors of the vehicle simulation. | |
void | PxVehicleComputeTireForceDefault (const void *shaderData, const PxF32 tireFriction, const PxF32 longSlip, const PxF32 latSlip, const PxF32 camber, const PxF32 wheelOmega, const PxF32 wheelRadius, const PxF32 recipWheelRadius, const PxF32 restTireLoad, const PxF32 normalisedTireLoad, const PxF32 tireLoad, const PxF32 gravity, const PxF32 recipGravity, PxF32 &wheelTorque, PxF32 &tireLongForceMag, PxF32 &tireLatForceMag, PxF32 &tireAlignMoment) |
Default implementation of PxVehicleComputeTireForce. | |
void | PxVehicleSuspensionRaycasts (PxBatchQuery *batchQuery, const PxU32 numVehicles, PxVehicleWheels **vehicles, const PxU32 numSceneQueryResults, PxRaycastQueryResult *sceneQueryResults) |
Start raycasts of all suspension lines. | |
void | PxVehicleUpdates (const PxReal timestep, const PxVec3 &gravity, const PxVehicleDrivableSurfaceToTireFrictionPairs &vehicleDrivableSurfaceToTireFrictionPairs, const PxU32 numVehicles, PxVehicleWheels **vehicles) |
Update an array of vehicles. | |
void | PxVehicleDrive4WSmoothDigitalRawInputsAndSetAnalogInputs (const PxVehicleKeySmoothingData &keySmoothing, const PxFixedSizeLookupTable< 8 > &steerVsForwardSpeedTable, const PxVehicleDrive4WRawInputData &rawInputData, const PxReal timestep, PxVehicleDrive4W &focusVehicle) |
Used to smooth and set analog vehicle control values (accel,brake,handbrake,steer) from digital inputs (keyboard). Also used to set boolean gearup, geardown values. | |
void | PxVehicleDrive4WSmoothAnalogRawInputsAndSetAnalogInputs (const PxVehiclePadSmoothingData &padSmoothing, const PxFixedSizeLookupTable< 8 > &steerVsForwardSpeedTable, const PxVehicleDrive4WRawInputData &rawInputData, const PxReal timestep, PxVehicleDrive4W &focusVehicle) |
Used to smooth and set analog vehicle control values from analog inputs (gamepad). Also used to set boolean gearup, geardown values. | |
void | PxVehicleDriveTankSmoothDigitalRawInputsAndSetAnalogInputs (const PxVehicleKeySmoothingData &padSmoothing, const PxVehicleDriveTankRawInputData &rawInputData, const PxReal timestep, PxVehicleDriveTank &focusVehicle) |
Used to smooth and set analog tank control values from digital inputs (gamepad). Also used to set boolean gearup, geardown values. | |
void | PxVehicleDriveTankSmoothAnalogRawInputsAndSetAnalogInputs (const PxVehiclePadSmoothingData &padSmoothing, const PxVehicleDriveTankRawInputData &rawInputData, const PxReal timestep, PxVehicleDriveTank &focusVehicle) |
Used to smooth and set analog tank control values from analog inputs (gamepad). Also used to set boolean gearup, geardown values. | |
void | PxVehicle4WEnable3WTadpoleMode (PxVehicleWheelsSimData &suspWheelTireData, PxVehicleDriveSimData4W &coreData) |
Enable 4W vehicle sim data as a 3W car with tadpole config (2 front wheels, 1 rear wheel). | |
void | PxVehicle4WEnable3WDeltaMode (PxVehicleWheelsSimData &suspWheelTireData, PxVehicleDriveSimData4W &coreData) |
Enable as a vehicle with 3 driven wheels with delta config (1 front wheel, 2 rear wheels). |
Define Documentation
#define PX_DEBUG_VEHICLE_ON (1) |
Compiler setting to enable recording of telemetry data.
- See also:
- PxVehicleUpdateSingleVehicleAndStoreTelemetryData, PxVehicleTelemetryData
#define PX_MAX_NUM_WHEELS (20) |
Maximum number of wheel shapes allowed to be added to the actor.
This number is also the maximum number of wheels allowed for a vehicle.
Typedef Documentation
typedef void(* PxVehicleComputeTireForce)(const void *shaderData, const PxF32 tireFriction, const PxF32 longSlip, const PxF32 latSlip, const PxF32 camber, const PxF32 wheelOmega, const PxF32 wheelRadius, const PxF32 recipWheelRadius, const PxF32 restTireLoad, const PxF32 normalisedTireLoad, const PxF32 tireLoad, const PxF32 gravity, const PxF32 recipGravity, PxF32 &wheelTorque, PxF32 &tireLongForceMag, PxF32 &tireLatForceMag, PxF32 &tireAlignMoment) |
Prototype of shader function that computes wheel torque and tire forces.
Default implementation is PxVehicleComputeTireForceDefault. shaderData - shader data for the tire being processed (see PxVehicleTireForceCalculator). tireFriction - friction value of the tire contact. longSlip - longitudinal slip of the tire. latSlip - lateral slip of the tire. camber - camber angle of the tire. wheelOmega - rotational speed of the wheel. wheelRadius - the distance from the tire surface and the center of the wheel. recipWheelRadius - the reciprocal of wheelRadius. restTireLoad - the load force experienced by the tire when the vehicle is at rest. normalisedTireLoad - a value equal to the load force on the tire divided by the restTireLoad. tireLoad - the load force currently experienced by the tire. gravity - magnitude of gravitational acceleration. recipGravity - the reciprocal of the magnitude of gravitational acceleration. wheelTorque - the torque to be applied to the wheel around the wheel axle. tireLongForceMag - the magnitude of the longitudinal tire force to be applied to the vehicle's rigid body. tireLatForceMag - the magnitude of the lateral tire force to be applied to the vehicle's rigid body. tireAlignMoment - the aligning moment of the tire that is to be applied to the vehicle's rigid body (not currently used).
- See also:
- PxVehicleComputeTireForceDefault
Enumeration Type Documentation
enum eVehicleDriveTypes |
Function Documentation
PX_COMPILE_TIME_ASSERT | ( | 0 | = =(sizeof(PxVehicleChassisData)&0x0f) |
) |
PX_C_EXPORT void PX_CALL_CONV PxCloseVehicleSDK | ( | ) |
Shut down the PhysXVehicle library.
This function should be called to cleanly shut down the PhysXVehicle library before the PxPhysics SDK gets released.
- See also:
- PxInitVehicleSDK
PX_C_EXPORT bool PX_CALL_CONV PxInitVehicleSDK | ( | PxPhysics & | physics | ) |
void PxVehicle4WEnable3WDeltaMode | ( | PxVehicleWheelsSimData & | suspWheelTireData, | |
PxVehicleDriveSimData4W & | coreData | |||
) |
Enable as a vehicle with 3 driven wheels with delta config (1 front wheel, 2 rear wheels).
The front-left wheel is removed and the front-right wheel is positioned at the centre of the front axle. The suspension of the front-right wheel is modified to support the entire mass of the front car while preserving its natural frequency and damping ratio.
void PxVehicle4WEnable3WTadpoleMode | ( | PxVehicleWheelsSimData & | suspWheelTireData, | |
PxVehicleDriveSimData4W & | coreData | |||
) |
Enable 4W vehicle sim data as a 3W car with tadpole config (2 front wheels, 1 rear wheel).
The rear-left wheel is removed and the rear-right wheel is positioned at the centre of the rear axle. The suspension of the rear-right wheel is modified to support the entire mass of the front car while preserving its natural frequency and damping ratio.
void PxVehicleComputeTireForceDefault | ( | const void * | shaderData, | |
const PxF32 | tireFriction, | |||
const PxF32 | longSlip, | |||
const PxF32 | latSlip, | |||
const PxF32 | camber, | |||
const PxF32 | wheelOmega, | |||
const PxF32 | wheelRadius, | |||
const PxF32 | recipWheelRadius, | |||
const PxF32 | restTireLoad, | |||
const PxF32 | normalisedTireLoad, | |||
const PxF32 | tireLoad, | |||
const PxF32 | gravity, | |||
const PxF32 | recipGravity, | |||
PxF32 & | wheelTorque, | |||
PxF32 & | tireLongForceMag, | |||
PxF32 & | tireLatForceMag, | |||
PxF32 & | tireAlignMoment | |||
) |
Default implementation of PxVehicleComputeTireForce.
void PxVehicleDrive4WSmoothAnalogRawInputsAndSetAnalogInputs | ( | const PxVehiclePadSmoothingData & | padSmoothing, | |
const PxFixedSizeLookupTable< 8 > & | steerVsForwardSpeedTable, | |||
const PxVehicleDrive4WRawInputData & | rawInputData, | |||
const PxReal | timestep, | |||
PxVehicleDrive4W & | focusVehicle | |||
) |
Used to smooth and set analog vehicle control values from analog inputs (gamepad). Also used to set boolean gearup, geardown values.
void PxVehicleDrive4WSmoothDigitalRawInputsAndSetAnalogInputs | ( | const PxVehicleKeySmoothingData & | keySmoothing, | |
const PxFixedSizeLookupTable< 8 > & | steerVsForwardSpeedTable, | |||
const PxVehicleDrive4WRawInputData & | rawInputData, | |||
const PxReal | timestep, | |||
PxVehicleDrive4W & | focusVehicle | |||
) |
Used to smooth and set analog vehicle control values (accel,brake,handbrake,steer) from digital inputs (keyboard). Also used to set boolean gearup, geardown values.
void PxVehicleDriveTankSmoothAnalogRawInputsAndSetAnalogInputs | ( | const PxVehiclePadSmoothingData & | padSmoothing, | |
const PxVehicleDriveTankRawInputData & | rawInputData, | |||
const PxReal | timestep, | |||
PxVehicleDriveTank & | focusVehicle | |||
) |
Used to smooth and set analog tank control values from analog inputs (gamepad). Also used to set boolean gearup, geardown values.
void PxVehicleDriveTankSmoothDigitalRawInputsAndSetAnalogInputs | ( | const PxVehicleKeySmoothingData & | padSmoothing, | |
const PxVehicleDriveTankRawInputData & | rawInputData, | |||
const PxReal | timestep, | |||
PxVehicleDriveTank & | focusVehicle | |||
) |
Used to smooth and set analog tank control values from digital inputs (gamepad). Also used to set boolean gearup, geardown values.
Set the basis vectors of the vehicle simulation.
Default values PxVec3(0,1,0), PxVec3(0,0,1)
Call this function before using PxVehicleUpdates unless the default values are correct.
void PxVehicleSuspensionRaycasts | ( | PxBatchQuery * | batchQuery, | |
const PxU32 | numVehicles, | |||
PxVehicleWheels ** | vehicles, | |||
const PxU32 | numSceneQueryResults, | |||
PxRaycastQueryResult * | sceneQueryResults | |||
) |
Start raycasts of all suspension lines.
numSceneQueryResults specifies the size of the sceneQueryResults array. numVehicles is the number of vehicles in the vehicles array. numSceneQueryResults must be greater than or equal to the total number of wheels of all the vehicles in the vehicles array; that is, sceneQueryResults must have dimensions large enough for one raycast per wheel.
void PxVehicleUpdates | ( | const PxReal | timestep, | |
const PxVec3 & | gravity, | |||
const PxVehicleDrivableSurfaceToTireFrictionPairs & | vehicleDrivableSurfaceToTireFrictionPairs, | |||
const PxU32 | numVehicles, | |||
PxVehicleWheels ** | vehicles | |||
) |
Update an array of vehicles.
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com