30 #ifndef PX_VEHICLE_UTILSTELEMETRY_H 31 #define PX_VEHICLE_UTILSTELEMETRY_H 45 #if PX_DEBUG_VEHICLE_ON 47 class PxVehicleGraphDesc
50 friend class PxVehicleGraph;
93 struct PxVehicleGraphChannelDesc
97 friend class PxVehicleGraph;
99 PxVehicleGraphChannelDesc();
134 bool isValid()
const;
137 struct PxVehicleWheelGraphChannel
144 eNORMALIZED_TIRELOAD,
148 eNORM_TIRE_LONG_FORCE,
150 eNORM_TIRE_LAT_FORCE,
151 eNORM_TIRE_ALIGNING_MOMENT,
152 eMAX_NB_WHEEL_CHANNELS
156 struct PxVehicleDriveGraphChannel
161 eENGINE_DRIVE_TORQUE,
167 eSTEER_RIGHT_CONTROL,
169 eMAX_NB_DRIVE_CHANNELS
173 struct PxVehicleGraphType
187 friend class PxVehicleTelemetryData;
188 friend class PxVehicleUpdate;
197 eMAX_NB_TITLE_CHARS=256
208 void setup(
const PxVehicleGraphDesc& desc,
const PxVehicleGraphType::Enum graphType);
213 void clearRecordedChannelData();
218 const PxVec3& getBackgroundColor()
const {
return mBackgroundColor;}
223 PxReal getBackgroundAlpha()
const {
return mBackgroundAlpha;}
233 void getBackgroundCoords(
PxReal& xMin,
PxReal& yMin,
PxReal& xMax,
PxReal& yMax)
const {xMin = mBackgroundMinX;xMax = mBackgroundMaxX;yMin = mBackgroundMinY;yMax = mBackgroundMaxY;}
242 void computeGraphChannel(
const PxU32 channel,
PxReal* xy,
PxVec3* colors,
char* title)
const;
247 PxF32 getLatestValue(
const PxU32 channel)
const ;
252 PxReal mChannelMinY[eMAX_NB_CHANNELS];
253 PxReal mChannelMaxY[eMAX_NB_CHANNELS];
255 PxReal mChannelMidY[eMAX_NB_CHANNELS];
257 PxVec3 mChannelColorLow[eMAX_NB_CHANNELS];
258 PxVec3 mChannelColorHigh[eMAX_NB_CHANNELS];
260 char mChannelTitle[eMAX_NB_CHANNELS][eMAX_NB_TITLE_CHARS];
262 PxReal mChannelSamples[eMAX_NB_CHANNELS][eMAX_NB_SAMPLES];
280 (
const PxF32 graphSizeX,
const PxF32 graphSizeY,
281 const PxF32 engineGraphPosX,
const PxF32 engineGraphPosY,
282 const PxF32*
const wheelGraphPosX,
const PxF32*
const wheelGraphPosY,
283 const PxVec3& backgroundColor,
const PxVec3& lineColorHigh,
const PxVec3& lineColorLow);
285 void updateTimeSlice(
const PxReal*
const samples);
287 void setChannel(PxVehicleGraphChannelDesc& desc,
const PxU32 channel);
289 void setupEngineGraph
291 const PxVec3& backgoundColor,
const PxVec3& lineColorHigh,
const PxVec3& lineColorLow);
295 const PxVec3& backgoundColor,
const PxVec3& lineColorHigh,
const PxVec3& lineColorLow);
300 PX_COMPILE_TIME_ASSERT(
PxU32(PxVehicleGraph::eMAX_NB_CHANNELS) >=
PxU32(PxVehicleWheelGraphChannel::eMAX_NB_WHEEL_CHANNELS) &&
PxU32(PxVehicleGraph::eMAX_NB_CHANNELS) >=
PxU32(PxVehicleDriveGraphChannel::eMAX_NB_DRIVE_CHANNELS));
303 class PxVehicleTelemetryData
307 friend class PxVehicleUpdate;
313 static PxVehicleTelemetryData* allocate(
const PxU32 nbWheels);
326 const PxReal engineGraphPosX,
const PxReal engineGraphPosY,
327 const PxReal*
const wheelGraphPosX,
const PxReal*
const wheelGraphPosY,
328 const PxVec3& backGroundColor,
const PxVec3& lineColorHigh,
const PxVec3& lineColorLow);
338 const PxVehicleGraph& getEngineGraph()
const {
return *mEngineGraph;}
343 PxU32 getNbWheelGraphs()
const {
return mNbActiveWheels;}
348 const PxVehicleGraph& getWheelGraph(
const PxU32 k)
const {
return mWheelGraphs[k];}
353 const PxVec3* getTireforceAppPoints()
const {
return mTireforceAppPoints;}
358 const PxVec3* getSuspforceAppPoints()
const {
return mSuspforceAppPoints;}
367 PxVehicleGraph* mEngineGraph;
374 PxVehicleGraph* mWheelGraphs;
379 PxVec3* mTireforceAppPoints;
384 PxVec3* mSuspforceAppPoints;
389 PxU32 mNbActiveWheels;
395 PxVehicleTelemetryData(){}
396 ~PxVehicleTelemetryData(){}
401 #endif //PX_DEBUG_VEHICLE_ON 410 #endif //PX_VEHICLE_UTILSTELEMETRY_H Definition: GuContactBuffer.h:37
float PxF32
Definition: PxSimpleTypes.h:76
float PxReal
Definition: PxSimpleTypes.h:78
uint32_t PxU32
Definition: PxSimpleTypes.h:71
#define PX_COMPILE_TIME_ASSERT(exp)
Definition: PxPreprocessor.h:447
uint32_t PxU32
Definition: Px.h:48
3 Element vector class.
Definition: PxVec3.h:49