PxVehicleWheelsSimData Class Reference

Data structure describing configuration data of a vehicle with up to 20 wheels. More...

#include <PxVehicleWheels.h>

Collaboration diagram for PxVehicleWheelsSimData:

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...
 
PxVehicleWheelsSimDataoperator= (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 PxVehicleSuspensionDatagetSuspensionData (const PxU32 id) const
 Return the suspension data of the idth wheel. More...
 
const PxVehicleWheelDatagetWheelData (const PxU32 id) const
 Return the wheel data of the idth wheel. More...
 
const PxVehicleTireDatagetTireData (const PxU32 id) const
 Return the tire data of the idth wheel. More...
 
const PxVec3getSuspTravelDirection (const PxU32 id) const
 Return the direction of travel of the suspension of the idth wheel. More...
 
const PxVec3getSuspForceAppPointOffset (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 PxVec3getTireForceAppPointOffset (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 PxVec3getWheelCentreOffset (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 PxFilterDatagetSceneQueryFilterData (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 PxVehicleAntiRollBarDatagetAntiRollBarData (const PxU32 antiRollId) const
 Return a specific anti-roll bar. More...
 
PX_FORCE_INLINE const PxVehicleTireLoadFilterDatagetTireLoadFilterData () 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 PxVehicleWheelsSimDataallocate (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...
 
PxVehicleAntiRollBarDatamAntiRollBars
 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
 

Detailed Description

Data structure describing configuration data of a vehicle with up to 20 wheels.

Constructor & Destructor Documentation

◆ PxVehicleWheelsSimData() [1/3]

PxVehicleWheelsSimData::PxVehicleWheelsSimData ( const PxU32  numWheels)
private

◆ PxVehicleWheelsSimData() [2/3]

PxVehicleWheelsSimData::PxVehicleWheelsSimData ( const PxEMPTY  )
inline

◆ PxVehicleWheelsSimData() [3/3]

PxVehicleWheelsSimData::PxVehicleWheelsSimData ( )
inline

◆ ~PxVehicleWheelsSimData()

PxVehicleWheelsSimData::~PxVehicleWheelsSimData ( )
inline

Member Function Documentation

◆ addAntiRollBarData()

PxU32 PxVehicleWheelsSimData::addAntiRollBarData ( const PxVehicleAntiRollBarData antiRoll)

Set the anti-roll suspension for a pair of wheels.

Parameters
antiRollis the anti-roll suspension.
Note
If an anti-roll bar has already been set for the same logical wheel pair (independent of wheel index order specified by PxVehicleAntiRollBar.mWheel0 and PxVehicleAntiRollBar.mWheel0) then the existing anti-roll bar is updated with a new stiffness parameter antiRoll.mStiffness.
If the wheel pair specified by antiRoll does not yet have an anti-roll bar then antiRoll is added to a list of anti-roll bars for the vehicle.
Returns
If antiRoll represents a new wheel pair then a unique id is assigned to the anti-roll bar and returned. If antiRoll represents an existing wheel pair then the unique id of the existing anti-roll bar is returned. The return value is always in range (0, getNbAntiRollBars()).
Note
The return value can be used to query the anti-roll bar with getAntiRollBarData(id).
The number of possible anti-roll bars is limited to half the wheel count.
An existing anti-roll bar can be disabled by calling antiRoll.mStiffness to zero.
See also
PxVehicleWheelsSimData::getAntiRollBarData, PxVehicleAntiRollBarData

◆ allocate()

static PxVehicleWheelsSimData* PxVehicleWheelsSimData::allocate ( const PxU32  nbWheels)
static

Allocate a PxVehicleWheelsSimData instance for with nbWheels.

See also
free

◆ computeByteSize()

static PxU32 PxVehicleWheelsSimData::computeByteSize ( const PxU32  numWheels)
staticprivate

see PxVehicleWheels::allocate

◆ copy()

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.

Parameters
[in]srcis the data to be copied.
[in]srcWheelis the wheel whose data will be copied from src.
[in]trgWheelis the wheel that will be assigned the copied data.

◆ disableWheel()

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.

Note
If the vehicle has a differential (PxVehicleNW/PxVehicle4W) then the differential (PxVehicleDifferentialNWData/PxVehicleDifferential4WData) needs to be configured so that no drive torque is delivered to the disabled wheel.
If the vehicle is of type PxVehicleNoDrive then zero drive torque must be applied to the disabled wheel.
For tanks (PxVehicleDriveTank) any drive torque that could be delivered to the wheel through the tank differential will be re-directed to the remaining enabled wheels.
See also
enableWheel
PxVehicleDifferentialNWData::setDrivenWheel
PxVehicleDifferential4WData::mFrontLeftRightSplit, PxVehicleDifferential4WData::mRearLeftRightSplit, PxVehicleDifferential4WData::mType
PxVehicleNoDrive::setDriveTorque
PxVehicle4WEnable3WTadpoleMode, PxVehicle4WEnable3WDeltaMode
Note
If a PxShape is associated with the disabled wheel then the association must be broken by calling setWheelShapeMapping(wheelId, -1).
See also
setWheelShapeMapping
Note
A wheel that is disabled must also simultaneously be given zero wheel rotation speed.
See also
PxVehicleWheelsDynData::setWheelRotationSpeed
Note
Care must be taken with the sprung mass supported by the remaining enabled wheels. Depending on the desired effect, the mass of the rigid body might need to be distributed among the remaining enabled wheels and suspensions.
Parameters
[in]wheelis the wheel index.

◆ enableWheel()

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.

Parameters
[in]wheelis the wheel index.
See also
disableWheel

◆ free()

void PxVehicleWheelsSimData::free ( )

Free a PxVehicleWheelsSimData instance.

See also
allocate

◆ getAntiRollBarData()

const PxVehicleAntiRollBarData& PxVehicleWheelsSimData::getAntiRollBarData ( const PxU32  antiRollId) const

Return a specific anti-roll bar.

Parameters
antiRollIdis the unique id of the anti-roll bar
Note
The return value of addAntiRollBarData is a unique id for that specific anti-roll bar and can be used as input parameter for getAntiRollBarData in order to query the same anti-roll bar. Alternatively, it is possible to iterate over all anti-roll bars by choosing antiRollId in range (0, getNbAntiRollBars()).

◆ getBinaryMetaData()

static void PxVehicleWheelsSimData::getBinaryMetaData ( PxOutputStream stream)
static

◆ getHighForwardSpeedSubStepCount()

PxU32 PxVehicleWheelsSimData::getHighForwardSpeedSubStepCount ( ) const
inline

◆ getIsWheelDisabled()

bool PxVehicleWheelsSimData::getIsWheelDisabled ( const PxU32  wheel) const

Test if a wheel has been disabled.

Parameters
[in]wheelis the wheel index.

◆ getLowForwardSpeedSubStepCount()

PxU32 PxVehicleWheelsSimData::getLowForwardSpeedSubStepCount ( ) const
inline

◆ getMinLongSlipDenominator()

PxF32 PxVehicleWheelsSimData::getMinLongSlipDenominator ( ) const
inline

◆ getNbAntiRollBarData()

PxU32 PxVehicleWheelsSimData::getNbAntiRollBarData ( ) const
inline

◆ getNbAntiRollBars()

PxU32 PxVehicleWheelsSimData::getNbAntiRollBars ( ) const
inline

Return the number of unique anti-roll bars that have been added with addAntiRollBarData.

See also
PxVehicleWheelsSimData::addAntiRollBarData

◆ getNbAntiRollBars4()

PxU32 PxVehicleWheelsSimData::getNbAntiRollBars4 ( ) const
inline

◆ getNbSceneQueryFilterData()

PxU32 PxVehicleWheelsSimData::getNbSceneQueryFilterData ( ) const
inline

◆ getNbSuspensionData()

PxU32 PxVehicleWheelsSimData::getNbSuspensionData ( ) const
inline

◆ getNbSuspForceAppPointOffset()

PxU32 PxVehicleWheelsSimData::getNbSuspForceAppPointOffset ( ) const
inline

◆ getNbSuspTravelDirection()

PxU32 PxVehicleWheelsSimData::getNbSuspTravelDirection ( ) const
inline

◆ getNbTireData()

PxU32 PxVehicleWheelsSimData::getNbTireData ( ) const
inline

◆ getNbTireForceAppPointOffset()

PxU32 PxVehicleWheelsSimData::getNbTireForceAppPointOffset ( ) const
inline

◆ getNbWheelCentreOffset()

PxU32 PxVehicleWheelsSimData::getNbWheelCentreOffset ( ) const
inline

◆ getNbWheelData()

PxU32 PxVehicleWheelsSimData::getNbWheelData ( ) const
inline

◆ getNbWheelEnabledState()

PxU32 PxVehicleWheelsSimData::getNbWheelEnabledState ( ) const
inline

◆ getNbWheels()

PxU32 PxVehicleWheelsSimData::getNbWheels ( ) const
inline

Return the number of wheels.

See also
allocate

◆ getNbWheels4()

PxU32 PxVehicleWheelsSimData::getNbWheels4 ( ) const
inline

◆ getNbWheelShapeMapping()

PxU32 PxVehicleWheelsSimData::getNbWheelShapeMapping ( ) const
inline

◆ getSceneQueryFilterData()

const PxFilterData& PxVehicleWheelsSimData::getSceneQueryFilterData ( const PxU32  suspId) const

Return the scene query filter data used by the specified suspension line.

◆ getSuspensionData()

const PxVehicleSuspensionData& PxVehicleWheelsSimData::getSuspensionData ( const PxU32  id) const

Return the suspension data of the idth wheel.

◆ getSuspForceAppPointOffset()

const PxVec3& PxVehicleWheelsSimData::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.

Note
Specified relative to the center of mass of the rigid body

◆ getSuspTravelDirection()

const PxVec3& PxVehicleWheelsSimData::getSuspTravelDirection ( const PxU32  id) const

Return the direction of travel of the suspension of the idth wheel.

◆ getThresholdLongSpeed()

PxF32 PxVehicleWheelsSimData::getThresholdLongSpeed ( ) const
inline

◆ getTireData()

const PxVehicleTireData& PxVehicleWheelsSimData::getTireData ( const PxU32  id) const

Return the tire data of the idth wheel.

◆ getTireForceAppPointOffset()

const PxVec3& PxVehicleWheelsSimData::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.

Note
Specified relative to the centre of mass of the rigid body

◆ getTireLoadFilterData()

PX_FORCE_INLINE const PxVehicleTireLoadFilterData& PxVehicleWheelsSimData::getTireLoadFilterData ( ) const
inline

Return the data that describes the filtering of the tire load to produce smoother handling at large time-steps.

◆ getWheelCentreOffset()

const PxVec3& PxVehicleWheelsSimData::getWheelCentreOffset ( const PxU32  id) const

Return the offset from the rigid body centre of mass to the centre of the idth wheel.

◆ getWheelData()

const PxVehicleWheelData& PxVehicleWheelsSimData::getWheelData ( const PxU32  id) const

Return the wheel data of the idth wheel.

◆ getWheelEnabledState()

bool PxVehicleWheelsSimData::getWheelEnabledState ( const PxU32  wheel) const
inline

◆ getWheelShapeMapping()

PxI32 PxVehicleWheelsSimData::getWheelShapeMapping ( const PxU32  wheelId) const

Return the wheel mapping for the ith wheel.

Note
The return value is the element in the array of shapes of the vehicle's PxRigidDynamic that corresponds to the ith wheel. A return value of -1 means that the wheel is not mapped to a PxShape.
See also
PxRigidActor.getShapes

◆ isValid()

bool PxVehicleWheelsSimData::isValid ( ) const
private

Test if wheel simulation data has been setup with legal values.

◆ operator=()

PxVehicleWheelsSimData& PxVehicleWheelsSimData::operator= ( const PxVehicleWheelsSimData src)

Copy wheel simulation data.

Note
The number of wheels on both instances of PxVehicleWheelsSimData must match.

◆ patchUpPointers()

static PxU8* PxVehicleWheelsSimData::patchUpPointers ( const PxU32  numWheels,
PxVehicleWheelsSimData simData,
PxU8 *  ptrIn 
)
staticprivate

◆ setAntiRollBarData()

void PxVehicleWheelsSimData::setAntiRollBarData ( const PxU32  id,
const PxVehicleAntiRollBarData antiRoll 
)

◆ setChassisMass()

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.

Parameters
chassisMassis the mass of the chassis.
Note
This function assumes that the suspensions equally share the load of the chassis mass. It also assumes that the suspension will have a particular natural frequency and damping ratio that is typical of a standard car. If either of these assumptions is broken then each suspension will need to be individually configured with custom strength, damping rate, and sprung mass.
See also
allocate

◆ setHighForwardSpeedSubStepCount()

void PxVehicleWheelsSimData::setHighForwardSpeedSubStepCount ( const PxU32  f)
inline

◆ setLowForwardSpeedSubStepCount()

void PxVehicleWheelsSimData::setLowForwardSpeedSubStepCount ( const PxU32  f)
inline

◆ setMinLongSlipDenominator()

void PxVehicleWheelsSimData::setMinLongSlipDenominator ( const PxReal  minLongSlipDenominator)

Set the minimum denominator used in the longitudinal slip calculation.

Note
The longitudinal slip has a theoretical value of (w*r - vz)/|vz|, where w is the angular speed of the wheel; r is the radius of the wheel; and vz is the component of rigid body velocity (computed at the wheel base) that lies along the longitudinal wheel direction. The term |vz| normalizes the slip, while preserving the sign of the longitudinal tire slip. The difficulty here is that when |vz| approaches zero the longitudinal slip approaches infinity. A solution to this problem is to replace the denominator (|vz|) with a value that never falls below a chosen threshold. The longitudinal slip is then calculated with (w*r - vz)/PxMax(|vz|, minLongSlipDenominator).
The default value is the equivalent of 4 metres per second after accounting for the length scale set in PxTolerancesScale.
Adjust this value upwards if a vehicle has difficulty coming to rest.
Decreasing the timestep (or increasing the number of sub-steps at low longitudinal speed with setSubStepCount) should allow stable stable behavior with smaller values of minLongSlipDenominator.

◆ setSceneQueryFilterData()

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)

Parameters
suspIdis the wheel index
sqFilterDatais the raycast filter data for the suspension raycast.
See also
setWheelShapeMapping

◆ setSubStepCount()

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.

Note
More sub-steps provides better stability but with greater computational cost.
Typically, vehicles require more sub-steps at very low forward speeds.
The threshold longitudinal speed has a default value that is the equivalent of 5 metres per second after accounting for the length scale set in PxTolerancesScale.
The sub-step count below the threshold longitudinal speed has a default of 3.
The sub-step count above the threshold longitudinal speed has a default of 1.
Each sub-step has time advancement equal to the time-step passed to PxVehicleUpdates divided by the number of required sub-steps.
The contact planes of the most recent suspension line raycast are reused across all sub-steps.
Each sub-step computes tire and suspension forces and then advances a velocity, angular velocity and transform.
At the end of all sub-steps the vehicle actor is given the velocity and angular velocity that would move the actor from its start transform prior to the first sub-step to the transform computed at the end of the last substep, assuming it doesn't collide with anything along the way in the next PhysX SDK update.
The global pose of the actor is left unchanged throughout the sub-steps.
Parameters
[in]thresholdLongitudinalSpeedis a threshold speed that is used to categorize vehicle speed as low speed or high speed.
[in]lowForwardSpeedSubStepCountis the number of sub-steps performed in PxVehicleUpates for vehicles that have longitudinal speed lower than thresholdLongitudinalSpeed.
[in]highForwardSpeedSubStepCountis the number of sub-steps performed in PxVehicleUpdates for vehicles that have longitudinal speed graeter than thresholdLongitudinalSpeed.

◆ setSuspensionData()

void PxVehicleWheelsSimData::setSuspensionData ( const PxU32  id,
const PxVehicleSuspensionData susp 
)

Set the suspension data of the idth wheel.

Parameters
[in]idis the wheel index.
[in]suspis the suspension data to be applied.

◆ setSuspForceAppPointOffset()

void PxVehicleWheelsSimData::setSuspForceAppPointOffset ( const PxU32  id,
const PxVec3 offset 
)

Set the application point of the suspension force of the suspension of the idth wheel.

Parameters
[in]idis the wheel index
[in]offsetis the offset from the rigid body center of mass to the application point of the suspension force.
Note
Specified relative to the centre of mass of the rigid body

◆ setSuspTravelDirection()

void PxVehicleWheelsSimData::setSuspTravelDirection ( const PxU32  id,
const PxVec3 dir 
)

Set the direction of travel of the suspension of the idth wheel.

Parameters
[in]idis the wheel index
[in]diris the suspension travel direction to be applied.

◆ setThresholdLongSpeed()

void PxVehicleWheelsSimData::setThresholdLongSpeed ( const PxF32  f)
inline

◆ setTireData()

void PxVehicleWheelsSimData::setTireData ( const PxU32  id,
const PxVehicleTireData tire 
)

Set the tire data of the idth wheel.

Parameters
[in]idis the wheel index.
[in]tireis the tire data to be applied.

◆ setTireForceAppPointOffset()

void PxVehicleWheelsSimData::setTireForceAppPointOffset ( const PxU32  id,
const PxVec3 offset 
)

Set the application point of the tire force of the tire of the idth wheel.

Parameters
[in]idis the wheel index
[in]offsetis the offset from the rigid body center of mass to the application point of the tire force.
Note
Specified relative to the centre of mass of the rigid body

◆ setTireLoadFilterData()

void PxVehicleWheelsSimData::setTireLoadFilterData ( const PxVehicleTireLoadFilterData tireLoadFilter)

Set the data that describes the filtering of the tire load to produce smoother handling at large timesteps.

Parameters
tireLoadFilteris the smoothing function data.

◆ setWheelCentreOffset()

void PxVehicleWheelsSimData::setWheelCentreOffset ( const PxU32  id,
const PxVec3 offset 
)

Set the offset from the rigid body centre of mass to the centre of the idth wheel.

Parameters
[in]idis the wheel index
[in]offsetis the offset from the rigid body center of mass to the center of the wheel at rest.
Note
Specified relative to the centre of mass of the rigid body

◆ setWheelData()

void PxVehicleWheelsSimData::setWheelData ( const PxU32  id,
const PxVehicleWheelData wheel 
)

Set the wheel data of the idth wheel.

Parameters
[in]idis the wheel index.
[in]wheelis the wheel data to be applied.

◆ setWheelEnabledState()

void PxVehicleWheelsSimData::setWheelEnabledState ( const PxU32  wheel,
const bool  state 
)
inline

◆ setWheelShapeMapping()

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.

Note
This mapping is used to pose the correct wheel shapes with the latest wheel rotation angle, steer angle, and suspension travel while allowing arbitrary ordering of the wheel shapes in the actor's list of shapes.
Use setWheelShapeMapping(i,-1) to register that there is no wheel shape corresponding to the ith wheel
Set setWheelShapeMapping(i,k) to register that the ith wheel corresponds to the kth shape in the actor's list of shapes.
The default values correspond to setWheelShapeMapping(i,i) for all wheels.
Calling this function will also pose the relevant PxShape at the rest position of the wheel.
Parameters
wheelIdis the wheel index
shapeIdis the shape index.
See also
PxVehicleUpdates, PxVehicleDrive4W::setup, PxVehicleDriveTank::setup, PxVehicleNoDrive::setup, setSceneQueryFilterData, PxRigidActor::getShapes

Friends And Related Function Documentation

◆ PxVehicleDrive4W

friend class PxVehicleDrive4W
friend

◆ PxVehicleDriveTank

friend class PxVehicleDriveTank
friend

◆ PxVehicleNoDrive

friend class PxVehicleNoDrive
friend

◆ PxVehicleUpdate

friend class PxVehicleUpdate
friend

◆ PxVehicleWheels

friend class PxVehicleWheels
friend

Member Data Documentation

◆ mActiveWheelsBitmapBuffer

PxU32 PxVehicleWheelsSimData::mActiveWheelsBitmapBuffer[((PX_MAX_NB_WHEELS+31) &~31) >> 5]
private

Which of the mNbActiveWheels are active or disabled? The default is that all mNbActiveWheels wheels are active.

◆ mAntiRollBars

PxVehicleAntiRollBarData* PxVehicleWheelsSimData::mAntiRollBars
private

Anti-roll bars.

◆ mHighForwardSpeedSubStepCount

PxU32 PxVehicleWheelsSimData::mHighForwardSpeedSubStepCount
private

Number of sub-steps that will be performed if the longitudinal speed of the vehicle is greater than or equal to mThresholdLongitudinalSpeed.

◆ mLowForwardSpeedSubStepCount

PxU32 PxVehicleWheelsSimData::mLowForwardSpeedSubStepCount
private

Number of sub-steps that will be performed if the longitudinal speed of the vehicle is smaller than mThresholdLongitudinalSpeed.

◆ mMinLongSlipDenominator

PxF32 PxVehicleWheelsSimData::mMinLongSlipDenominator
private

Minimum long slip denominator.

◆ mNbActiveAntiRollBars

PxU32 PxVehicleWheelsSimData::mNbActiveAntiRollBars
private

Number of active anti-roll bars.

◆ mNbActiveWheels

PxU32 PxVehicleWheelsSimData::mNbActiveWheels
private

Number of actual wheels (<=(mNbWheels4*4))

◆ mNbAntiRollBars4

PxU32 PxVehicleWheelsSimData::mNbAntiRollBars4
private

2 anti-rollbars allocated for each block of 4 wheels.

◆ mNbWheels4

PxU32 PxVehicleWheelsSimData::mNbWheels4
private

Number of blocks of 4 wheels.

◆ mNormalisedLoadFilter

PxVehicleTireLoadFilterData PxVehicleWheelsSimData::mNormalisedLoadFilter
private

Graph to filter normalised load.

See also
setTireLoadFilterData, getTireLoadFilterData

◆ mPad

PxU32 PxVehicleWheelsSimData::mPad[1]
private

◆ mThresholdLongitudinalSpeed

PxF32 PxVehicleWheelsSimData::mThresholdLongitudinalSpeed
private

Threshold longitudinal speed used to decide whether to use mLowForwardSpeedSubStepCount or mHighForwardSpeedSubStepCount as the number of sub-steps that will be peformed.

◆ mWheels4SimData

PxVehicleWheels4SimData* PxVehicleWheelsSimData::mWheels4SimData
private

Wheels data organised in blocks of 4 wheels.


The documentation for this class was generated from the following file: