Data structure describing configuration data of a vehicle with up to 20 wheels. More...
#include <PxVehicleWheels.h>
Public Member Functions | |
void | setChassisMass (const PxF32 chassisMass) |
Setup with mass information that can be applied to the default values of the suspensions, wheels, and tires set in their respective constructors. More... | |
void | free () |
Free a PxVehicleWheelsSimData instance. More... | |
PxVehicleWheelsSimData & | operator= (const PxVehicleWheelsSimData &src) |
Copy wheel simulation data. More... | |
void | copy (const PxVehicleWheelsSimData &src, const PxU32 srcWheel, const PxU32 trgWheel) |
Copy the data of a single wheel unit (wheel, suspension, tire) from srcWheel of src to trgWheel. More... | |
PxU32 | getNbWheels () const |
Return the number of wheels. More... | |
const PxVehicleSuspensionData & | getSuspensionData (const PxU32 id) const |
Return the suspension data of the idth wheel. More... | |
const PxVehicleWheelData & | getWheelData (const PxU32 id) const |
Return the wheel data of the idth wheel. More... | |
const PxVehicleTireData & | getTireData (const PxU32 id) const |
Return the tire data of the idth wheel. More... | |
const PxVec3 & | getSuspTravelDirection (const PxU32 id) const |
Return the direction of travel of the suspension of the idth wheel. More... | |
const PxVec3 & | getSuspForceAppPointOffset (const PxU32 id) const |
Return the application point of the suspension force of the suspension of the idth wheel as an offset from the rigid body center of mass. More... | |
const PxVec3 & | getTireForceAppPointOffset (const PxU32 id) const |
Return the application point of the tire force of the tire of the idth wheel as an offset from the rigid body center of mass. More... | |
const PxVec3 & | getWheelCentreOffset (const PxU32 id) const |
Return the offset from the rigid body centre of mass to the centre of the idth wheel. More... | |
PxI32 | getWheelShapeMapping (const PxU32 wheelId) const |
Return the wheel mapping for the ith wheel. More... | |
const PxFilterData & | getSceneQueryFilterData (const PxU32 suspId) const |
Return the scene query filter data used by the specified suspension line. More... | |
PxU32 | getNbAntiRollBars () const |
Return the number of unique anti-roll bars that have been added with addAntiRollBarData. More... | |
const PxVehicleAntiRollBarData & | getAntiRollBarData (const PxU32 antiRollId) const |
Return a specific anti-roll bar. More... | |
PX_FORCE_INLINE const PxVehicleTireLoadFilterData & | getTireLoadFilterData () const |
Return the data that describes the filtering of the tire load to produce smoother handling at large time-steps. More... | |
void | setSuspensionData (const PxU32 id, const PxVehicleSuspensionData &susp) |
Set the suspension data of the idth wheel. More... | |
void | setWheelData (const PxU32 id, const PxVehicleWheelData &wheel) |
Set the wheel data of the idth wheel. More... | |
void | setTireData (const PxU32 id, const PxVehicleTireData &tire) |
Set the tire data of the idth wheel. More... | |
void | setSuspTravelDirection (const PxU32 id, const PxVec3 &dir) |
Set the direction of travel of the suspension of the idth wheel. More... | |
void | setSuspForceAppPointOffset (const PxU32 id, const PxVec3 &offset) |
Set the application point of the suspension force of the suspension of the idth wheel. More... | |
void | setTireForceAppPointOffset (const PxU32 id, const PxVec3 &offset) |
Set the application point of the tire force of the tire of the idth wheel. More... | |
void | setWheelCentreOffset (const PxU32 id, const PxVec3 &offset) |
Set the offset from the rigid body centre of mass to the centre of the idth wheel. More... | |
void | setWheelShapeMapping (const PxU32 wheelId, const PxI32 shapeId) |
Set mapping between wheel id and position of corresponding wheel shape in the list of actor shapes. More... | |
void | setSceneQueryFilterData (const PxU32 suspId, const PxFilterData &sqFilterData) |
Set the scene query filter data that will be used for raycasts along the travel direction of the specified suspension. The default value is PxFilterData(0,0,0,0) More... | |
void | setTireLoadFilterData (const PxVehicleTireLoadFilterData &tireLoadFilter) |
Set the data that describes the filtering of the tire load to produce smoother handling at large timesteps. More... | |
PxU32 | addAntiRollBarData (const PxVehicleAntiRollBarData &antiRoll) |
Set the anti-roll suspension for a pair of wheels. More... | |
void | disableWheel (const PxU32 wheel) |
Disable a wheel so that zero suspension forces and zero tire forces are applied to the rigid body from this wheel. More... | |
void | enableWheel (const PxU32 wheel) |
Enable a wheel so that suspension forces and tire forces are applied to the rigid body. All wheels are enabled by default and remain enabled until they are disabled. More... | |
bool | getIsWheelDisabled (const PxU32 wheel) const |
Test if a wheel has been disabled. More... | |
void | setSubStepCount (const PxReal thresholdLongitudinalSpeed, const PxU32 lowForwardSpeedSubStepCount, const PxU32 highForwardSpeedSubStepCount) |
Set the number of vehicle sub-steps that will be performed when the vehicle's longitudinal speed is below and above a threshold longitudinal speed. More... | |
void | setMinLongSlipDenominator (const PxReal minLongSlipDenominator) |
Set the minimum denominator used in the longitudinal slip calculation. More... | |
PxVehicleWheelsSimData (const PxEMPTY) | |
PxU32 | getNbWheels4 () const |
PxU32 | getNbSuspensionData () const |
PxU32 | getNbWheelData () const |
PxU32 | getNbSuspTravelDirection () const |
PxU32 | getNbTireData () const |
PxU32 | getNbSuspForceAppPointOffset () const |
PxU32 | getNbTireForceAppPointOffset () const |
PxU32 | getNbWheelCentreOffset () const |
PxU32 | getNbWheelShapeMapping () const |
PxU32 | getNbSceneQueryFilterData () const |
PxF32 | getMinLongSlipDenominator () const |
void | setThresholdLongSpeed (const PxF32 f) |
PxF32 | getThresholdLongSpeed () const |
void | setLowForwardSpeedSubStepCount (const PxU32 f) |
PxU32 | getLowForwardSpeedSubStepCount () const |
void | setHighForwardSpeedSubStepCount (const PxU32 f) |
PxU32 | getHighForwardSpeedSubStepCount () const |
void | setWheelEnabledState (const PxU32 wheel, const bool state) |
bool | getWheelEnabledState (const PxU32 wheel) const |
PxU32 | getNbWheelEnabledState () const |
PxU32 | getNbAntiRollBars4 () const |
PxU32 | getNbAntiRollBarData () const |
void | setAntiRollBarData (const PxU32 id, const PxVehicleAntiRollBarData &antiRoll) |
PxVehicleWheelsSimData () | |
~PxVehicleWheelsSimData () | |
Static Public Member Functions | |
static PxVehicleWheelsSimData * | allocate (const PxU32 nbWheels) |
Allocate a PxVehicleWheelsSimData instance for with nbWheels. More... | |
static void | getBinaryMetaData (PxOutputStream &stream) |
Private Member Functions | |
bool | isValid () const |
Test if wheel simulation data has been setup with legal values. More... | |
PxVehicleWheelsSimData (const PxU32 numWheels) | |
Static Private Member Functions | |
static PxU32 | computeByteSize (const PxU32 numWheels) |
see PxVehicleWheels::allocate More... | |
static PxU8 * | patchUpPointers (const PxU32 numWheels, PxVehicleWheelsSimData *simData, PxU8 *ptrIn) |
Private Attributes | |
PxVehicleTireLoadFilterData | mNormalisedLoadFilter |
Graph to filter normalised load. More... | |
PxVehicleWheels4SimData * | mWheels4SimData |
Wheels data organised in blocks of 4 wheels. More... | |
PxU32 | mNbWheels4 |
Number of blocks of 4 wheels. More... | |
PxU32 | mNbActiveWheels |
Number of actual wheels (<=(mNbWheels4*4)) More... | |
PxVehicleAntiRollBarData * | mAntiRollBars |
Anti-roll bars. More... | |
PxU32 | mNbAntiRollBars4 |
2 anti-rollbars allocated for each block of 4 wheels. More... | |
PxU32 | mNbActiveAntiRollBars |
Number of active anti-roll bars. More... | |
PxU32 | mActiveWheelsBitmapBuffer [((PX_MAX_NB_WHEELS+31) &~31) >> 5] |
Which of the mNbActiveWheels are active or disabled? The default is that all mNbActiveWheels wheels are active. More... | |
PxF32 | mThresholdLongitudinalSpeed |
Threshold longitudinal speed used to decide whether to use mLowForwardSpeedSubStepCount or mHighForwardSpeedSubStepCount as the number of sub-steps that will be peformed. More... | |
PxU32 | mLowForwardSpeedSubStepCount |
Number of sub-steps that will be performed if the longitudinal speed of the vehicle is smaller than mThresholdLongitudinalSpeed. More... | |
PxU32 | mHighForwardSpeedSubStepCount |
Number of sub-steps that will be performed if the longitudinal speed of the vehicle is greater than or equal to mThresholdLongitudinalSpeed. More... | |
PxF32 | mMinLongSlipDenominator |
Minimum long slip denominator. More... | |
PxU32 | mPad [1] |
Friends | |
class | PxVehicleWheels |
class | PxVehicleNoDrive |
class | PxVehicleDrive4W |
class | PxVehicleDriveTank |
class | PxVehicleUpdate |
Data structure describing configuration data of a vehicle with up to 20 wheels.
|
private |
|
inline |
|
inline |
|
inline |
PxU32 PxVehicleWheelsSimData::addAntiRollBarData | ( | const PxVehicleAntiRollBarData & | antiRoll | ) |
Set the anti-roll suspension for a pair of wheels.
antiRoll | is the anti-roll suspension. |
|
static |
Allocate a PxVehicleWheelsSimData instance for with nbWheels.
see PxVehicleWheels::allocate
void PxVehicleWheelsSimData::copy | ( | const PxVehicleWheelsSimData & | src, |
const PxU32 | srcWheel, | ||
const PxU32 | trgWheel | ||
) |
Copy the data of a single wheel unit (wheel, suspension, tire) from srcWheel of src to trgWheel.
[in] | src | is the data to be copied. |
[in] | srcWheel | is the wheel whose data will be copied from src. |
[in] | trgWheel | is the wheel that will be assigned the copied data. |
void PxVehicleWheelsSimData::disableWheel | ( | const PxU32 | wheel | ) |
Disable a wheel so that zero suspension forces and zero tire forces are applied to the rigid body from this wheel.
[in] | wheel | is the wheel index. |
void PxVehicleWheelsSimData::enableWheel | ( | const PxU32 | wheel | ) |
Enable a wheel so that suspension forces and tire forces are applied to the rigid body. All wheels are enabled by default and remain enabled until they are disabled.
[in] | wheel | is the wheel index. |
void PxVehicleWheelsSimData::free | ( | ) |
Free a PxVehicleWheelsSimData instance.
const PxVehicleAntiRollBarData& PxVehicleWheelsSimData::getAntiRollBarData | ( | const PxU32 | antiRollId | ) | const |
Return a specific anti-roll bar.
antiRollId | is the unique id of the anti-roll bar |
|
static |
|
inline |
bool PxVehicleWheelsSimData::getIsWheelDisabled | ( | const PxU32 | wheel | ) | const |
Test if a wheel has been disabled.
[in] | wheel | is the wheel index. |
|
inline |
|
inline |
|
inline |
|
inline |
Return the number of unique anti-roll bars that have been added with addAntiRollBarData.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the number of wheels.
|
inline |
|
inline |
const PxFilterData& PxVehicleWheelsSimData::getSceneQueryFilterData | ( | const PxU32 | suspId | ) | const |
Return the scene query filter data used by the specified suspension line.
const PxVehicleSuspensionData& PxVehicleWheelsSimData::getSuspensionData | ( | const PxU32 | id | ) | const |
Return the suspension data of the idth wheel.
Return the application point of the suspension force of the suspension of the idth wheel as an offset from the rigid body center of mass.
Return the direction of travel of the suspension of the idth wheel.
|
inline |
const PxVehicleTireData& PxVehicleWheelsSimData::getTireData | ( | const PxU32 | id | ) | const |
Return the tire data of the idth wheel.
Return the application point of the tire force of the tire of the idth wheel as an offset from the rigid body center of mass.
|
inline |
Return the data that describes the filtering of the tire load to produce smoother handling at large time-steps.
Return the offset from the rigid body centre of mass to the centre of the idth wheel.
const PxVehicleWheelData& PxVehicleWheelsSimData::getWheelData | ( | const PxU32 | id | ) | const |
Return the wheel data of the idth wheel.
|
inline |
PxI32 PxVehicleWheelsSimData::getWheelShapeMapping | ( | const PxU32 | wheelId | ) | const |
Return the wheel mapping for the ith wheel.
|
private |
Test if wheel simulation data has been setup with legal values.
PxVehicleWheelsSimData& PxVehicleWheelsSimData::operator= | ( | const PxVehicleWheelsSimData & | src | ) |
Copy wheel simulation data.
|
staticprivate |
void PxVehicleWheelsSimData::setAntiRollBarData | ( | const PxU32 | id, |
const PxVehicleAntiRollBarData & | antiRoll | ||
) |
void PxVehicleWheelsSimData::setChassisMass | ( | const PxF32 | chassisMass | ) |
Setup with mass information that can be applied to the default values of the suspensions, wheels, and tires set in their respective constructors.
chassisMass | is the mass of the chassis. |
|
inline |
|
inline |
void PxVehicleWheelsSimData::setMinLongSlipDenominator | ( | const PxReal | minLongSlipDenominator | ) |
Set the minimum denominator used in the longitudinal slip calculation.
void PxVehicleWheelsSimData::setSceneQueryFilterData | ( | const PxU32 | suspId, |
const PxFilterData & | sqFilterData | ||
) |
Set the scene query filter data that will be used for raycasts along the travel direction of the specified suspension. The default value is PxFilterData(0,0,0,0)
suspId | is the wheel index |
sqFilterData | is the raycast filter data for the suspension raycast. |
void PxVehicleWheelsSimData::setSubStepCount | ( | const PxReal | thresholdLongitudinalSpeed, |
const PxU32 | lowForwardSpeedSubStepCount, | ||
const PxU32 | highForwardSpeedSubStepCount | ||
) |
Set the number of vehicle sub-steps that will be performed when the vehicle's longitudinal speed is below and above a threshold longitudinal speed.
[in] | thresholdLongitudinalSpeed | is a threshold speed that is used to categorize vehicle speed as low speed or high speed. |
[in] | lowForwardSpeedSubStepCount | is the number of sub-steps performed in PxVehicleUpates for vehicles that have longitudinal speed lower than thresholdLongitudinalSpeed. |
[in] | highForwardSpeedSubStepCount | is the number of sub-steps performed in PxVehicleUpdates for vehicles that have longitudinal speed graeter than thresholdLongitudinalSpeed. |
void PxVehicleWheelsSimData::setSuspensionData | ( | const PxU32 | id, |
const PxVehicleSuspensionData & | susp | ||
) |
Set the suspension data of the idth wheel.
[in] | id | is the wheel index. |
[in] | susp | is the suspension data to be applied. |
Set the application point of the suspension force of the suspension of the idth wheel.
[in] | id | is the wheel index |
[in] | offset | is the offset from the rigid body center of mass to the application point of the suspension force. |
Set the direction of travel of the suspension of the idth wheel.
[in] | id | is the wheel index |
[in] | dir | is the suspension travel direction to be applied. |
|
inline |
void PxVehicleWheelsSimData::setTireData | ( | const PxU32 | id, |
const PxVehicleTireData & | tire | ||
) |
Set the tire data of the idth wheel.
[in] | id | is the wheel index. |
[in] | tire | is the tire data to be applied. |
Set the application point of the tire force of the tire of the idth wheel.
[in] | id | is the wheel index |
[in] | offset | is the offset from the rigid body center of mass to the application point of the tire force. |
void PxVehicleWheelsSimData::setTireLoadFilterData | ( | const PxVehicleTireLoadFilterData & | tireLoadFilter | ) |
Set the data that describes the filtering of the tire load to produce smoother handling at large timesteps.
tireLoadFilter | is the smoothing function data. |
Set the offset from the rigid body centre of mass to the centre of the idth wheel.
[in] | id | is the wheel index |
[in] | offset | is the offset from the rigid body center of mass to the center of the wheel at rest. |
void PxVehicleWheelsSimData::setWheelData | ( | const PxU32 | id, |
const PxVehicleWheelData & | wheel | ||
) |
Set the wheel data of the idth wheel.
[in] | id | is the wheel index. |
[in] | wheel | is the wheel data to be applied. |
|
inline |
void PxVehicleWheelsSimData::setWheelShapeMapping | ( | const PxU32 | wheelId, |
const PxI32 | shapeId | ||
) |
Set mapping between wheel id and position of corresponding wheel shape in the list of actor shapes.
wheelId | is the wheel index |
shapeId | is the shape index. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Which of the mNbActiveWheels are active or disabled? The default is that all mNbActiveWheels wheels are active.
|
private |
Anti-roll bars.
|
private |
Number of sub-steps that will be performed if the longitudinal speed of the vehicle is greater than or equal to mThresholdLongitudinalSpeed.
|
private |
Number of sub-steps that will be performed if the longitudinal speed of the vehicle is smaller than mThresholdLongitudinalSpeed.
|
private |
Minimum long slip denominator.
|
private |
Number of active anti-roll bars.
|
private |
Number of actual wheels (<=(mNbWheels4*4))
|
private |
2 anti-rollbars allocated for each block of 4 wheels.
|
private |
Number of blocks of 4 wheels.
|
private |
Graph to filter normalised load.
|
private |
|
private |
Threshold longitudinal speed used to decide whether to use mLowForwardSpeedSubStepCount or mHighForwardSpeedSubStepCount as the number of sub-steps that will be peformed.
|
private |
Wheels data organised in blocks of 4 wheels.