PxVehicleComponents.h
Go to the documentation of this file.
1 //
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions
4 // are met:
5 // * Redistributions of source code must retain the above copyright
6 // notice, this list of conditions and the following disclaimer.
7 // * Redistributions in binary form must reproduce the above copyright
8 // notice, this list of conditions and the following disclaimer in the
9 // documentation and/or other materials provided with the distribution.
10 // * Neither the name of NVIDIA CORPORATION nor the names of its
11 // contributors may be used to endorse or promote products derived
12 // from this software without specific prior written permission.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
15 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 //
26 // Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
27 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
28 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
29 
30 #ifndef PX_VEHICLE_CORE_COMPONENTS_H
31 #define PX_VEHICLE_CORE_COMPONENTS_H
32 
36 #include "foundation/PxMemory.h"
37 #include "foundation/PxVec3.h"
39 #include "vehicle/PxVehicleSDK.h"
40 #include "common/PxTypeInfo.h"
41 
42 #if !PX_DOXYGEN
43 namespace physx
44 {
45 #endif
46 
48 {
49 public:
50 
52 
54  : mMOI(PxVec3(0,0,0)),
55  mMass(1500),
56  mCMOffset(PxVec3(0,0,0))
57  {
58  }
59 
66 
73 
80 
81 private:
82 
84 
85  bool isValid() const;
86 };
88 
90 {
91 public:
92 
93  friend class PxVehicleDriveSimData;
94 
95  enum
96  {
97  eMAX_NB_ENGINE_TORQUE_CURVE_ENTRIES = 8
98  };
99 
101  : mMOI(1.0f),
102  mPeakTorque(500.0f),
103  mMaxOmega(600.0f),
104  mDampingRateFullThrottle(0.15f),
105  mDampingRateZeroThrottleClutchEngaged(2.0f),
106  mDampingRateZeroThrottleClutchDisengaged(0.35f)
107  {
108  mTorqueCurve.addPair(0.0f, 0.8f);
109  mTorqueCurve.addPair(0.33f, 1.0f);
110  mTorqueCurve.addPair(1.0f, 0.8f);
111 
112  mRecipMOI=1.0f/mMOI;
113  mRecipMaxOmega=1.0f/mMaxOmega;
114  }
115 
122 
129 
140 
149 
166 
167 
184 
201 
205  PX_FORCE_INLINE PxReal getRecipMOI() const {return mRecipMOI;}
206 
210  PX_FORCE_INLINE PxReal getRecipMaxOmega() const {return mRecipMaxOmega;}
211 
212 private:
213 
222 
231 
232  bool isValid() const;
233 
234 
235 //serialization
236 public:
237  PxVehicleEngineData(const PxEMPTY) : mTorqueCurve(PxEmpty) {}
238 //~serialization
239 };
240 PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleEngineData)& 0x0f));
241 
243 {
244 public:
245 
246  friend class PxVehicleDriveSimData;
247 
248  enum Enum
249  {
250  eREVERSE=0,
282  eGEARSRATIO_COUNT
283  };
284 
286  : mFinalRatio(4.0f),
287  mNbRatios(7),
288  mSwitchTime(0.5f)
289  {
290  mRatios[PxVehicleGearsData::eREVERSE]=-4.0f;
291  mRatios[PxVehicleGearsData::eNEUTRAL]=0.0f;
292  mRatios[PxVehicleGearsData::eFIRST]=4.0f;
293  mRatios[PxVehicleGearsData::eSECOND]=2.0f;
294  mRatios[PxVehicleGearsData::eTHIRD]=1.5f;
295  mRatios[PxVehicleGearsData::eFOURTH]=1.1f;
296  mRatios[PxVehicleGearsData::eFIFTH]=1.0f;
297 
299  mRatios[i]=0.f;
300  }
301 
308 
315 
322 
331 
332 private:
333 
335 
336  bool isValid() const;
337 
338 //serialization
339 public:
341  PxReal getGearRatio(PxVehicleGearsData::Enum a) const {return mRatios[a];}
342  void setGearRatio(PxVehicleGearsData::Enum a, PxReal ratio) { mRatios[a] = ratio;}
343 //~serialization
344 };
345 PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleGearsData)& 0x0f));
346 
348 {
349 public:
350 
351  friend class PxVehicleDriveSimData;
352 
354  {
356  {
357  mUpRatios[i]=0.65f;
358  mDownRatios[i]=0.50f;
359  }
360  //Not sure how important this is but we want to kick out of neutral very quickly.
361  mUpRatios[PxVehicleGearsData::eNEUTRAL]=0.15f;
362  //Set the latency time in an unused element of one of the arrays.
363  mDownRatios[PxVehicleGearsData::eREVERSE]=2.0f;
364  }
365 
375 
385 
397  void setLatency(const PxReal latency)
398  {
399  mDownRatios[PxVehicleGearsData::eREVERSE]=latency;
400  }
401 
410  {
411  return mDownRatios[PxVehicleGearsData::eREVERSE];
412  }
413 
414 private:
415  bool isValid() const;
416 
417 //serialization
418 public:
420 
421  PxReal getUpRatios(PxVehicleGearsData::Enum a) const {return mUpRatios[a];}
422  void setUpRatios(PxVehicleGearsData::Enum a, PxReal ratio) { mUpRatios[a] = ratio;}
423 
424  PxReal getDownRatios(PxVehicleGearsData::Enum a) const {return mDownRatios[a];}
425  void setDownRatios(PxVehicleGearsData::Enum a, PxReal ratio) { mDownRatios[a] = ratio;}
426 //~serialization
427 };
428 PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleAutoBoxData)& 0x0f));
429 
431 {
432 public:
433 
435 
436  enum Enum
437  {
438  eDIFF_TYPE_LS_4WD, //limited slip differential for car with 4 driven wheels
439  eDIFF_TYPE_LS_FRONTWD, //limited slip differential for car with front-wheel drive
440  eDIFF_TYPE_LS_REARWD, //limited slip differential for car with rear-wheel drive
441  eDIFF_TYPE_OPEN_4WD, //open differential for car with 4 driven wheels
442  eDIFF_TYPE_OPEN_FRONTWD, //open differential for car with front-wheel drive
443  eDIFF_TYPE_OPEN_REARWD, //open differential for car with rear-wheel drive
444  eMAX_NB_DIFF_TYPES
445  };
446 
448  : mFrontRearSplit(0.45f),
449  mFrontLeftRightSplit(0.5f),
450  mRearLeftRightSplit(0.5f),
451  mCentreBias(1.3f),
452  mFrontBias(1.3f),
453  mRearBias(1.3f),
454  mType(PxVehicleDifferential4WData::eDIFF_TYPE_LS_4WD)
455  {
456  }
457 
466 
475 
484 
494 
504 
514 
521 
522 private:
523 
524  PxReal mPad[1];
525 
526  bool isValid() const;
527 
528 //serialization
529 public:
531 //~serialization
532 };
534 
536 {
537 public:
538 
540  friend class PxVehicleUpdate;
541 
543  {
544  PxMemSet(mBitmapBuffer, 0, sizeof(PxU32) * (((PX_MAX_NB_WHEELS + 31) & ~31) >> 5));
545  mNbDrivenWheels=0;
546  mInvNbDrivenWheels=0.0f;
547  }
548 
556  void setDrivenWheel(const PxU32 wheelId, const bool drivenState);
557 
561  bool getIsDrivenWheel(const PxU32 wheelId) const;
562 
563 private:
564 
565  PxU32 mBitmapBuffer[((PX_MAX_NB_WHEELS + 31) & ~31) >> 5];
569 
570  bool isValid() const;
571 
572 //serialization
573 public:
575  PxU32 getDrivenWheelStatus() const;
576  void setDrivenWheelStatus(PxU32 status);
577 //~serialization
578 };
580 
581 
583 {
584 public:
585 
587 
589  : mAccuracy(1.0f),
590  mFrontWidth(0.0f), //Must be filled out
591  mRearWidth(0.0f), //Must be filled out
592  mAxleSeparation(0.0f) //Must be filled out
593  {
594  }
595 
612 
621 
630 
639 
640 private:
641 
642  bool isValid() const;
643 
644 //serialization
645 public:
647 //~serialization
648 };
650 
656 {
657  enum Enum
658  {
659  eESTIMATE = 0,
660  eBEST_POSSIBLE
661  };
662 };
663 
665 {
666 public:
667 
668  friend class PxVehicleDriveSimData;
669 
671  : mStrength(10.0f),
672  mAccuracyMode(PxVehicleClutchAccuracyMode::eBEST_POSSIBLE),
673  mEstimateIterations(5)
674  {
675  }
676 
696 
712 
725 
726 private:
727 
728  PxU8 mPad[4];
729 
730  bool isValid() const;
731 
732 //serialization
733 public:
735 //~serialization
736 };
737 PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleClutchData)& 0x0f));
738 
739 
763 {
764 public:
765 
767 
769  : mMinNormalisedLoad(0),
770  mMinFilteredNormalisedLoad(0.2308f),
771  mMaxNormalisedLoad(3.0f),
772  mMaxFilteredNormalisedLoad(3.0f)
773  {
774  mDenominator=1.0f/(mMaxNormalisedLoad - mMinNormalisedLoad);
775  }
776 
781 
786 
791 
796 
797  PX_FORCE_INLINE PxReal getDenominator() const {return mDenominator;}
798 
799 private:
800 
804  //1.0f/(mMaxNormalisedLoad-mMinNormalisedLoad) for quick calculations
806 
807  PxU32 mPad[3];
808 
809  bool isValid() const;
810 
811 //serialization
812 public:
814 //~serialization
815 };
817 
819 {
820 public:
821 
822  friend class PxVehicleWheels4SimData;
823 
825  : mRadius(0.0f), //Must be filled out
826  mWidth(0.0f),
827  mMass(20.0f),
828  mMOI(0.0f), //Must be filled out
829  mDampingRate(0.25f),
830  mMaxBrakeTorque(1500.0f),
831  mMaxHandBrakeTorque(0.0f),
832  mMaxSteer(0.0f),
833  mToeAngle(0.0f),
834  mRecipRadius(0.0f), //Must be filled out
835  mRecipMOI(0.0f) //Must be filled out
836  {
837  }
838 
847 
856 
865 
874 
883 
892 
901 
910 
918  PxReal mToeAngle;//in radians
919 
925  PX_FORCE_INLINE PxReal getRecipRadius() const {return mRecipRadius;}
926 
932  PX_FORCE_INLINE PxReal getRecipMOI() const {return mRecipMOI;}
933 
934 private:
935 
944 
953 
954  PxReal mPad[1];
955 
956  bool isValid() const;
957 };
958 PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleWheelData)& 0x0f));
959 
961 {
962 public:
963 
964  friend class PxVehicleWheels4SimData;
965 
967  : mSpringStrength(0.0f),
968  mSpringDamperRate(0.0f),
969  mMaxCompression(0.3f),
970  mMaxDroop(0.1f),
971  mSprungMass(0.0f),
972  mCamberAtRest(0.0f),
973  mCamberAtMaxCompression(0.0f),
974  mCamberAtMaxDroop(0.0f),
975  mRecipMaxCompression(1.0f),
976  mRecipMaxDroop(1.0f)
977  {
978  }
979 
988 
997 
1006 
1015 
1048 
1058 
1070 
1082 
1090  PX_FORCE_INLINE PxReal getRecipMaxCompression() const {return mRecipMaxCompression;}
1091 
1099  PX_FORCE_INLINE PxReal getRecipMaxDroop() const {return mRecipMaxDroop;}
1100 
1106  void setMassAndPreserveNaturalFrequency(const PxReal newSprungMass)
1107  {
1108  const PxF32 oldStrength = mSpringStrength;
1109  const PxF32 oldSprungMass = mSprungMass;
1110  const PxF32 newStrength = oldStrength * (newSprungMass / oldSprungMass);
1111  mSpringStrength = newStrength;
1112  mSprungMass = newSprungMass;
1113  }
1114 
1115 private:
1116 
1123 
1130 
1131  //padding
1132  PxReal mPad[2];
1133 
1134  bool isValid() const;
1135 };
1137 
1139 {
1140 public:
1141 
1143 
1145  : mWheel0(0xffffffff),
1146  mWheel1(0xffffffff),
1147  mStiffness(0.0f)
1148  {
1149  }
1150 
1151  /*
1152  \brief The anti-roll bar connects two wheels with indices mWheel0 and mWheel1
1153  */
1155 
1156  /*
1157  \brief The anti-roll bar connects two wheels with indices mWheel0 and mWheel1
1158  */
1160 
1161  /*
1162  \brief The stiffness of the anti-roll bar.
1163 
1164  \note Specified in kilograms per second-squared (kg s^-2).
1165 
1166  <b>Range:</b> [0, PX_MAX_F32)<br>
1167  */
1169 
1170 private:
1171 
1172  PxF32 mPad[1];
1173 
1174  bool isValid() const;
1175 };
1177 
1179 {
1180 public:
1181  friend class PxVehicleWheels4SimData;
1182 
1184  : mLatStiffX(2.0f),
1185  mLatStiffY(0.3125f*(180.0f / PxPi)),
1186  mLongitudinalStiffnessPerUnitGravity(1000.0f),
1187  mCamberStiffnessPerUnitGravity(0.1f*(180.0f / PxPi)),
1188  mType(0)
1189  {
1190  mFrictionVsSlipGraph[0][0]=0.0f;
1191  mFrictionVsSlipGraph[0][1]=1.0f;
1192  mFrictionVsSlipGraph[1][0]=0.1f;
1193  mFrictionVsSlipGraph[1][1]=1.0f;
1194  mFrictionVsSlipGraph[2][0]=1.0f;
1195  mFrictionVsSlipGraph[2][1]=1.0f;
1196 
1197  mRecipLongitudinalStiffnessPerUnitGravity=1.0f/mLongitudinalStiffnessPerUnitGravity;
1198 
1199  mFrictionVsSlipGraphRecipx1Minusx0=1.0f/(mFrictionVsSlipGraph[1][0]-mFrictionVsSlipGraph[0][0]);
1200  mFrictionVsSlipGraphRecipx2Minusx1=1.0f/(mFrictionVsSlipGraph[2][0]-mFrictionVsSlipGraph[1][0]);
1201  }
1202 
1211 
1228 
1241 
1254 
1288  PxReal mFrictionVsSlipGraph[3][2];
1289 
1298 
1304  PX_FORCE_INLINE PxReal getRecipLongitudinalStiffnessPerUnitGravity() const {return mRecipLongitudinalStiffnessPerUnitGravity;}
1305 
1311  PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx1Minusx0() const {return mFrictionVsSlipGraphRecipx1Minusx0;}
1312 
1318  PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx2Minusx1() const {return mFrictionVsSlipGraphRecipx2Minusx1;}
1319 
1320 private:
1321 
1330 
1339 
1348 
1349  PxReal mPad[2];
1350 
1351  bool isValid() const;
1352 };
1353 PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleTireData)& 0x0f));
1354 #if !PX_DOXYGEN
1355 } // namespace physx
1356 #endif
1357 
1359 #endif //PX_VEHICLE_CORE_COMPONENTS_H
Definition: GuContactBuffer.h:37
Definition: PxVehicleComponents.h:256
PX_FORCE_INLINE PxReal getRecipRadius() const
Return value equal to 1.0f/mRadius.
Definition: PxVehicleComponents.h:925
PxU32 mWheel1
Definition: PxVehicleComponents.h:1159
PxReal mCamberStiffnessPerUnitGravity
tire Tire camber stiffness per unity gravitational acceleration.
Definition: PxVehicleComponents.h:1253
PxVehicleAntiRollBarData()
Definition: PxVehicleComponents.h:1144
PxU32 mPad
Definition: PxVehicleComponents.h:568
PxVehicleClutchAccuracyMode::Enum mAccuracyMode
The engine and wheel rotation speeds that are coupled through the clutch can be updated by choosing o...
Definition: PxVehicleComponents.h:711
PxReal mMaxCompression
Maximum compression allowed by suspension spring.
Definition: PxVehicleComponents.h:1005
Enum
Definition: PxVehicleComponents.h:436
#define PX_MAX_NB_WHEELS
This number is the maximum number of wheels allowed for a vehicle.
Definition: PxVehicleSDK.h:81
PxReal mRecipMOI
Reciprocal of the engine moment of inertia.
Definition: PxVehicleComponents.h:221
PxReal mRecipRadius
Reciprocal of radius of unit that includes metal wheel plus rubber tire.
Definition: PxVehicleComponents.h:943
PxVehicleTireLoadFilterData(const PxEMPTY)
Definition: PxVehicleComponents.h:813
Definition: PxVehicleComponents.h:430
PxReal mRearBias
Maximum allowed ratio of rear-left and rear-right wheel rotation speeds. The differential will divert...
Definition: PxVehicleComponents.h:513
Definition: PxVehicleComponents.h:253
PxReal pad
Definition: PxVehicleComponents.h:83
Definition: PxVehicleComponents.h:960
PxReal mAxleSeparation
Distance between center of front axle and center of rear axle.
Definition: PxVehicleComponents.h:638
PxU32 mType
Tire type denoting slicks, wets, snow, winter, summer, all-terrain, mud etc.
Definition: PxVehicleComponents.h:1297
float PxF32
Definition: PxSimpleTypes.h:76
Definition: PxVehicleComponents.h:272
Definition: PxVehicleComponents.h:280
PxVehicleClutchData()
Definition: PxVehicleComponents.h:670
PxReal mMaxNormalisedLoad
Graph point (mMaxNormalisedLoad,mMaxFilteredNormalisedLoad)
Definition: PxVehicleComponents.h:790
PxReal mRecipMaxCompression
Cached value of 1.0f/mMaxCompression.
Definition: PxVehicleComponents.h:1122
static const float PxPi
Definition: PxMath.h:58
Definition: PxVehicleComponents.h:261
Definition: PxVehicleComponents.h:270
Definition: PxVehicleComponents.h:818
PxReal mMaxSteer
Max steer angle that can be achieved by the wheel.
Definition: PxVehicleComponents.h:909
Definition: PxVehicleComponents.h:664
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:351
Definition: PxVehicleComponents.h:1178
float PxReal
Definition: PxSimpleTypes.h:78
PxReal mFrictionVsSlipGraphRecipx2Minusx1
Cached value of 1.0f/(mFrictionVsSlipGraph[2][0]-mFrictionVsSlipGraph[1][0])
Definition: PxVehicleComponents.h:1347
PxReal mFrontWidth
Distance between center-point of the two front wheels.
Definition: PxVehicleComponents.h:620
void setGearRatio(PxVehicleGearsData::Enum a, PxReal ratio)
Definition: PxVehicleComponents.h:342
Definition: PxVehicleComponents.h:267
Definition: PxVehicleComponents.h:439
Definition: PxVehicleComponents.h:440
PxReal mRadius
Radius of unit that includes metal wheel plus rubber tire.
Definition: PxVehicleComponents.h:846
PxReal mSpringDamperRate
Spring damper rate of suspension unit.
Definition: PxVehicleComponents.h:996
Choose between a potentially more expensive but more accurate solution to the clutch model or a poten...
Definition: PxVehicleComponents.h:655
Definition: PxVehicleComponents.h:441
Definition: PxVehicleComponents.h:252
Definition: PxVehicleComponents.h:269
void setDownRatios(PxVehicleGearsData::Enum a, PxReal ratio)
Definition: PxVehicleComponents.h:425
PxVehicleDifferential4WData(const PxEMPTY)
Definition: PxVehicleComponents.h:530
PX_FORCE_INLINE PxReal getRecipMaxCompression() const
Reciprocal of maximum compression.
Definition: PxVehicleComponents.h:1090
PxReal mRecipMaxOmega
Reciprocal of the maximum rotation speed of the engine.
Definition: PxVehicleComponents.h:230
PxU32 mNbRatios
Number of gears (including reverse and neutral).
Definition: PxVehicleComponents.h:321
Definition: PxVehicleComponents.h:279
PxReal mCamberAtMaxCompression
Camber angle (in radians) of wheel when the suspension is at maximum compression. ...
Definition: PxVehicleComponents.h:1069
PxVehicleAckermannGeometryData()
Definition: PxVehicleComponents.h:588
PxReal mSwitchTime
Time it takes to switch gear.
Definition: PxVehicleComponents.h:330
PxReal mMaxOmega
Maximum rotation speed of the engine.
Definition: PxVehicleComponents.h:148
Definition: PxVehicleComponents.h:264
bool isValid() const
Test that a PxVehicleDriveSimData instance has been configured with legal data. Call only after setti...
PxVehicleDifferentialNWData()
Definition: PxVehicleComponents.h:542
PxReal getGearRatio(PxVehicleGearsData::Enum a) const
Definition: PxVehicleComponents.h:341
PxReal mDenominator
Not necessary to set this value.
Definition: PxVehicleComponents.h:805
PX_FORCE_INLINE PxReal getDenominator() const
Definition: PxVehicleComponents.h:797
PX_FORCE_INLINE PxReal getRecipMaxOmega() const
Return value of mRecipMaxOmega( = 1.0f / mMaxOmega ) that is automatically set by PxVehicleDriveSimDa...
Definition: PxVehicleComponents.h:210
PxReal mMaxBrakeTorque
Max brake torque that can be applied to wheel.
Definition: PxVehicleComponents.h:891
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:1106
PxVec3 mMOI
Moment of inertia of vehicle rigid body actor.
Definition: PxVehicleComponents.h:65
PxVehicleTireData()
Definition: PxVehicleComponents.h:1183
Definition: PxVehicleComponents.h:442
PxF32 mStiffness
Definition: PxVehicleComponents.h:1168
PxReal getDownRatios(PxVehicleGearsData::Enum a) const
Definition: PxVehicleComponents.h:424
PxReal getUpRatios(PxVehicleGearsData::Enum a) const
Definition: PxVehicleComponents.h:421
Data structure describing non-wheel configuration data of a vehicle that has engine, gears, clutch, and auto-box.
Definition: PxVehicleDrive.h:56
Definition: PxVehicleComponents.h:271
PxReal mCamberAtRest
Camber angle (in radians) of wheel when the suspension is at its rest position.
Definition: PxVehicleComponents.h:1057
Definition: PxVehicleComponents.h:255
PX_FORCE_INLINE PxReal getRecipLongitudinalStiffnessPerUnitGravity() const
Return Cached value of 1.0/mLongitudinalStiffnessPerUnitGravity.
Definition: PxVehicleComponents.h:1304
Definition: PxVehicleComponents.h:266
PxReal mDampingRateZeroThrottleClutchDisengaged
Damping rate of engine when full throttle is applied.
Definition: PxVehicleComponents.h:200
PxReal mPad
Definition: PxVehicleComponents.h:334
PxVehicleAckermannGeometryData(const PxEMPTY)
Definition: PxVehicleComponents.h:646
Definition: PxVehicleComponents.h:274
PxVehicleSuspensionData()
Definition: PxVehicleComponents.h:966
Definition: PxVehicleComponents.h:258
Data structure describing configuration data of a vehicle with up to 20 wheels.
Definition: PxVehicleWheels.h:123
Definition: PxVehicleComponents.h:89
PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleChassisData)&0x0f))
Data structure describing configuration data of a vehicle with up to PX_MAX_NB_WHEELS driven equally ...
Definition: PxVehicleDriveNW.h:58
Enum
Definition: PxVehicleComponents.h:248
PxFixedSizeLookupTable< eMAX_NB_ENGINE_TORQUE_CURVE_ENTRIES > mTorqueCurve
Graph of normalized torque (torque/mPeakTorque) against normalized engine speed ( engineRotationSpeed...
Definition: PxVehicleComponents.h:121
PxReal mStrength
Strength of clutch.
Definition: PxVehicleComponents.h:695
Definition: PxVehicleComponents.h:257
Definition: PxVehicleComponents.h:263
PxReal mMOI
Moment of inertia of unit that includes wheel plus tire about the rolling axis.
Definition: PxVehicleComponents.h:873
PxReal mRearWidth
Distance between center-point of the two rear wheels.
Definition: PxVehicleComponents.h:629
Definition: PxVehicleComponents.h:281
PxU32 mNbDrivenWheels
Definition: PxVehicleComponents.h:566
bool isValid() const
Test if the 4W-drive simulation data has been setup with legal data.
Definition: PxVehicleComponents.h:262
PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx2Minusx1() const
Return Cached value of 1.0f/(mFrictionVsSlipGraph[2][0]-mFrictionVsSlipGraph[1][0]) ...
Definition: PxVehicleComponents.h:1318
PxReal getLatency() const
Get the latency time of the autobox.
Definition: PxVehicleComponents.h:409
PxReal mToeAngle
Wheel toe angle. This value is ignored by PxVehicleDriveTank and PxVehicleNoDrive.
Definition: PxVehicleComponents.h:918
PX_FORCE_INLINE PxReal getRecipMOI() const
Return value of mRecipMOI(=1.0f/mMOI) that is automatically set by PxVehicleDriveSimData::setEngineDa...
Definition: PxVehicleComponents.h:205
PxReal mMaxFilteredNormalisedLoad
Graph point (mMaxNormalisedLoad,mMaxFilteredNormalisedLoad)
Definition: PxVehicleComponents.h:795
Definition: PxVehicleComponents.h:47
Definition: PxVehicleComponents.h:277
PxVehicleGearsData()
Definition: PxVehicleComponents.h:285
PxReal mFrictionVsSlipGraphRecipx1Minusx0
Cached value of 1.0f/(mFrictionVsSlipGraph[1][0]-mFrictionVsSlipGraph[0][0])
Definition: PxVehicleComponents.h:1338
PxReal mCentreBias
Maximum allowed ratio of average front wheel rotation speed and rear wheel rotation speeds The differ...
Definition: PxVehicleComponents.h:493
PxReal mRecipLongitudinalStiffnessPerUnitGravity
Cached value of 1.0/mLongitudinalStiffnessPerUnitGravity.
Definition: PxVehicleComponents.h:1329
uint8_t PxU8
Definition: PxSimpleTypes.h:75
PxReal mInvNbDrivenWheels
Definition: PxVehicleComponents.h:567
PxReal mAccuracy
Accuracy of Ackermann steer calculation.
Definition: PxVehicleComponents.h:611
PxReal mFinalRatio
Gear ratio applied is mRatios[currentGear]*finalRatio.
Definition: PxVehicleComponents.h:314
PxVehicleEngineData()
Definition: PxVehicleComponents.h:100
PxVehicleAutoBoxData()
Definition: PxVehicleComponents.h:353
Definition: PxVehicleComponents.h:276
PxReal mDampingRate
Damping rate applied to wheel.
Definition: PxVehicleComponents.h:882
PxReal mLatStiffX
Tire lateral stiffness is a graph of tire load that has linear behavior near zero load and flattens a...
Definition: PxVehicleComponents.h:1210
PxReal mRearLeftRightSplit
Ratio of torque split between rear-left and rear-right (>0.5 means more to rear-left, <0.5 means more to rear-right).
Definition: PxVehicleComponents.h:483
Enum
Definition: PxVehicleComponents.h:657
PxVehicleEngineData(const PxEMPTY)
Definition: PxVehicleComponents.h:237
PX_FORCE_INLINE PxReal getFrictionVsSlipGraphRecipx1Minusx0() const
Return Cached value of 1.0f/(mFrictionVsSlipGraph[1][0]-mFrictionVsSlipGraph[0][0]) ...
Definition: PxVehicleComponents.h:1311
PxReal mSprungMass
Mass of vehicle that is supported by suspension spring.
Definition: PxVehicleComponents.h:1047
PxReal mRecipMaxDroop
Cached value of 1.0f/mMaxDroop.
Definition: PxVehicleComponents.h:1129
PxReal mWidth
Maximum width of unit that includes wheel plus tire.
Definition: PxVehicleComponents.h:855
Definition: PxVehicleComponents.h:1138
void setUpRatios(PxVehicleGearsData::Enum a, PxReal ratio)
Definition: PxVehicleComponents.h:422
Definition: PxVehicleComponents.h:443
PxVehicleDifferential4WData()
Definition: PxVehicleComponents.h:447
Definition: PxVehicleComponents.h:259
PxReal mMass
Mass of vehicle rigid body actor.
Definition: PxVehicleComponents.h:72
PxReal mRecipMOI
Reciprocal of moment of inertia of unit that includes wheel plus tire about single allowed axis of ro...
Definition: PxVehicleComponents.h:952
PxReal mSpringStrength
Spring strength of suspension unit.
Definition: PxVehicleComponents.h:987
PxReal mFrontBias
Maximum allowed ratio of front-left and front-right wheel rotation speeds. The differential will dive...
Definition: PxVehicleComponents.h:503
Definition: PxVehicleComponents.h:438
PxReal mMinNormalisedLoad
Graph point (mMinNormalisedLoad,mMinFilteredNormalisedLoad)
Definition: PxVehicleComponents.h:780
PX_FORCE_INLINE PxReal getRecipMOI() const
Return value equal to 1.0f/mRecipMOI.
Definition: PxVehicleComponents.h:932
Definition: PxVehicleComponents.h:251
void setLatency(const PxReal latency)
Set the latency time of the autobox.
Definition: PxVehicleComponents.h:397
PxReal mDampingRateZeroThrottleClutchEngaged
Damping rate of engine when full throttle is applied.
Definition: PxVehicleComponents.h:183
PxReal mMaxHandBrakeTorque
Max handbrake torque that can be applied to wheel.
Definition: PxVehicleComponents.h:900
PxVehicleDifferentialNWData(const PxEMPTY)
Definition: PxVehicleComponents.h:574
PxReal mMass
Mass of unit that includes wheel plus tire.
Definition: PxVehicleComponents.h:864
PxEMPTY
Definition: Px.h:70
PxVehicleDifferential4WData::Enum mType
Type of differential.
Definition: PxVehicleComponents.h:520
PxReal mCamberAtMaxDroop
Camber angle (in radians) of wheel when the suspension is at maximum droop.
Definition: PxVehicleComponents.h:1081
bool isValid() const
Test if wheel simulation data has been setup with legal values.
Definition: PxVehicleComponents.h:268
Definition: PxVehicleComponents.h:347
PxReal mMinFilteredNormalisedLoad
Graph point (mMinNormalisedLoad,mMinFilteredNormalisedLoad)
Definition: PxVehicleComponents.h:785
PxReal mLongitudinalStiffnessPerUnitGravity
Tire Longitudinal stiffness per unit gravitational acceleration.
Definition: PxVehicleComponents.h:1240
PxReal mMOI
Moment of inertia of the engine around the axis of rotation.
Definition: PxVehicleComponents.h:128
Definition: PxVehicleComponents.h:275
PxReal mDampingRateFullThrottle
Damping rate of engine when full throttle is applied.
Definition: PxVehicleComponents.h:165
PxVehicleGearsData(const PxEMPTY)
Definition: PxVehicleComponents.h:340
PxReal mFrontLeftRightSplit
Ratio of torque split between front-left and front-right (>0.5 means more to front-left, <0.5 means more to front-right).
Definition: PxVehicleComponents.h:474
Definition: PxVehicleComponents.h:254
PX_FORCE_INLINE PxReal getRecipMaxDroop() const
Reciprocal of maximum droop.
Definition: PxVehicleComponents.h:1099
Definition: PxVehicleComponents.h:535
Definition: PxVehicleComponents.h:242
PxVec3 mCMOffset
Center of mass offset of vehicle rigid body actor.
Definition: PxVehicleComponents.h:79
PxReal mPeakTorque
Maximum torque available to apply to the engine when the accelerator pedal is at maximum.
Definition: PxVehicleComponents.h:139
PxU32 mWheel0
Definition: PxVehicleComponents.h:1154
uint32_t PxU32
Definition: Px.h:48
Definition: PxVehicleComponents.h:273
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:762
PxVehicleChassisData()
Definition: PxVehicleComponents.h:53
Definition: PxVehicleComponents.h:582
PxVehicleAutoBoxData(const PxEMPTY)
Definition: PxVehicleComponents.h:419
Definition: PxVehicleComponents.h:265
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:465
PxReal mMaxDroop
Maximum elongation allowed by suspension spring.
Definition: PxVehicleComponents.h:1014
Definition: PxVehicleComponents.h:250
PxVehicleClutchData(const PxEMPTY)
Definition: PxVehicleComponents.h:734
Definition: PxVehicleComponents.h:282
Definition: PxVehicleComponents.h:260
PxU32 mEstimateIterations
Tune the mathematical accuracy and computational cost of the computed estimate to the wheel and engin...
Definition: PxVehicleComponents.h:724
PxVehicleWheelData()
Definition: PxVehicleComponents.h:824
PxReal mLatStiffY
Tire lateral stiffness is a graph of tire load that has linear behavior near zero load and flattens a...
Definition: PxVehicleComponents.h:1227
PxVehicleTireLoadFilterData()
Definition: PxVehicleComponents.h:768
3 Element vector class.
Definition: PxVec3.h:49
Data structure describing the drive model components of a vehicle with up to 4 driven wheels and up t...
Definition: PxVehicleDrive4W.h:59
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:68
Definition: PxVehicleComponents.h:278
Definition: Px.h:72