35#include "vehicle2/commands/PxVehicleCommandStates.h"
47 PxReal normalisedCommandResponse;
48 PxReal commandResponse;
58 PxReal commandResponse;
81#define PX_VEHICLE_NO_GEAR_SWITCH_PENDING -1.0f
82#define PX_VEHICLE_GEAR_SWITCH_INITIATED -2.0f
119#define PX_VEHICLE_UNSPECIFIED_TIME_SINCE_LAST_SHIFT PX_MAX_F32
194 void addConstraintGroup(
const PxU32 nbWheelsInGroupToAdd,
const PxU32*
const wheelIdsInGroupToAdd,
const PxF32* constraintMultipliers)
196 PX_ASSERT((
nbWheelsInGroups + nbWheelsInGroupToAdd) < PxVehicleLimits::eMAX_NB_WHEELS);
197 PX_ASSERT(
nbGroups < PxVehicleLimits::eMAX_NB_WHEELS);
200 for (PxU32 i = 0; i < nbWheelsInGroupToAdd; i++)
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_FORCE_INLINE void * PxMemZero(void *dest, PxU32 count)
Sets the bytes of the provided buffer to zero.
Definition PxMemory.h:53
Definition PxVehicleDrivetrainStates.h:122
PxReal timeSinceLastShift
Time that has lapsed since the last autobox gear shift.
Definition PxVehicleDrivetrainStates.h:128
bool activeAutoboxGearShift
Describes whether a gear shift triggered by the autobox is still in flight.
Definition PxVehicleDrivetrainStates.h:133
Definition PxVehicleDrivetrainStates.h:46
The clutch is modelled as two spinning plates with one connected to the wheels through the gearing an...
Definition PxVehicleDrivetrainStates.h:266
PxReal clutchSlip
The slip at the clutch.
Definition PxVehicleDrivetrainStates.h:272
Definition PxVehicleDrivetrainStates.h:143
PxReal aveWheelSpeedContributionAllWheels[PxVehicleLimits::eMAX_NB_WHEELS]
The contribution of each wheel to the average wheel rotation speed measured at the clutch.
Definition PxVehicleDrivetrainStates.h:167
PxU32 nbConnectedWheels
The number of wheels that are connected to the differential.
Definition PxVehicleDrivetrainStates.h:152
PxReal torqueRatiosAllWheels[PxVehicleLimits::eMAX_NB_WHEELS]
The fraction of available torque that is delivered to each wheel through the differential.
Definition PxVehicleDrivetrainStates.h:160
PxU32 connectedWheels[PxVehicleLimits::eMAX_NB_WHEELS]
A list of wheel indices that are connected to the differential.
Definition PxVehicleDrivetrainStates.h:147
Definition PxVehicleDrivetrainStates.h:57
Definition PxVehicleDrivetrainStates.h:67
PxReal rotationSpeed
The rotation speed of the engine (radians per second).
Definition PxVehicleDrivetrainStates.h:73
Definition PxVehicleDrivetrainStates.h:85
PxU32 currentGear
Current gear.
Definition PxVehicleDrivetrainStates.h:89
PxU32 targetGear
Target gear (different from current gear if a gear change is underway)
Definition PxVehicleDrivetrainStates.h:94
PxReal gearSwitchTime
Reported time that has passed since gear change started.
Definition PxVehicleDrivetrainStates.h:109
Specify groups of wheels that are to be constrained to have pre-determined angular velocity relations...
Definition PxVehicleDrivetrainStates.h:179
PxU32 groupToWheelIds[PxVehicleLimits::eMAX_NB_AXLES]
The list of wheel ids for the ith group begins at wheelIdsInGroupOrder[groupToWheelIds[i]].
Definition PxVehicleDrivetrainStates.h:255
PX_FORCE_INLINE PxReal getMultiplierInConstraintGroup(const PxU32 j, const PxU32 i) const
Return the constraint multiplier of the jth wheel in the ith constraint group.
Definition PxVehicleDrivetrainStates.h:248
PX_FORCE_INLINE PxU32 getNbConstraintGroups() const
Return the number of wheel constraint groups in the vehicle.
Definition PxVehicleDrivetrainStates.h:214
PX_FORCE_INLINE PxU32 getWheelInConstraintGroup(const PxU32 j, const PxU32 i) const
Return the wheel id of the jth wheel in the ith constraint group.
Definition PxVehicleDrivetrainStates.h:237
PxU32 nbWheelsPerGroup[PxVehicleLimits::eMAX_NB_AXLES]
The number of wheels in each group.
Definition PxVehicleDrivetrainStates.h:254
PxU32 nbWheelsInGroups
The number of wheels in a constraint group.
Definition PxVehicleDrivetrainStates.h:259
PxU32 wheelIdsInGroupOrder[PxVehicleLimits::eMAX_NB_WHEELS]
The list of all wheel ids in constraint groups.
Definition PxVehicleDrivetrainStates.h:257
PxU32 nbGroups
The number of constraint groups in the vehicle.
Definition PxVehicleDrivetrainStates.h:253
PxF32 wheelMultipliersInGroupOrder[PxVehicleLimits::eMAX_NB_WHEELS]
The constraint multipliers for each constraint group.
Definition PxVehicleDrivetrainStates.h:258
PX_FORCE_INLINE PxU32 getNbWheelsInConstraintGroup(const PxU32 i) const
Return the number of wheels in the ith constraint group.
Definition PxVehicleDrivetrainStates.h:225
void addConstraintGroup(const PxU32 nbWheelsInGroupToAdd, const PxU32 *const wheelIdsInGroupToAdd, const PxF32 *constraintMultipliers)
Add a wheel constraint group by specifying the number of wheels in the group, an array of wheel ids s...
Definition PxVehicleDrivetrainStates.h:194