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 ;
   255     void getRawData(
const PxU32 channel, 
PxReal* values) 
const;
   260     PxReal mChannelMinY[eMAX_NB_CHANNELS];
   261     PxReal mChannelMaxY[eMAX_NB_CHANNELS];
   263     PxReal mChannelMidY[eMAX_NB_CHANNELS];
   265     PxVec3 mChannelColorLow[eMAX_NB_CHANNELS];
   266     PxVec3 mChannelColorHigh[eMAX_NB_CHANNELS];
   268     char mChannelTitle[eMAX_NB_CHANNELS][eMAX_NB_TITLE_CHARS];
   270     PxReal mChannelSamples[eMAX_NB_CHANNELS][eMAX_NB_SAMPLES];
   288         (
const PxF32 graphSizeX, 
const PxF32 graphSizeY,
   289         const PxF32 engineGraphPosX, 
const PxF32 engineGraphPosY,
   290         const PxF32* 
const wheelGraphPosX, 
const PxF32* 
const wheelGraphPosY,
   291         const PxVec3& backgroundColor, 
const PxVec3& lineColorHigh, 
const PxVec3& lineColorLow);
   293     void updateTimeSlice(
const PxReal* 
const samples);
   295     void setChannel(PxVehicleGraphChannelDesc& desc, 
const PxU32 channel);
   297     void setupEngineGraph
   299         const PxVec3& backgoundColor, 
const PxVec3& lineColorHigh, 
const PxVec3& lineColorLow);
   303         const PxVec3& backgoundColor, 
const PxVec3& lineColorHigh, 
const PxVec3& lineColorLow);
   308 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));
   311 class PxVehicleTelemetryData
   315     friend class PxVehicleUpdate;
   321     static PxVehicleTelemetryData* allocate(
const PxU32 nbWheels);
   334          const PxReal engineGraphPosX, 
const PxReal engineGraphPosY,
   335          const PxReal* 
const wheelGraphPosX, 
const PxReal* 
const wheelGraphPosY,
   336          const PxVec3& backGroundColor, 
const PxVec3& lineColorHigh, 
const PxVec3& lineColorLow);
   346     const PxVehicleGraph& getEngineGraph()
 const {
return *mEngineGraph;}
   351     PxU32 getNbWheelGraphs()
 const {
return mNbActiveWheels;}
   356     const PxVehicleGraph& getWheelGraph(
const PxU32 k)
 const {
return mWheelGraphs[k];}
   361     const PxVec3* getTireforceAppPoints()
 const {
return mTireforceAppPoints;}
   366     const PxVec3* getSuspforceAppPoints()
 const {
return mSuspforceAppPoints;}
   375     PxVehicleGraph* mEngineGraph;
   382     PxVehicleGraph* mWheelGraphs;
   387     PxVec3* mTireforceAppPoints;
   392     PxVec3* mSuspforceAppPoints;
   397     PxU32 mNbActiveWheels;
   403     PxVehicleTelemetryData(){}
   404     ~PxVehicleTelemetryData(){}
   409 #endif //PX_DEBUG_VEHICLE_ON   418 #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:434
 
uint32_t PxU32
Definition: Px.h:48
 
3 Element vector class. 
Definition: PxVec3.h:49