RavEngine
Loading...
Searching...
No Matches
PxVehicleComponents.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef PX_VEHICLE_COMPONENTS_H
30#define PX_VEHICLE_COMPONENTS_H
31
32#include "foundation/PxMemory.h"
33#include "foundation/PxVec3.h"
34#include "common/PxCoreUtilityTypes.h"
35#include "vehicle/PxVehicleSDK.h"
36#include "common/PxTypeInfo.h"
37
38#if !PX_DOXYGEN
39namespace physx
40{
41#endif
42
44{
45public:
46
47 friend class PxVehicleDriveSimData4W;
48
50 : mMOI(PxVec3(0,0,0)),
51 mMass(1500),
52 mCMOffset(PxVec3(0,0,0))
53 {
54 }
55
62
68 PxReal mMass;
69
76
77private:
78
79 PxReal pad;
80
81 bool isValid() const;
82};
84
86{
87public:
88
89 friend class PxVehicleDriveSimData;
90
91 enum
92 {
93 eMAX_NB_ENGINE_TORQUE_CURVE_ENTRIES = 8
94 };
95
97 : mMOI(1.0f),
98 mPeakTorque(500.0f),
99 mMaxOmega(600.0f),
100 mDampingRateFullThrottle(0.15f),
101 mDampingRateZeroThrottleClutchEngaged(2.0f),
102 mDampingRateZeroThrottleClutchDisengaged(0.35f)
103 {
104 mTorqueCurve.addPair(0.0f, 0.8f);
105 mTorqueCurve.addPair(0.33f, 1.0f);
106 mTorqueCurve.addPair(1.0f, 0.8f);
107
108 mRecipMOI=1.0f/mMOI;
109 mRecipMaxOmega=1.0f/mMaxOmega;
110 }
111
118
124 PxReal mMOI;
125
136
144 PxReal mMaxOmega;
145
162
163
180
197
201 PX_FORCE_INLINE PxReal getRecipMOI() const {return mRecipMOI;}
202
206 PX_FORCE_INLINE PxReal getRecipMaxOmega() const {return mRecipMaxOmega;}
207
208private:
209
217 PxReal mRecipMOI;
218
226 PxReal mRecipMaxOmega;
227
228 bool isValid() const;
229
230
231//serialization
232public:
233 PxVehicleEngineData(const PxEMPTY) : mTorqueCurve(PxEmpty) {}
234//~serialization
235};
236PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleEngineData)& 0x0f));
237
239{
240public:
241
242 friend class PxVehicleDriveSimData;
243
244 enum Enum
245 {
246 eREVERSE=0,
247 eNEUTRAL,
248 eFIRST,
249 eSECOND,
250 eTHIRD,
251 eFOURTH,
252 eFIFTH,
253 eSIXTH,
254 eSEVENTH,
255 eEIGHTH,
256 eNINTH,
257 eTENTH,
258 eELEVENTH,
259 eTWELFTH,
260 eTHIRTEENTH,
261 eFOURTEENTH,
262 eFIFTEENTH,
263 eSIXTEENTH,
264 eSEVENTEENTH,
265 eEIGHTEENTH,
266 eNINETEENTH,
267 eTWENTIETH,
268 eTWENTYFIRST,
269 eTWENTYSECOND,
270 eTWENTYTHIRD,
271 eTWENTYFOURTH,
272 eTWENTYFIFTH,
273 eTWENTYSIXTH,
274 eTWENTYSEVENTH,
275 eTWENTYEIGHTH,
276 eTWENTYNINTH,
277 eTHIRTIETH,
278 eGEARSRATIO_COUNT
279 };
280
282 : mFinalRatio(4.0f),
283 mNbRatios(7),
284 mSwitchTime(0.5f)
285 {
286 mRatios[PxVehicleGearsData::eREVERSE]=-4.0f;
287 mRatios[PxVehicleGearsData::eNEUTRAL]=0.0f;
288 mRatios[PxVehicleGearsData::eFIRST]=4.0f;
289 mRatios[PxVehicleGearsData::eSECOND]=2.0f;
290 mRatios[PxVehicleGearsData::eTHIRD]=1.5f;
291 mRatios[PxVehicleGearsData::eFOURTH]=1.1f;
292 mRatios[PxVehicleGearsData::eFIFTH]=1.0f;
293
294 for(PxU32 i = PxVehicleGearsData::eSIXTH; i < PxVehicleGearsData::eGEARSRATIO_COUNT; ++i)
295 mRatios[i]=0.f;
296 }
297
303 PxReal mRatios[PxVehicleGearsData::eGEARSRATIO_COUNT];
304
311
318
327
328private:
329
330 PxReal mPad;
331
332 bool isValid() const;
333
334//serialization
335public:
337 PxReal getGearRatio(PxVehicleGearsData::Enum a) const {return mRatios[a];}
338 void setGearRatio(PxVehicleGearsData::Enum a, PxReal ratio) { mRatios[a] = ratio;}
339//~serialization
340};
341PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleGearsData)& 0x0f));
342
344{
345public:
346
347 friend class PxVehicleDriveSimData;
348
350 {
351 for(PxU32 i=0;i<PxVehicleGearsData::eGEARSRATIO_COUNT;i++)
352 {
353 mUpRatios[i]=0.65f;
354 mDownRatios[i]=0.50f;
355 }
356 //Not sure how important this is but we want to kick out of neutral very quickly.
357 mUpRatios[PxVehicleGearsData::eNEUTRAL]=0.15f;
358 //Set the latency time in an unused element of one of the arrays.
359 mDownRatios[PxVehicleGearsData::eREVERSE]=2.0f;
360 }
361
370 PxReal mUpRatios[PxVehicleGearsData::eGEARSRATIO_COUNT];
371
380 PxReal mDownRatios[PxVehicleGearsData::eGEARSRATIO_COUNT];
381
393 void setLatency(const PxReal latency)
394 {
395 mDownRatios[PxVehicleGearsData::eREVERSE]=latency;
396 }
397
405 PxReal getLatency() const
406 {
407 return mDownRatios[PxVehicleGearsData::eREVERSE];
408 }
409
410private:
411 bool isValid() const;
412
413//serialization
414public:
416
417 PxReal getUpRatios(PxVehicleGearsData::Enum a) const {return mUpRatios[a];}
418 void setUpRatios(PxVehicleGearsData::Enum a, PxReal ratio) { mUpRatios[a] = ratio;}
419
420 PxReal getDownRatios(PxVehicleGearsData::Enum a) const {return mDownRatios[a];}
421 void setDownRatios(PxVehicleGearsData::Enum a, PxReal ratio) { mDownRatios[a] = ratio;}
422//~serialization
423};
424PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleAutoBoxData)& 0x0f));
425
427{
428public:
429
430 friend class PxVehicleDriveSimData4W;
431
432 enum Enum
433 {
434 eDIFF_TYPE_LS_4WD, //limited slip differential for car with 4 driven wheels
435 eDIFF_TYPE_LS_FRONTWD, //limited slip differential for car with front-wheel drive
436 eDIFF_TYPE_LS_REARWD, //limited slip differential for car with rear-wheel drive
437 eDIFF_TYPE_OPEN_4WD, //open differential for car with 4 driven wheels
438 eDIFF_TYPE_OPEN_FRONTWD, //open differential for car with front-wheel drive
439 eDIFF_TYPE_OPEN_REARWD, //open differential for car with rear-wheel drive
440 eMAX_NB_DIFF_TYPES
441 };
442
444 : mFrontRearSplit(0.45f),
445 mFrontLeftRightSplit(0.5f),
446 mRearLeftRightSplit(0.5f),
447 mCentreBias(1.3f),
448 mFrontBias(1.3f),
449 mRearBias(1.3f),
450 mType(PxVehicleDifferential4WData::eDIFF_TYPE_LS_4WD)
451 {
452 }
453
462
471
480
490
500
509 PxReal mRearBias;
510
516 PxVehicleDifferential4WData::Enum mType;
517
518private:
519
520 PxReal mPad[1];
521
522 bool isValid() const;
523
524//serialization
525public:
527//~serialization
528};
529PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleDifferential4WData)& 0x0f));
530
532{
533public:
534
535 friend class PxVehicleDriveSimDataNW;
536 friend class PxVehicleUpdate;
537
539 {
540 PxMemSet(mBitmapBuffer, 0, sizeof(PxU32) * (((PX_MAX_NB_WHEELS + 31) & ~31) >> 5));
541 mNbDrivenWheels=0;
542 mInvNbDrivenWheels=0.0f;
543 }
544
552 void setDrivenWheel(const PxU32 wheelId, const bool drivenState);
553
557 bool getIsDrivenWheel(const PxU32 wheelId) const;
558
559private:
560
561 PxU32 mBitmapBuffer[((PX_MAX_NB_WHEELS + 31) & ~31) >> 5];
562 PxU32 mNbDrivenWheels;
563 PxReal mInvNbDrivenWheels;
564 PxU32 mPad;
565
566 bool isValid() const;
567
568//serialization
569public:
571 PxU32 getDrivenWheelStatus() const;
572 void setDrivenWheelStatus(PxU32 status);
573//~serialization
574};
576
577
579{
580public:
581
582 friend class PxVehicleDriveSimData4W;
583
585 : mAccuracy(1.0f),
586 mFrontWidth(0.0f), //Must be filled out
587 mRearWidth(0.0f), //Must be filled out
588 mAxleSeparation(0.0f) //Must be filled out
589 {
590 }
591
607 PxReal mAccuracy;
608
616 PxReal mFrontWidth;
617
625 PxReal mRearWidth;
626
635
636private:
637
638 bool isValid() const;
639
640//serialization
641public:
643//~serialization
644};
645PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleAckermannGeometryData)& 0x0f));
646
652{
653 enum Enum
654 {
655 eESTIMATE = 0,
656 eBEST_POSSIBLE
657 };
658};
659
661{
662public:
663
664 friend class PxVehicleDriveSimData;
665
667 : mStrength(10.0f),
668 mAccuracyMode(PxVehicleClutchAccuracyMode::eBEST_POSSIBLE),
669 mEstimateIterations(5)
670 {
671 }
672
691 PxReal mStrength;
692
707 PxVehicleClutchAccuracyMode::Enum mAccuracyMode;
708
721
722private:
723
724 PxU8 mPad[4];
725
726 bool isValid() const;
727
728//serialization
729public:
731//~serialization
732};
733PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleClutchData)& 0x0f));
734
735
759{
760public:
761
762 friend class PxVehicleWheelsSimData;
763
765 : mMinNormalisedLoad(0),
766 mMinFilteredNormalisedLoad(0.2308f),
767 mMaxNormalisedLoad(3.0f),
768 mMaxFilteredNormalisedLoad(3.0f)
769 {
770 mDenominator=1.0f/(mMaxNormalisedLoad - mMinNormalisedLoad);
771 }
772
777
782
787
792
793 PX_FORCE_INLINE PxReal getDenominator() const {return mDenominator;}
794
795private:
796
800 //1.0f/(mMaxNormalisedLoad-mMinNormalisedLoad) for quick calculations
801 PxReal mDenominator;
802
803 PxU32 mPad[3];
804
805 bool isValid() const;
806
807//serialization
808public:
810//~serialization
811};
812PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleTireLoadFilterData)& 0x0f));
813
815{
816public:
817
818 friend class PxVehicleWheels4SimData;
819
821 : mRadius(0.0f), //Must be filled out
822 mWidth(0.0f),
823 mMass(20.0f),
824 mMOI(0.0f), //Must be filled out
825 mDampingRate(0.25f),
826 mMaxBrakeTorque(1500.0f),
827 mMaxHandBrakeTorque(0.0f),
828 mMaxSteer(0.0f),
829 mToeAngle(0.0f),
830 mRecipRadius(0.0f), //Must be filled out
831 mRecipMOI(0.0f) //Must be filled out
832 {
833 }
834
842 PxReal mRadius;
843
851 PxReal mWidth;
852
860 PxReal mMass;
861
869 PxReal mMOI;
870
879
888
897
905 PxReal mMaxSteer;
906
914 PxReal mToeAngle;//in radians
915
921 PX_FORCE_INLINE PxReal getRecipRadius() const {return mRecipRadius;}
922
928 PX_FORCE_INLINE PxReal getRecipMOI() const {return mRecipMOI;}
929
930private:
931
939 PxReal mRecipRadius;
940
948 PxReal mRecipMOI;
949
950 PxReal mPad[1];
951
952 bool isValid() const;
953};
954PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleWheelData)& 0x0f));
955
957{
958public:
959
960 friend class PxVehicleWheels4SimData;
961
963 : mSpringStrength(0.0f),
964 mSpringDamperRate(0.0f),
965 mMaxCompression(0.3f),
966 mMaxDroop(0.1f),
967 mSprungMass(0.0f),
968 mCamberAtRest(0.0f),
969 mCamberAtMaxCompression(0.0f),
970 mCamberAtMaxDroop(0.0f),
971 mRecipMaxCompression(1.0f),
972 mRecipMaxDroop(1.0f)
973 {
974 }
975
984
993
1002
1011
1045
1055
1067
1079
1087 PX_FORCE_INLINE PxReal getRecipMaxCompression() const {return mRecipMaxCompression;}
1088
1096 PX_FORCE_INLINE PxReal getRecipMaxDroop() const {return mRecipMaxDroop;}
1097
1103 void setMassAndPreserveNaturalFrequency(const PxReal newSprungMass)
1104 {
1105 const PxF32 oldStrength = mSpringStrength;
1106 const PxF32 oldSprungMass = mSprungMass;
1107 const PxF32 newStrength = oldStrength * (newSprungMass / oldSprungMass);
1108 mSpringStrength = newStrength;
1109 mSprungMass = newSprungMass;
1110 }
1111
1112private:
1113
1119 PxReal mRecipMaxCompression;
1120
1126 PxReal mRecipMaxDroop;
1127
1128 //padding
1129 PxReal mPad[2];
1130
1131 bool isValid() const;
1132};
1133PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleSuspensionData)& 0x0f));
1134
1136{
1137public:
1138
1139 friend class PxVehicleWheelsSimData;
1140
1142 : mWheel0(0xffffffff),
1143 mWheel1(0xffffffff),
1144 mStiffness(0.0f)
1145 {
1146 }
1147
1148 /*
1149 \brief The anti-roll bar connects two wheels with indices mWheel0 and mWheel1
1150 */
1151 PxU32 mWheel0;
1152
1153 /*
1154 \brief The anti-roll bar connects two wheels with indices mWheel0 and mWheel1
1155 */
1156 PxU32 mWheel1;
1157
1158 /*
1159 \brief The stiffness of the anti-roll bar.
1160
1161 \note Specified in kilograms per second-squared (kg s^-2).
1162
1163 <b>Range:</b> [0, PX_MAX_F32)<br>
1164 */
1165 PxF32 mStiffness;
1166
1167private:
1168
1169 PxF32 mPad[1];
1170
1171 bool isValid() const;
1172};
1174
1176{
1177public:
1178 friend class PxVehicleWheels4SimData;
1179
1181 : mLatStiffX(2.0f),
1182 mLatStiffY(0.3125f*(180.0f / PxPi)),
1183 mLongitudinalStiffnessPerUnitGravity(1000.0f),
1184 mCamberStiffnessPerUnitGravity(0.1f*(180.0f / PxPi)),
1185 mType(0)
1186 {
1187 mFrictionVsSlipGraph[0][0]=0.0f;
1188 mFrictionVsSlipGraph[0][1]=1.0f;
1189 mFrictionVsSlipGraph[1][0]=0.1f;
1190 mFrictionVsSlipGraph[1][1]=1.0f;
1191 mFrictionVsSlipGraph[2][0]=1.0f;
1192 mFrictionVsSlipGraph[2][1]=1.0f;
1193
1194 mRecipLongitudinalStiffnessPerUnitGravity=1.0f/mLongitudinalStiffnessPerUnitGravity;
1195
1196 mFrictionVsSlipGraphRecipx1Minusx0=1.0f/(mFrictionVsSlipGraph[1][0]-mFrictionVsSlipGraph[0][0]);
1197 mFrictionVsSlipGraphRecipx2Minusx1=1.0f/(mFrictionVsSlipGraph[2][0]-mFrictionVsSlipGraph[1][0]);
1198 }
1199
1208
1225
1238
1251
1285 PxReal mFrictionVsSlipGraph[3][2];
1286
1294 PxU32 mType;
1295
1301 PX_FORCE_INLINE PxReal getRecipLongitudinalStiffnessPerUnitGravity() const {return mRecipLongitudinalStiffnessPerUnitGravity;}
1302
1308 PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx1Minusx0() const {return mFrictionVsSlipGraphRecipx1Minusx0;}
1309
1315 PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx2Minusx1() const {return mFrictionVsSlipGraphRecipx2Minusx1;}
1316
1317private:
1318
1326 PxReal mRecipLongitudinalStiffnessPerUnitGravity;
1327
1335 PxReal mFrictionVsSlipGraphRecipx1Minusx0;
1336
1344 PxReal mFrictionVsSlipGraphRecipx2Minusx1;
1345
1346 PxReal mPad[2];
1347
1348 bool isValid() const;
1349};
1350PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleTireData)& 0x0f));
1351#if !PX_DOXYGEN
1352} // namespace physx
1353#endif
1354
1355#endif
Definition PxCoreUtilityTypes.h:113
3 Element vector class.
Definition PxVec3.h:50
Definition PxVehicleComponents.h:579
PxReal mAccuracy
Accuracy of Ackermann steer calculation.
Definition PxVehicleComponents.h:607
PxReal mRearWidth
Distance between center-point of the two rear wheels.
Definition PxVehicleComponents.h:625
PxReal mAxleSeparation
Distance between center of front axle and center of rear axle.
Definition PxVehicleComponents.h:634
PxReal mFrontWidth
Distance between center-point of the two front wheels.
Definition PxVehicleComponents.h:616
Definition PxVehicleComponents.h:1136
Definition PxVehicleComponents.h:344
PxReal getLatency() const
Get the latency time of the autobox.
Definition PxVehicleComponents.h:405
void setLatency(const PxReal latency)
Set the latency time of the autobox.
Definition PxVehicleComponents.h:393
Definition PxVehicleComponents.h:44
PxVec3 mMOI
Moment of inertia of vehicle rigid body actor.
Definition PxVehicleComponents.h:61
PxVec3 mCMOffset
Center of mass offset of vehicle rigid body actor.
Definition PxVehicleComponents.h:75
PxReal mMass
Mass of vehicle rigid body actor.
Definition PxVehicleComponents.h:68
Definition PxVehicleComponents.h:661
PxVehicleClutchAccuracyMode::Enum mAccuracyMode
The engine and wheel rotation speeds that are coupled through the clutch can be updated by choosing o...
Definition PxVehicleComponents.h:707
PxU32 mEstimateIterations
Tune the mathematical accuracy and computational cost of the computed estimate to the wheel and engin...
Definition PxVehicleComponents.h:720
PxReal mStrength
Strength of clutch.
Definition PxVehicleComponents.h:691
Definition PxVehicleComponents.h:427
PxReal mFrontRearSplit
Ratio of torque split between front and rear (>0.5 means more to front, <0.5 means more to rear).
Definition PxVehicleComponents.h:461
PxReal mRearBias
Maximum allowed ratio of rear-left and rear-right wheel rotation speeds. The differential will divert...
Definition PxVehicleComponents.h:509
PxReal mFrontBias
Maximum allowed ratio of front-left and front-right wheel rotation speeds. The differential will dive...
Definition PxVehicleComponents.h:499
PxReal mFrontLeftRightSplit
Ratio of torque split between front-left and front-right (>0.5 means more to front-left,...
Definition PxVehicleComponents.h:470
PxReal mCentreBias
Maximum allowed ratio of average front wheel rotation speed and rear wheel rotation speeds The differ...
Definition PxVehicleComponents.h:489
PxVehicleDifferential4WData::Enum mType
Type of differential.
Definition PxVehicleComponents.h:516
PxReal mRearLeftRightSplit
Ratio of torque split between rear-left and rear-right (>0.5 means more to rear-left,...
Definition PxVehicleComponents.h:479
Definition PxVehicleComponents.h:532
Data structure describing the drive model components of a vehicle with up to 4 driven wheels and up t...
Definition PxVehicleDrive4W.h:56
Data structure describing configuration data of a vehicle with up to PX_MAX_NB_WHEELS driven equally ...
Definition PxVehicleDriveNW.h:55
Data structure describing non-wheel configuration data of a vehicle that has engine,...
Definition PxVehicleDrive.h:53
Definition PxVehicleComponents.h:86
PxReal mMaxOmega
Maximum rotation speed of the engine.
Definition PxVehicleComponents.h:144
PxReal mPeakTorque
Maximum torque available to apply to the engine when the accelerator pedal is at maximum.
Definition PxVehicleComponents.h:135
PxReal mDampingRateZeroThrottleClutchEngaged
Damping rate of engine when full throttle is applied.
Definition PxVehicleComponents.h:179
PX_FORCE_INLINE PxReal getRecipMOI() const
Return value of mRecipMOI(=1.0f/mMOI) that is automatically set by PxVehicleDriveSimData::setEngineDa...
Definition PxVehicleComponents.h:201
PxReal mDampingRateFullThrottle
Damping rate of engine when full throttle is applied.
Definition PxVehicleComponents.h:161
PxReal mDampingRateZeroThrottleClutchDisengaged
Damping rate of engine when full throttle is applied.
Definition PxVehicleComponents.h:196
PxReal mMOI
Moment of inertia of the engine around the axis of rotation.
Definition PxVehicleComponents.h:124
PxFixedSizeLookupTable< eMAX_NB_ENGINE_TORQUE_CURVE_ENTRIES > mTorqueCurve
Graph of normalized torque (torque/mPeakTorque) against normalized engine speed ( engineRotationSpeed...
Definition PxVehicleComponents.h:117
PX_FORCE_INLINE PxReal getRecipMaxOmega() const
Return value of mRecipMaxOmega( = 1.0f / mMaxOmega ) that is automatically set by PxVehicleDriveSimDa...
Definition PxVehicleComponents.h:206
Definition PxVehicleComponents.h:239
PxReal mSwitchTime
Time it takes to switch gear.
Definition PxVehicleComponents.h:326
PxU32 mNbRatios
Number of gears (including reverse and neutral).
Definition PxVehicleComponents.h:317
PxReal mFinalRatio
Gear ratio applied is mRatios[currentGear]*finalRatio.
Definition PxVehicleComponents.h:310
Definition PxVehicleComponents.h:957
PxReal mCamberAtRest
Camber angle (in radians) of wheel when the suspension is at its rest position.
Definition PxVehicleComponents.h:1054
PxReal mCamberAtMaxCompression
Camber angle (in radians) of wheel when the suspension is at maximum compression.
Definition PxVehicleComponents.h:1066
PxReal mCamberAtMaxDroop
Camber angle (in radians) of wheel when the suspension is at maximum droop.
Definition PxVehicleComponents.h:1078
PX_FORCE_INLINE PxReal getRecipMaxCompression() const
Reciprocal of maximum compression.
Definition PxVehicleComponents.h:1087
PX_FORCE_INLINE PxReal getRecipMaxDroop() const
Reciprocal of maximum droop.
Definition PxVehicleComponents.h:1096
PxReal mMaxDroop
Maximum elongation allowed by suspension spring.
Definition PxVehicleComponents.h:1010
void setMassAndPreserveNaturalFrequency(const PxReal newSprungMass)
Set a new sprung mass for the suspension and modify the spring strength so that the natural frequency...
Definition PxVehicleComponents.h:1103
PxReal mSpringDamperRate
Spring damper rate of suspension unit.
Definition PxVehicleComponents.h:992
PxReal mSpringStrength
Spring strength of suspension unit.
Definition PxVehicleComponents.h:983
PxReal mSprungMass
Mass of vehicle that is supported by suspension spring.
Definition PxVehicleComponents.h:1044
PxReal mMaxCompression
Maximum compression allowed by suspension spring.
Definition PxVehicleComponents.h:1001
Definition PxVehicleComponents.h:1176
PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx2Minusx1() const
Return Cached value of 1.0f/(mFrictionVsSlipGraph[2][0]-mFrictionVsSlipGraph[1][0])
Definition PxVehicleComponents.h:1315
PX_FORCE_INLINE PxReal getRecipLongitudinalStiffnessPerUnitGravity() const
Return Cached value of 1.0/mLongitudinalStiffnessPerUnitGravity.
Definition PxVehicleComponents.h:1301
PxReal mLatStiffX
Tire lateral stiffness is a graph of tire load that has linear behavior near zero load and flattens a...
Definition PxVehicleComponents.h:1207
PxReal mCamberStiffnessPerUnitGravity
tire Tire camber stiffness per unity gravitational acceleration.
Definition PxVehicleComponents.h:1250
PxU32 mType
Tire type denoting slicks, wets, snow, winter, summer, all-terrain, mud etc.
Definition PxVehicleComponents.h:1294
PxReal mLongitudinalStiffnessPerUnitGravity
Tire Longitudinal stiffness per unit gravitational acceleration.
Definition PxVehicleComponents.h:1237
PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx1Minusx0() const
Return Cached value of 1.0f/(mFrictionVsSlipGraph[1][0]-mFrictionVsSlipGraph[0][0])
Definition PxVehicleComponents.h:1308
PxReal mLatStiffY
Tire lateral stiffness is a graph of tire load that has linear behavior near zero load and flattens a...
Definition PxVehicleComponents.h:1224
Tire load variation can be strongly dependent on the time-step so it is a good idea to filter it to g...
Definition PxVehicleComponents.h:759
PxReal mMaxNormalisedLoad
Graph point (mMaxNormalisedLoad,mMaxFilteredNormalisedLoad)
Definition PxVehicleComponents.h:786
PxReal mMinFilteredNormalisedLoad
Graph point (mMinNormalisedLoad,mMinFilteredNormalisedLoad)
Definition PxVehicleComponents.h:781
PxReal mMaxFilteredNormalisedLoad
Graph point (mMaxNormalisedLoad,mMaxFilteredNormalisedLoad)
Definition PxVehicleComponents.h:791
PxReal mMinNormalisedLoad
Graph point (mMinNormalisedLoad,mMinFilteredNormalisedLoad)
Definition PxVehicleComponents.h:776
Definition PxVehicleUpdate.cpp:4519
Definition PxVehicleComponents.h:815
PxReal mMaxSteer
Max steer angle that can be achieved by the wheel.
Definition PxVehicleComponents.h:905
PxReal mMaxHandBrakeTorque
Max handbrake torque that can be applied to wheel.
Definition PxVehicleComponents.h:896
PX_FORCE_INLINE PxReal getRecipMOI() const
Return value equal to 1.0f/mRecipMOI.
Definition PxVehicleComponents.h:928
PxReal mDampingRate
Damping rate applied to wheel.
Definition PxVehicleComponents.h:878
PxReal mMOI
Moment of inertia of unit that includes wheel plus tire about the rolling axis.
Definition PxVehicleComponents.h:869
PxReal mToeAngle
Wheel toe angle. This value is ignored by PxVehicleDriveTank and PxVehicleNoDrive.
Definition PxVehicleComponents.h:914
PxReal mRadius
Radius of unit that includes metal wheel plus rubber tire.
Definition PxVehicleComponents.h:842
PxReal mWidth
Maximum width of unit that includes wheel plus tire.
Definition PxVehicleComponents.h:851
PxReal mMass
Mass of unit that includes wheel plus tire.
Definition PxVehicleComponents.h:860
PxReal mMaxBrakeTorque
Max brake torque that can be applied to wheel.
Definition PxVehicleComponents.h:887
PX_FORCE_INLINE PxReal getRecipRadius() const
Return value equal to 1.0f/mRadius.
Definition PxVehicleComponents.h:921
Definition PxVehicleSuspWheelTire4.h:54
Data structure describing configuration data of a vehicle with up to 20 wheels.
Definition PxVehicleWheels.h:129
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_COMPILE_TIME_ASSERT(exp)
Definition PxPreprocessor.h:428
#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_FORCE_INLINE void * PxMemSet(void *dest, PxI32 c, PxU32 count)
Sets the bytes of the provided buffer to the specified value.
Definition PxMemory.h:67
PxEMPTY
Definition Px.h:87
Choose between a potentially more expensive but more accurate solution to the clutch model or a poten...
Definition PxVehicleComponents.h:652