TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
car.h
Go to the documentation of this file.
1/***************************************************************************
2
3 file : car.h
4 created : Sun Jan 30 12:00:15 CET 2000
5 copyright : (C) 2000-2024 by Eric Espie, Bernhard Wymann
6 email : berniw@bluewin.ch
7
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
25
26
27#ifndef __CARV1_H__
28#define __CARV1_H__
29
30#include <track.h>
31#include <plib/sg.h>
32
33#define CAR_IDENT 0
34
35#define MAX_NAME_LEN 32
36
37/* designation */
38#define FRNT_RGT 0
39#define FRNT_LFT 1
40#define REAR_RGT 2
41#define REAR_LFT 3
42#define FRNT 0
43#define REAR 1
44#define RIGHT 0
45#define LEFT 1
46
47
58/* structure access short cuts */
59#define _rimRadius(i) info.wheel[i].rimRadius
60#define _tireHeight(i) info.wheel[i].tireHeight
61#define _tireWidth(i) info.wheel[i].tireWidth
62#define _brakeDiskRadius(i) info.wheel[i].brakeDiskRadius
63#define _wheelRadius(i) info.wheel[i].wheelRadius
64
71
92/* structure access short cuts */
93#define _name info.name
94#define _teamname info.teamname
95#define _carName info.carName
96#define _category info.category
97#define _driverType info.driverType
98#define _skillLevel info.skillLevel
99#define _raceNumber info.raceNumber
100#define _startRank info.startRank
101#define _dimension info.dimension
102#define _dimension_x info.dimension.x
103#define _dimension_y info.dimension.y
104#define _dimension_z info.dimension.z
105#define _drvPos_x info.drvPos.x
106#define _drvPos_y info.drvPos.y
107#define _drvPos_z info.drvPos.z
108#define _bonnetPos_x info.bonnetPos.x
109#define _bonnetPos_y info.bonnetPos.y
110#define _bonnetPos_z info.bonnetPos.z
111#define _statGC info.statGC
112#define _statGC_x info.statGC.x
113#define _statGC_y info.statGC.y
114#define _statGC_z info.statGC.z
115#define _iconColor info.iconColor
116#define _tank info.tank
117#define _steerLock info.steerLock
118#define _exhaustNb info.visualAttr.exhaustNb
119#define _exhaustPos info.visualAttr.exhaustPos
120#define _exhaustPower info.visualAttr.exhaustPower
121
122#define RM_DRV_HUMAN 1
123#define RM_DRV_ROBOT 2
124
125
126#define RM_PENALTY_DRIVETHROUGH 1
127#define RM_PENALTY_STOPANDGO 2
128
136
137GF_TAILQ_HEAD(CarPenaltyHead, struct CarPenalty);
138
140typedef struct {
142 bool commitBestLapTime; /* If a rule violation happens (e.g. cutting a corner) the laptime is not commited (false) */
146 double curTime;
148 tdble currentMinSpeedForLap; // Min speed on current lap, reset on start line crossing
149 int laps;
152 int pos;
161 int event;
162 tCarPenaltyHead penaltyList;
165/* structure access */
166#define _bestLapTime race.bestLapTime
167#define _commitBestLapTime race.commitBestLapTime
168#define _deltaBestLapTime race.deltaBestLapTime
169#define _curLapTime race.curLapTime
170#define _curTime race.curTime
171#define _lastLapTime race.lastLapTime
172#define _topSpeed race.topSpeed
173#define _currentMinSpeedForLap race.currentMinSpeedForLap
174#define _laps race.laps
175#define _nbPitStops race.nbPitStops
176#define _remainingLaps race.remainingLaps
177#define _pos race.pos
178#define _timeBehindLeader race.timeBehindLeader
179#define _lapsBehindLeader race.lapsBehindLeader
180#define _timeBehindPrev race.timeBehindPrev
181#define _timeBeforeNext race.timeBeforeNext
182#define _distRaced race.distRaced
183#define _distFromStartLine race.distFromStartLine
184#define _pit race.pit
185#define _scheduledEventTime race.scheduledEventTime
186#define _event race.event
187#define _penaltyList race.penaltyList
188#define _penaltyTime race.penaltyTime
189
191typedef struct {
194 tdble speed; // total speed, sqrt(vx*vx + vy*vy + vz*vz)
195 sgMat4 posMat;
197 int state;
210#define RM_CAR_STATE_FINISH 0x00000100
211#define RM_CAR_STATE_PIT 0x00000001
212#define RM_CAR_STATE_DNF 0x00000002
213#define RM_CAR_STATE_PULLUP 0x00000004
214#define RM_CAR_STATE_PULLSIDE 0x00000008
215#define RM_CAR_STATE_PULLDN 0x00000010
216#define RM_CAR_STATE_OUT (RM_CAR_STATE_DNF | RM_CAR_STATE_FINISH)
217#define RM_CAR_STATE_NO_SIMU 0x000000FF
218#define RM_CAR_STATE_BROKEN 0x00000200
219#define RM_CAR_STATE_OUTOFGAS 0x00000400
220#define RM_CAR_STATE_ELIMINATED 0x00000800
221#define RM_CAR_STATE_SIMU_NO_MOVE 0x00010000
223
224} tPublicCar;
225/* structure access */
226#define _DynGC pub.DynGC
227#define _pos_X pub.DynGC.pos.x
228#define _pos_Y pub.DynGC.pos.y
229#define _pos_Z pub.DynGC.pos.z
230#define _pos_X_D posX
231#define _pos_Y_D posY
232#define _roll pub.DynGC.pos.ax
233#define _pitch pub.DynGC.pos.ay
234#define _yaw pub.DynGC.pos.az
235#define _yaw_rate pub.DynGC.vel.az
236#define _speed_x pub.DynGC.vel.x
237#define _speed_y pub.DynGC.vel.y
238#define _speed_z pub.DynGC.vel.z
239#define _accel_x pub.DynGC.acc.x
240#define _accel_y pub.DynGC.acc.y
241#define _accel_z pub.DynGC.acc.z
242#define _state pub.state
243#define _trkPos pub.trkPos
244#define _speed_X pub.DynGCg.vel.x
245#define _speed_Y pub.DynGCg.vel.y
246#define _corner_x(i) pub.corner[i].ax
247#define _corner_y(i) pub.corner[i].ay
248#define _posMat pub.posMat
249
251typedef struct {
255 int state;
263 tdble currentPressure; // current tire pressure considering temperature
264 tdble currentTemperature; // current temperature
265 tdble currentWear; // [0..1], 1 means totally worn (tread thickness 0)
266 tdble currentGraining; // [0..1], 1 means totally grained
268#define _ride(i) priv.wheel[i].relPos.z
269#define _brakeTemp(i) priv.wheel[i].brakeTemp
270#define _wheelSpinVel(i) priv.wheel[i].spinVel
271#define _wheelSeg(i) priv.wheel[i].seg
272#define _wheelSlipSide(i) priv.wheel[i].slipSide
273#define _wheelSlipAccel(i) priv.wheel[i].slipAccel
274#define _wheelFx(i) priv.wheel[i].Fx
275#define _wheelFy(i) priv.wheel[i].Fy
276#define _wheelFz(i) priv.wheel[i].Fz
277
278#define MAX_GEARS 10 /* including reverse and neutral */
279
285
287typedef struct {
289 void *carHandle;
294 int gear;
304 int gearNb;
310 float smoke;
314 int debug;
316 tdble localPressure; // Environment pressure at cars location
317 int repCmdMaxClicks; // Driver adjustable range for brake repartition during driving
318 int brakeRepartitionCmd; // Current clicks
319 tdble otherSurfaceContribution[4]; // Tire overlap to other surface [0..0.5]
320 tTrackSeg* otherSurfaceSeg[4]; // Other segment where the tire overlaps to
321
322} tPrivCar;
323/* structure access */
324#define _driverIndex priv.driverIndex
325#define _paramsHandle priv.paramsHandle
326#define _carHandle priv.carHandle
327#define _modName priv.modName
328#define _enginerpm priv.enginerpm
329#define _enginerpmRedLine priv.enginerpmRedLine
330#define _enginerpmMax priv.enginerpmMax
331#define _enginerpmMaxTq priv.enginerpmMaxTq
332#define _enginerpmMaxPw priv.enginerpmMaxPw
333#define _engineMaxTq priv.engineMaxTq
334#define _engineMaxPw priv.engineMaxPw
335#define _gearRatio priv.gearRatio
336#define _gearNb priv.gearNb
337#define _gearOffset priv.gearOffset
338#define _fuel priv.fuel
339#define _gear priv.gear
340#define _debug priv.debug
341#define _skid priv.skid
342#define _reaction priv.reaction
343#define _dammage priv.dammage
344
346typedef struct {
351 int gear;
353#define RM_CMD_NONE 0
354#define RM_CMD_PIT_ASKED 1
355 char msg[4][32];
356#define RM_MSG_LEN 31
357 float msgColor[4];
359#define RM_LIGHT_HEAD1 0x00000001
360#define RM_LIGHT_HEAD2 0x00000002
362} tCarCtrl;
363#define _steerCmd ctrl.steer
364#define _accelCmd ctrl.accelCmd
365#define _brakeCmd ctrl.brakeCmd
366#define _clutchCmd ctrl.clutchCmd
367#define _gearCmd ctrl.gear
368#define _raceCmd ctrl.raceCmd
369#define _msgCmd ctrl.msg
370#define _msgColorCmd ctrl.msgColor
371#define _lightCmd ctrl.lightCmd
372
373struct RobotItf;
374
381
382
383
434
436typedef struct
437{
440#define RM_PIT_REPAIR 0
441#define RM_PIT_STOPANDGO 1
444
445 enum TireChange { NONE = 0, ALL = 1};
446
448} tCarPitCmd;
449#define _pitFuel pitcmd.fuel
450#define _pitRepair pitcmd.repair
451#define _pitStopType pitcmd.stopType
452
453
471
472
473
474/* sections in xml description files */
475
476#define SECT_SIMU_SETTINGS "Simulation Options"
477#define SECT_CAR "Car"
478#define SECT_FRNT "Front"
479#define SECT_FRNTWING "Front Wing"
480#define SECT_FRNTAXLE "Front Axle"
481#define SECT_FRNTARB "Front Anti-Roll Bar"
482#define SECT_FRNTRGTWHEEL "Front Right Wheel"
483#define SECT_FRNTLFTWHEEL "Front Left Wheel"
484#define SECT_FRNTRGTSUSP "Front Right Suspension"
485#define SECT_FRNTLFTSUSP "Front Left Suspension"
486#define SECT_FRNTRGTBRAKE "Front Right Brake"
487#define SECT_FRNTLFTBRAKE "Front Left Brake"
488#define SECT_FRNTDIFFERENTIAL "Front Differential"
489#define SECT_REAR "Rear"
490#define SECT_REARWING "Rear Wing"
491#define SECT_REARAXLE "Rear Axle"
492#define SECT_REARARB "Rear Anti-Roll Bar"
493#define SECT_REARRGTWHEEL "Rear Right Wheel"
494#define SECT_REARLFTWHEEL "Rear Left Wheel"
495#define SECT_REARRGTSUSP "Rear Right Suspension"
496#define SECT_REARLFTSUSP "Rear Left Suspension"
497#define SECT_REARRGTBRAKE "Rear Right Brake"
498#define SECT_REARLFTBRAKE "Rear Left Brake"
499#define SECT_REARDIFFERENTIAL "Rear Differential"
500#define SECT_CENTRALDIFFERENTIAL "Central Differential"
501#define SECT_STEER "Steer"
502#define SECT_BRKSYST "Brake System"
503#define SECT_AERODYNAMICS "Aerodynamics"
504#define SECT_ENGINE "Engine"
505#define SECT_CLUTCH "Clutch"
506#define SECT_DRIVETRAIN "Drivetrain"
507#define SECT_GEARBOX "Gearbox"
508#define SECT_DRIVER "Driver"
509#define SECT_BONNET "Bonnet"
510#define SECT_GROBJECTS "Graphic Objects"
511#define SECT_EXHAUST "Exhaust"
512#define SECT_LIGHT "Light"
513
514/* parameters names */
515#define PRM_CATEGORY "category"
516#define PRM_LEN "body length"
517#define PRM_WIDTH "body width"
518#define PRM_OVERALLLEN "overall length"
519#define PRM_OVERALLWIDTH "overall width"
520#define PRM_HEIGHT "body height"
521#define PRM_MASS "mass"
522#define PRM_FRWEIGHTREP "front-rear weight repartition"
523#define PRM_FRLWEIGHTREP "front right-left weight repartition"
524#define PRM_RRLWEIGHTREP "rear right-left weight repartition"
525#define PRM_GCHEIGHT "GC height"
526#define PRM_TANK "fuel tank"
527#define PRM_FUEL "initial fuel"
528#define PRM_CENTR "mass repartition coefficient"
529#define PRM_INERTIA "inertia"
530#define PRM_EFFICIENCY "efficiency"
531#define PRM_TYPE "type"
532#define PRM_SIZE "size"
533
534/* Tires */
535#define PRM_MU "mu"
536#define PRM_RIMDIAM "rim diameter"
537#define PRM_TIREWIDTH "tire width"
538#define PRM_TIRERATIO "tire height-width ratio"
539#define PRM_RIDEHEIGHT "ride height"
540#define PRM_TOE "toe"
541#define PRM_CAMBER "camber"
542#define PRM_CASTER "caster"
543#define PRM_CA "stiffness"
544#define PRM_RFACTOR "dynamic friction"
545#define PRM_EFACTOR "elasticity factor"
546#define PRM_PRESSURE "pressure"
547#define PRM_LOADFMAX "load factor max"
548#define PRM_LOADFMIN "load factor min"
549#define PRM_OPLOAD "operating load"
550#define PRM_TREADTHICKNESS "tread thickness"
551#define PRM_RIMMASS "rim mass"
552#define PRM_HYSTERESIS "hysteresis"
553#define PRM_IDEALTEMP "ideal temperature"
554#define PRM_WEAR "wear"
555
556
557#define PRM_SPR "spring"
558#define PRM_SUSPCOURSE "suspension course"
559#define PRM_BELLCRANK "bellcrank"
560#define PRM_PACKERS "packers"
561#define PRM_SLOWBUMP "slow bump"
562#define PRM_SLOWREBOUND "slow rebound"
563#define PRM_FASTBUMP "fast bump"
564#define PRM_FASTREBOUND "fast rebound"
565#define PRM_BUMPTHRESHOLD "fast bump threshold"
566#define PRM_REBOUNDTHRESHOLD "fast rebound threshold"
567
568#define PRM_XPOS "xpos"
569#define PRM_YPOS "ypos"
570#define PRM_ZPOS "zpos"
571
572#define PRM_STEERLOCK "steer lock"
573#define PRM_STEERSPD "max steer speed"
574
575#define PRM_BRKDIAM "disk diameter"
576#define PRM_BRKAREA "piston area"
577#define PRM_BRKREP "front-rear brake repartition"
578#define PRM_BRKPRESS "max pressure"
579#define PRM_BRKREPCMD_MAXCLICKS "brake repartition max clicks"
580#define PRM_BRKREPCMD_CLICKVALUE "brake repartition offset per click"
581
582#define PRM_CX "Cx"
583#define PRM_FCL "front Clift"
584#define PRM_RCL "rear Clift"
585#define PRM_FRNTAREA "front area"
586#define PRM_WINGAREA "area"
587#define PRM_WINGANGLE "angle"
588
589/* Engine */
590#define PRM_REVSLIM "revs limiter"
591#define PRM_REVSMAX "revs maxi"
592#define PRM_TICKOVER "tickover"
593#define PRM_RPM "rpm"
594#define PRM_TQ "Tq"
595#define ARR_DATAPTS "data points"
596#define PRM_FUELCONS "fuel cons factor"
597#define PRM_ENGBRKCOEFF "brake coefficient"
598#define PRM_POWER "power"
599#define PRM_TURBO "turbo"
600#define PRM_TURBO_RPM "turbo rpm"
601#define PRM_TURBO_FACTOR "turbo factor"
602#define PRM_TURBO_LAG "turbo lag"
603
604#define PRM_RATIO "ratio"
605#define PRM_BIAS "bias"
606
607#define ARR_GEARS "gears"
608#define PRM_SHIFTTIME "shift time"
609
610#define PRM_ROLLCENTER "roll center height"
611
612#define LST_RANGES "Ranges"
613#define PRM_THRESHOLD "threshold"
614#define PRM_CAR "car"
615#define PRM_WHEELSON "wheels"
616#define PRM_ENV "env"
617#define PRM_BONNET "bonnet"
618#define PRM_WHEEL_TEXTURE "wheel texture"
619#define PRM_SHADOW_TEXTURE "shadow texture"
620
621#define PRM_MIN_TQ_BIAS "min torque bias"
622#define PRM_MAX_TQ_BIAS "max torque bias"
623#define PRM_MAX_SLIP_BIAS "max slip bias"
624#define PRM_LOCKING_TQ "locking input torque"
625#define PRM_LOCKINGBRAKE_TQ "locking brake input torque"
626#define PRM_VISCOSITY_FACTOR "viscosity factor"
627
628
629#define VAL_DIFF_NONE "NONE"
630#define VAL_DIFF_SPOOL "SPOOL"
631#define VAL_DIFF_FREE "FREE"
632#define VAL_DIFF_LIMITED_SLIP "LIMITED SLIP"
633#define VAL_DIFF_VISCOUS_COUPLER "VISCOUS COUPLER"
634
635#define VAL_TRANS_RWD "RWD"
636#define VAL_TRANS_FWD "FWD"
637#define VAL_TRANS_4WD "4WD"
638
639
640/* graphic */
641#define PRM_TACHO_TEX "tachometer texture"
642#define PRM_TACHO_XSZ "tachometer width"
643#define PRM_TACHO_YSZ "tachometer height"
644#define PRM_TACHO_XPOS "tachometer x pos"
645#define PRM_TACHO_YPOS "tachometer y pos"
646#define PRM_TACHO_NDLXSZ "tachometer needle width"
647#define PRM_TACHO_NDLYSZ "tachometer needle height"
648#define PRM_TACHO_XCENTER "tachometer needle x center"
649#define PRM_TACHO_YCENTER "tachometer needle y center"
650#define PRM_TACHO_XDIGITCENTER "tachometer digit x center"
651#define PRM_TACHO_YDIGITCENTER "tachometer digit y center"
652#define PRM_TACHO_MINVAL "tachometer min value"
653#define PRM_TACHO_MAXVAL "tachometer max value"
654#define PRM_TACHO_MINANG "tachometer min angle"
655#define PRM_TACHO_MAXANG "tachometer max angle"
656
657#define PRM_SPEEDO_TEX "speedometer texture"
658#define PRM_SPEEDO_XSZ "speedometer width"
659#define PRM_SPEEDO_YSZ "speedometer height"
660#define PRM_SPEEDO_XPOS "speedometer x pos"
661#define PRM_SPEEDO_YPOS "speedometer y pos"
662#define PRM_SPEEDO_NDLXSZ "speedometer needle width"
663#define PRM_SPEEDO_NDLYSZ "speedometer needle height"
664#define PRM_SPEEDO_XCENTER "speedometer needle x center"
665#define PRM_SPEEDO_YCENTER "speedometer needle y center"
666#define PRM_SPEEDO_XDIGITCENTER "speedometer digit x center"
667#define PRM_SPEEDO_YDIGITCENTER "speedometer digit y center"
668#define PRM_SPEEDO_MINVAL "speedometer min value"
669#define PRM_SPEEDO_MAXVAL "speedometer max value"
670#define PRM_SPEEDO_MINANG "speedometer min angle"
671#define PRM_SPEEDO_MAXANG "speedometer max angle"
672#define PRM_SPEEDO_DIGITAL "speedometer digital"
673
674#define PRM_WHEEL_3D "3d wheel basename"
675#define PRM_WHEEL_3D_DIR "3d wheel directory"
676
677/* Lights */
678#define VAL_LIGHT_HEAD1 "head1"
679#define VAL_LIGHT_HEAD2 "head2"
680#define VAL_LIGHT_BRAKE "brake"
681#define VAL_LIGHT_BRAKE2 "brake2"
682#define VAL_LIGHT_REVERSE "reverse"
683#define VAL_LIGHT_REAR "rear"
684/* Simulation Options */
685#define PRM_DAMAGE_TYRES "damage/tyres"
686#define PRM_DAMAGE_SUSPENSION "damage/suspension"
687#define PRM_DAMAGE_ALIGNMENT "damage/alignment"
688#define PRM_DAMAGE_AERO "damage/aero"
689#define PRM_MODEL_AEROFLOW "model/aero/flow"
690#define PRM_MODEL_AERO_FACTOR "model/aero/factor"
691#define PRM_MODEL_TYRE_TEMPERATURE "model/tyre/temperature"
692
693// Collision constants.
694#define SEM_COLLISION 0x01
695#define SEM_COLLISION_XYSCENE 0x02
696#define SEM_COLLISION_CAR 0x04
697#define SEM_COLLISION_Z 0x08
698#define SEM_COLLISION_Z_CRASH 0x10
699
700
701#endif /* __CARV1_H__ */
702
703
704
#define MAX_GEARS
Definition car.h:278
struct CarElt tCarElt
Car structure (tCarElt).
struct CarPenalty tCarPenalty
One penalty.
struct tCollisionState_ tCollisionState
#define MAX_NAME_LEN
Definition car.h:35
float tdble
Floating point type used in TORCS.
Definition tgf.h:47
#define GF_TAILQ_HEAD(name, type)
Head type definition.
Definition tgf.h:447
struct trackSeg tTrackSeg
Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right...
Car structure (tCarElt).
Definition car.h:458
struct RobotItf * robot
private
Definition car.h:466
tPrivCar priv
private
Definition car.h:463
tPublicCar pub
public
Definition car.h:461
tCarRaceInfo race
public
Definition car.h:462
tCarPitCmd pitcmd
private
Definition car.h:465
struct CarElt * next
Definition car.h:467
tCarCtrl ctrl
private
Definition car.h:464
int index
car index
Definition car.h:459
double posY
high-precision world Y translation of posMat
Definition car.h:469
tInitCar info
public
Definition car.h:460
double posX
high-precision world X translation of posMat
Definition car.h:468
One penalty.
Definition car.h:131
int penalty
penalty type
Definition car.h:132
GF_TAILQ_ENTRY(struct CarPenalty) link
int lapToClear
the lap before the penalty has to be cleared
Definition car.h:133
Interface Structure for Robots.
Definition robot.h:105
3D point.
Definition tgf.h:114
Info returned by driver during the race.
Definition car.h:346
float msgColor[4]
RGBA of text.
Definition car.h:357
int raceCmd
command issued by the driver
Definition car.h:352
int gear
[-1,6] for gear selection
Definition car.h:351
tdble steer
Steer command [-1.0, 1.0].
Definition car.h:347
int brakeRepartitionCmd
Brake balance "clicks", positive is to the front.
Definition car.h:361
tdble clutchCmd
Clutch command [0.0, 1.0].
Definition car.h:350
char msg[4][32]
4 lines of 31 characters 0-1 from car 2-3 from race engine
Definition car.h:355
tdble accelCmd
Accelerator command [0.0, 1.0].
Definition car.h:348
int lightCmd
Lights command.
Definition car.h:358
tdble brakeCmd
Brake command [0.0, 1.0].
Definition car.h:349
Command issued by the car during pit stop.
Definition car.h:437
TireChange
Definition car.h:445
@ NONE
Definition car.h:445
@ ALL
Definition car.h:445
int stopType
Definition car.h:442
TireChange tireChange
Definition car.h:447
int repair
Definition car.h:439
tCarPitSetup setup
Definition car.h:443
tdble fuel
Definition car.h:438
tCarPitSetupValue thirdbump[2]
Definition car.h:414
tCarPitSetupValue wheelcaster[4]
Definition car.h:393
tCarPitSetupValue diffmintqbias[3]
Definition car.h:426
tCarPitSetupValue brakePressure
Definition car.h:396
tCarPitSetupValue wheelcamber[4]
Definition car.h:390
tCarPitSetupValue suspfastbump[4]
Definition car.h:404
tCarPitSetupValue suspspring[4]
Definition car.h:400
tCarPitSetupValue brakeRepartition
Definition car.h:397
tCarPitSetupValue suspbumpthreshold[4]
Definition car.h:406
tCarPitSetupValue gearsratio[MAX_GEARS - 2]
Definition car.h:419
tCarPitSetupValue wheeltoe[4]
Definition car.h:391
tCarPitSetupValue suspslowbump[4]
Definition car.h:402
tCarPitSetupValue diffratio[3]
Definition car.h:425
tCarPitSetupValue thirdX0[2]
Definition car.h:416
TDiffType diffType[3]
Definition car.h:432
tCarPitSetupValue diffslipbias[3]
Definition car.h:428
tCarPitSetupValue difflockinginputbraketq[3]
Definition car.h:430
tCarPitSetupValue wingangle[2]
Definition car.h:422
tCarPitSetupValue suspfastrebound[4]
Definition car.h:405
tCarPitSetupValue suspslowrebound[4]
Definition car.h:403
tCarPitSetupValue arbspring[2]
Definition car.h:410
tCarPitSetupValue wheelrideheight[4]
Definition car.h:392
tCarPitSetupValue suspreboundthreshold[4]
Definition car.h:407
tCarPitSetupValue susppackers[4]
Definition car.h:401
tCarPitSetupValue thirdrebound[2]
Definition car.h:415
@ LIMITED_SLIP
Definition car.h:431
@ VISCOUS_COUPLER
Definition car.h:431
tCarPitSetupValue diffmaxtqbias[3]
Definition car.h:427
tCarPitSetupValue steerLock
Definition car.h:387
tCarPitSetupValue difflockinginputtq[3]
Definition car.h:429
tCarPitSetupValue thirdspring[2]
Definition car.h:413
tdble value
Definition car.h:377
Race Administrative info.
Definition car.h:140
tdble topSpeed
Definition car.h:147
double timeBehindPrev
Definition car.h:155
double curLapTime
Definition car.h:144
int pos
Definition car.h:152
tCarPenaltyHead penaltyList
List of current penalties.
Definition car.h:162
int laps
Definition car.h:149
int nbPitStops
Definition car.h:150
int remainingLaps
Definition car.h:151
tTrackOwnPit * pit
Definition car.h:160
tdble currentMinSpeedForLap
Definition car.h:148
int event
Definition car.h:161
bool commitBestLapTime
Definition car.h:142
double bestLapTime
Definition car.h:141
tdble distRaced
Definition car.h:157
double curTime
Definition car.h:146
tdble penaltyTime
Definition car.h:163
tdble distFromStartLine
Definition car.h:158
double deltaBestLapTime
Definition car.h:143
double lastLapTime
Definition car.h:145
double timeBeforeNext
Definition car.h:156
double timeBehindLeader
Definition car.h:153
int lapsBehindLeader
Definition car.h:154
double scheduledEventTime
Definition car.h:159
int collision_count
Definition car.h:281
sgVec3 force
Definition car.h:283
sgVec3 pos
Definition car.h:282
Dynamic point structure.
Definition tgf.h:142
Static Public info.
Definition car.h:73
t3Dd dimension
Car's mesures.
Definition car.h:83
t3Dd statGC
Static pos of GC (should be the origin of car axis)
Definition car.h:88
int skillLevel
Driver's skill level (0=rookie -> 3=pro)
Definition car.h:81
t3Dd drvPos
Driver's position.
Definition car.h:84
int driverType
Driver type.
Definition car.h:80
t3Dd bonnetPos
Bonnet's position.
Definition car.h:85
tdble tank
Fuel tank capa.
Definition car.h:86
tdble iconColor[3]
Car color in leaders board.
Definition car.h:82
int raceNumber
Car's race number.
Definition car.h:78
char category[MAX_NAME_LEN]
Car's category.
Definition car.h:77
int startRank
Car's starting position.
Definition car.h:79
char teamname[MAX_NAME_LEN]
Team name.
Definition car.h:75
tVisualAttributes visualAttr
Visual attributes.
Definition car.h:90
tdble steerLock
Steer lock angle.
Definition car.h:87
char carName[MAX_NAME_LEN]
Car object name.
Definition car.h:76
tWheelSpec wheel[4]
Wheels specifications.
Definition car.h:89
char name[MAX_NAME_LEN]
Driver's name.
Definition car.h:74
6 DOF position.
Definition tgf.h:129
Data known only by the driver.
Definition car.h:287
tCollisionState collision_state
collision state
Definition car.h:315
tdble engineMaxTq
Definition car.h:301
void * paramsHandle
accessible parameters for modules
Definition car.h:288
int brakeRepartitionCmd
Definition car.h:318
tdble enginerpmMax
Definition car.h:298
tdble reaction[4]
reaction on wheels
Definition car.h:307
tWheelState wheel[4]
Definition car.h:292
int debug
Definition car.h:314
tdble enginerpmRedLine
Definition car.h:297
int gear
current gear
Definition car.h:294
int gearOffset
gearRatio[gear + gearOffset] is the ratio for gear
Definition car.h:305
int collision
Collision value for graphics and sound, clearing is managed by consumers.
Definition car.h:308
int gearNb
incl reverse and neutral
Definition car.h:304
int repCmdMaxClicks
Definition car.h:317
tdble enginerpmMaxPw
Definition car.h:300
tdble enginerpmMaxTq
Definition car.h:299
tdble otherSurfaceContribution[4]
Definition car.h:319
tTrackSeg * otherSurfaceSeg[4]
Definition car.h:320
float smoke
Definition car.h:310
tdble fuel
remaining fuel (liters)
Definition car.h:295
t3Dd normal
Definition car.h:311
tdble engineMaxPw
Definition car.h:302
int driverIndex
index when multiple drivers are in the same dll
Definition car.h:290
tdble skid[4]
skid intensity
Definition car.h:306
tdble gearRatio[MAX_GEARS]
including final drive
Definition car.h:303
void * carHandle
parameters for car caracteristics
Definition car.h:289
int simcollision
For rules etc.
Definition car.h:309
int dammage
Definition car.h:313
t3Dd collpos
Collision position, useful for sound.
Definition car.h:312
tPosd corner[4]
car's corners position
Definition car.h:293
tdble enginerpm
Definition car.h:296
tdble localPressure
Definition car.h:316
char modName[MAX_NAME_LEN]
dll name
Definition car.h:291
Public info on the cars.
Definition car.h:191
tDynPt DynGCg
GC data (world axis)
Definition car.h:193
int state
state of the car.
Definition car.h:197
tTrkLocPos trkPos
current track position.
Definition car.h:196
tPosd corner[4]
Definition car.h:222
tDynPt DynGC
GC data (car axis)
Definition car.h:192
sgMat4 posMat
position matrix
Definition car.h:195
tdble speed
Definition car.h:194
Location on the track in local coordinates.
Definition track.h:434
Static visual attributes.
Definition car.h:66
tdble exhaustPower
Power of the flames (from 1 to 3)
Definition car.h:69
int exhaustNb
Number of exhaust pipes (max 2)
Definition car.h:67
t3Dd exhaustPos[2]
Position of exhaust pipes.
Definition car.h:68
Wheels Specifications.
Definition car.h:50
tdble wheelRadius
Overall wheel radius.
Definition car.h:55
tdble brakeDiskRadius
Brake disk radius.
Definition car.h:54
tdble rimRadius
Rim radius.
Definition car.h:51
tdble idealTemperature
Definition car.h:56
tdble tireWidth
Tire width.
Definition car.h:53
tdble tireHeight
Tire height.
Definition car.h:52
Dynamic wheel information.
Definition car.h:251
tdble spinVel
spin velocity rad/s
Definition car.h:253
tdble brakeTemp
brake temperature from 0 (cool) to 1.0 (hot)
Definition car.h:254
tdble currentGraining
Definition car.h:266
tdble currentTemperature
Definition car.h:264
int state
wheel state
Definition car.h:255
tdble slipSide
Definition car.h:258
tdble Fy
Definition car.h:261
tdble currentPressure
Definition car.h:263
tdble Fz
Definition car.h:262
tdble Fx
Definition car.h:260
tdble currentWear
Definition car.h:265
tTrackSeg * seg
Track segment where the wheel is.
Definition car.h:256
tPosd relPos
position relative to GC
Definition car.h:252
tdble slipAccel
Definition car.h:259
tdble rollRes
rolling resistance, useful for sound
Definition car.h:257
Track Structure and Track Loader Module Definition.
struct TrackOwnPit tTrackOwnPit
Driver's pit.