![]() |
torcs - 1.2.2 | ![]() |
#include <track.h>
#include <plib/sg.h>
Include dependency graph for car.h:
Go to the source code of this file.
Compounds | |
struct | CarElt |
Car structure (tCarElt). More... | |
struct | CarPenalty |
One penalty. More... | |
struct | tCarCtrl |
Info returned by driver during the race. More... | |
struct | tCarPitCmd |
Command issued by the car during pit stop. More... | |
struct | tCarRaceInfo |
Race Administrative info. More... | |
struct | tInitCar |
Static Public info. More... | |
struct | tPrivCar |
Data known only by the driver. More... | |
struct | tPublicCar |
Public info on the cars. More... | |
struct | tVisualAttributes |
Static visual attributes. More... | |
struct | tWheelSpec |
Wheels Specifications. More... | |
struct | tWheelState |
Dynamic wheel information. More... | |
Defines | |
#define | CAR_IDENT 0 |
#define | MAX_NAME_LEN 32 |
#define | FRNT_RGT 0 |
front right | |
#define | FRNT_LFT 1 |
front left | |
#define | REAR_RGT 2 |
rear right | |
#define | REAR_LFT 3 |
rear left | |
#define | FRNT 0 |
front | |
#define | REAR 1 |
rear | |
#define | RIGHT 0 |
right | |
#define | LEFT 1 |
left | |
#define | _rimRadius(i) info.wheel[i].rimRadius |
short cut to tWheelSpec::rimRadius | |
#define | _tireHeight(i) info.wheel[i].tireHeight |
short cut to tWheelSpec::tireHeight | |
#define | _tireWidth(i) info.wheel[i].tireWidth |
short cut to tWheelSpec::tireWidth | |
#define | _brakeDiskRadius(i) info.wheel[i].brakeDiskRadius |
short cut to tWheelSpec::brakeDiskRadius | |
#define | _wheelRadius(i) info.wheel[i].wheelRadius |
short cut to tWheelSpec::wheelRadius | |
#define | _name info.name |
short cut to tInitCar::name | |
#define | _carName info.carName |
short cut to tInitCar::carName | |
#define | _category info.cartegory |
short cut to tInitCar#cartegory | |
#define | _driverType info.driverType |
short cut to tInitCar::driverType | |
#define | _skillLevel info.skillLevel |
short cut to tInitCar::skillLevel | |
#define | _raceNumber info.raceNumber |
short cut to tInitCar::raceNumber | |
#define | _startRank info.startRank |
short cut to tInitCar::startRank | |
#define | _dimension info.dimension |
short cut to tInitCar::dimension | |
#define | _dimension_x info.dimension.x |
short cut to tInitCar::dimension::x | |
#define | _dimension_y info.dimension.y |
short cut to tInitCar::dimension::y | |
#define | _dimension_z info.dimension.z |
short cut to tInitCar::dimension::z | |
#define | _drvPos_x info.drvPos.x |
short cut to tInitCar::drvPos::x | |
#define | _drvPos_y info.drvPos.y |
short cut to tInitCar::drvPos::y | |
#define | _drvPos_z info.drvPos.z |
short cut to tInitCar::drvPos::z | |
#define | _bonnetPos_x info.bonnetPos.x |
short cut to tInitCar::bonnetPos::x | |
#define | _bonnetPos_y info.bonnetPos.y |
short cut to tInitCar::bonnetPos::y | |
#define | _bonnetPos_z info.bonnetPos.z |
short cut to tInitCar::bonnetPos::z | |
#define | _statGC info.statGC |
short cut to tInitCar::statGC | |
#define | _statGC_x info.statGC.x |
short cut to tInitCar::statGC::x | |
#define | _statGC_y info.statGC.y |
short cut to tInitCar::statGC::y | |
#define | _statGC_z info.statGC.z |
short cut to tInitCar::statGC::z | |
#define | _iconColor info.iconColor |
short cut to tInitCar::iconColor | |
#define | _tank info.tank |
short cut to tInitCar::tank | |
#define | _steerLock info.steerLock |
short cut to tInitCar::steerLock | |
#define | _exhaustNb info.visualAttr.exhaustNb |
short cut to tVisualAttributes::exhaustNb | |
#define | _exhaustPos info.visualAttr.exhaustPos |
short cut to tVisualAttributes::exhaustPos | |
#define | _exhaustPower info.visualAttr.exhaustPower |
short cut to tVisualAttributes::exhaustPower | |
#define | RM_DRV_HUMAN 1 |
#define | RM_DRV_ROBOT 2 |
#define | RM_PENALTY_DRIVETHROUGH 1 |
#define | RM_PENALTY_STOPANDGO 2 |
#define | _bestLapTime race.bestLapTime |
#define | _deltaBestLapTime race.deltaBestLapTime |
#define | _curLapTime race.curLapTime |
#define | _curTime race.curTime |
#define | _lastLapTime race.lastLapTime |
#define | _topSpeed race.topSpeed |
#define | _laps race.laps |
#define | _nbPitStops race.nbPitStops |
#define | _remainingLaps race.remainingLaps |
#define | _pos race.pos |
#define | _timeBehindLeader race.timeBehindLeader |
#define | _lapsBehindLeader race.lapsBehindLeader |
#define | _timeBehindPrev race.timeBehindPrev |
#define | _timeBeforeNext race.timeBeforeNext |
#define | _distRaced race.distRaced |
#define | _distFromStartLine race.distFromStartLine |
#define | _pit race.pit |
#define | _scheduledEventTime race.scheduledEventTime |
#define | _event race.event |
#define | _penaltyList race.penaltyList |
#define | RM_CAR_STATE_FINISH 0x00000100 |
Car having passed the finish line. | |
#define | RM_CAR_STATE_PIT 0x00000001 |
Car currently stopped in pits. | |
#define | RM_CAR_STATE_DNF 0x00000002 |
Car did not finish. | |
#define | RM_CAR_STATE_PULLUP 0x00000004 |
Car pulled out in the air. | |
#define | RM_CAR_STATE_PULLSIDE 0x00000008 |
Car pulled out in the air. | |
#define | RM_CAR_STATE_PULLDN 0x00000010 |
Car pulled out in the air. | |
#define | RM_CAR_STATE_OUT (RM_CAR_STATE_DNF | RM_CAR_STATE_FINISH) |
Car out of race. | |
#define | RM_CAR_STATE_NO_SIMU 0x000000FF |
Do not simulate the car. | |
#define | RM_CAR_STATE_BROKEN 0x00000200 |
Engine no more working. | |
#define | RM_CAR_STATE_OUTOFGAS 0x00000400 |
Out of Gas. | |
#define | RM_CAR_STATE_ELIMINATED 0x00000800 |
Eliminated due to rules infringement. | |
#define | RM_CAR_STATE_SIMU_NO_MOVE 0x00010000 |
Simulation without car move (i.e. | |
#define | _DynGC pub.DynGC |
#define | _pos_X pub.DynGC.pos.x |
#define | _pos_Y pub.DynGC.pos.y |
#define | _pos_Z pub.DynGC.pos.z |
#define | _roll pub.DynGC.pos.ax |
#define | _pitch pub.DynGC.pos.ay |
#define | _yaw pub.DynGC.pos.az |
#define | _yaw_rate pub.DynGC.vel.az |
#define | _speed_x pub.DynGC.vel.x |
#define | _speed_y pub.DynGC.vel.y |
#define | _speed_z pub.DynGC.vel.z |
#define | _accel_x pub.DynGC.acc.x |
#define | _accel_y pub.DynGC.acc.y |
#define | _accel_z pub.DynGC.acc.z |
#define | _state pub.state |
#define | _trkPos pub.trkPos |
#define | _speed_X pub.DynGCg.vel.x |
#define | _speed_Y pub.DynGCg.vel.y |
#define | _corner_x(i) pub.corner[i].ax |
#define | _corner_y(i) pub.corner[i].ay |
#define | _posMat pub.posMat |
#define | _ride(i) priv.wheel[i].relPos.z |
#define | _brakeTemp(i) priv.wheel[i].brakeTemp |
#define | _wheelSpinVel(i) priv.wheel[i].spinVel |
#define | _wheelSeg(i) priv.wheel[i].seg |
#define | MAX_GEARS 10 |
#define | _driverIndex priv.driverIndex |
#define | _paramsHandle priv.paramsHandle |
#define | _carHandle priv.carHandle |
#define | _modName priv.modName |
#define | _enginerpm priv.enginerpm |
#define | _enginerpmRedLine priv.enginerpmRedLine |
#define | _enginerpmMax priv.enginerpmMax |
#define | _enginerpmMaxTq priv.enginerpmMaxTq |
#define | _gearRatio priv.gearRatio |
#define | _gearNb priv.gearNb |
#define | _gearOffset priv.gearOffset |
#define | _fuel priv.fuel |
#define | _gear priv.gear |
#define | _debug priv.debug |
#define | _skid priv.skid |
#define | _reaction priv.reaction |
#define | _dammage priv.dammage |
#define | RM_CMD_NONE 0 |
No race command. | |
#define | RM_CMD_PIT_ASKED 1 |
Race command: Pit asked. | |
#define | RM_MSG_LEN 31 |
#define | RM_LIGHT_HEAD1 0x00000001 |
head light 1 | |
#define | RM_LIGHT_HEAD2 0x00000002 |
head light 2 | |
#define | _steerCmd ctrl.steer |
#define | _accelCmd ctrl.accelCmd |
#define | _brakeCmd ctrl.brakeCmd |
#define | _clutchCmd ctrl.clutchCmd |
#define | _gearCmd ctrl.gear |
#define | _raceCmd ctrl.raceCmd |
#define | _msgCmd ctrl.msg |
#define | _msgColorCmd ctrl.msgColor |
#define | _lightCmd ctrl.lightCmd |
#define | RM_PIT_REPAIR 0 |
#define | RM_PIT_STOPANDGO 1 |
#define | _pitFuel pitcmd.fuel |
#define | _pitRepair pitcmd.repair |
#define | _pitStopType pitcmd.stopType |
#define | SECT_CAR "Car" |
#define | SECT_FRNT "Front" |
#define | SECT_FRNTWING "Front Wing" |
#define | SECT_FRNTAXLE "Front Axle" |
#define | SECT_FRNTARB "Front Anti-Roll Bar" |
#define | SECT_FRNTRGTWHEEL "Front Right Wheel" |
#define | SECT_FRNTLFTWHEEL "Front Left Wheel" |
#define | SECT_FRNTRGTSUSP "Front Right Suspension" |
#define | SECT_FRNTLFTSUSP "Front Left Suspension" |
#define | SECT_FRNTRGTBRAKE "Front Right Brake" |
#define | SECT_FRNTLFTBRAKE "Front Left Brake" |
#define | SECT_FRNTDIFFERENTIAL "Front Differential" |
#define | SECT_REAR "Rear" |
#define | SECT_REARWING "Rear Wing" |
#define | SECT_REARAXLE "Rear Axle" |
#define | SECT_REARARB "Rear Anti-Roll Bar" |
#define | SECT_REARRGTWHEEL "Rear Right Wheel" |
#define | SECT_REARLFTWHEEL "Rear Left Wheel" |
#define | SECT_REARRGTSUSP "Rear Right Suspension" |
#define | SECT_REARLFTSUSP "Rear Left Suspension" |
#define | SECT_REARRGTBRAKE "Rear Right Brake" |
#define | SECT_REARLFTBRAKE "Rear Left Brake" |
#define | SECT_REARDIFFERENTIAL "Rear Differential" |
#define | SECT_CENTRALDIFFERENTIAL "Central Differential" |
#define | SECT_STEER "Steer" |
#define | SECT_BRKSYST "Brake System" |
#define | SECT_AERODYNAMICS "Aerodynamics" |
#define | SECT_ENGINE "Engine" |
#define | SECT_CLUTCH "Clutch" |
#define | SECT_DRIVETRAIN "Drivetrain" |
#define | SECT_GEARBOX "Gearbox" |
#define | SECT_DRIVER "Driver" |
#define | SECT_BONNET "Bonnet" |
#define | SECT_GROBJECTS "Graphic Objects" |
#define | SECT_EXHAUST "Exhaust" |
#define | SECT_LIGHT "Light" |
#define | PRM_CATEGORY "category" |
#define | PRM_LEN "body length" |
#define | PRM_WIDTH "body width" |
#define | PRM_OVERALLLEN "overall length" |
#define | PRM_OVERALLWIDTH "overall width" |
#define | PRM_HEIGHT "body height" |
#define | PRM_MASS "mass" |
#define | PRM_FRWEIGHTREP "front-rear weight repartition" |
#define | PRM_FRLWEIGHTREP "front right-left weight repartition" |
#define | PRM_RRLWEIGHTREP "rear right-left weight repartition" |
#define | PRM_GCHEIGHT "GC height" |
#define | PRM_TANK "fuel tank" |
#define | PRM_FUEL "initial fuel" |
#define | PRM_CENTR "mass repartition coefficient" |
#define | PRM_INERTIA "inertia" |
#define | PRM_EFFICIENCY "efficiency" |
#define | PRM_TYPE "type" |
#define | PRM_SIZE "size" |
#define | PRM_MU "mu" |
#define | PRM_RIMDIAM "rim diameter" |
#define | PRM_TIREWIDTH "tire width" |
#define | PRM_TIRERATIO "tire height-width ratio" |
#define | PRM_RIDEHEIGHT "ride height" |
#define | PRM_ROLLINGRESIST "rolling resistance" |
#define | PRM_TOE "toe" |
#define | PRM_CAMBER "camber" |
#define | PRM_CA "stiffness" |
#define | PRM_RFACTOR "dynamic friction" |
#define | PRM_EFACTOR "elasticity factor" |
#define | PRM_PRESSURE "pressure" |
#define | PRM_LOADFMAX "load factor max" |
#define | PRM_LOADFMIN "load factor min" |
#define | PRM_OPLOAD "operating load" |
#define | PRM_SPR "spring" |
#define | PRM_SUSPCOURSE "suspension course" |
#define | PRM_BELLCRANK "bellcrank" |
#define | PRM_PACKERS "packers" |
#define | PRM_SLOWBUMP "slow bump" |
#define | PRM_SLOWREBOUND "slow rebound" |
#define | PRM_FASTBUMP "fast bump" |
#define | PRM_FASTREBOUND "fast rebound" |
#define | PRM_XPOS "xpos" |
#define | PRM_YPOS "ypos" |
#define | PRM_ZPOS "zpos" |
#define | PRM_STEERLOCK "steer lock" |
#define | PRM_STEERSPD "max steer speed" |
#define | PRM_BRKDIAM "disk diameter" |
#define | PRM_BRKAREA "piston area" |
#define | PRM_BRKREP "front-rear brake repartition" |
#define | PRM_BRKPRESS "max pressure" |
#define | PRM_CX "Cx" |
#define | PRM_FCL "front Clift" |
#define | PRM_RCL "rear Clift" |
#define | PRM_FRNTAREA "front area" |
#define | PRM_WINGAREA "area" |
#define | PRM_WINGANGLE "angle" |
#define | PRM_REVSLIM "revs limiter" |
#define | PRM_REVSMAX "revs maxi" |
#define | PRM_TICKOVER "tickover" |
#define | PRM_RPM "rpm" |
#define | PRM_TQ "Tq" |
#define | ARR_DATAPTS "data points" |
#define | PRM_FUELCONS "fuel cons factor" |
#define | PRM_ENGBRKCOEFF "brake coefficient" |
#define | PRM_POWER "power" |
#define | PRM_RATIO "ratio" |
#define | PRM_BIAS "bias" |
#define | ARR_GEARS "gears" |
#define | PRM_SHIFTTIME "shift time" |
#define | PRM_ROLLCENTER "roll center height" |
#define | LST_RANGES "Ranges" |
#define | PRM_THRESHOLD "threshold" |
#define | PRM_CAR "car" |
#define | PRM_WHEELSON "wheels" |
#define | PRM_ENV "env" |
#define | PRM_BONNET "bonnet" |
#define | PRM_WHEEL_TEXTURE "wheel texture" |
#define | PRM_SHADOW_TEXTURE "shadow texture" |
#define | PRM_MIN_TQ_BIAS "min torque bias" |
#define | PRM_MAX_TQ_BIAS "max torque bias" |
#define | PRM_MAX_SLIP_BIAS "max slip bias" |
#define | PRM_LOCKING_TQ "locking input torque" |
#define | PRM_VISCOSITY_FACTOR "viscosity factor" |
#define | VAL_DIFF_NONE "NONE" |
#define | VAL_DIFF_SPOOL "SPOOL" |
#define | VAL_DIFF_FREE "FREE" |
#define | VAL_DIFF_LIMITED_SLIP "LIMITED SLIP" |
#define | VAL_DIFF_VISCOUS_COUPLER "VISCOUS COUPLER" |
#define | VAL_TRANS_RWD "RWD" |
#define | VAL_TRANS_FWD "FWD" |
#define | VAL_TRANS_4WD "4WD" |
#define | PRM_TACHO_TEX "tachometer texture" |
#define | PRM_TACHO_XSZ "tachometer width" |
#define | PRM_TACHO_YSZ "tachometer height" |
#define | PRM_TACHO_XPOS "tachometer x pos" |
#define | PRM_TACHO_YPOS "tachometer y pos" |
#define | PRM_TACHO_NDLXSZ "tachometer needle width" |
#define | PRM_TACHO_NDLYSZ "tachometer needle height" |
#define | PRM_TACHO_XCENTER "tachometer needle x center" |
#define | PRM_TACHO_YCENTER "tachometer needle y center" |
#define | PRM_TACHO_XDIGITCENTER "tachometer digit x center" |
#define | PRM_TACHO_YDIGITCENTER "tachometer digit y center" |
#define | PRM_TACHO_MINVAL "tachometer min value" |
#define | PRM_TACHO_MAXVAL "tachometer max value" |
#define | PRM_TACHO_MINANG "tachometer min angle" |
#define | PRM_TACHO_MAXANG "tachometer max angle" |
#define | PRM_SPEEDO_TEX "speedometer texture" |
#define | PRM_SPEEDO_XSZ "speedometer width" |
#define | PRM_SPEEDO_YSZ "speedometer height" |
#define | PRM_SPEEDO_XPOS "speedometer x pos" |
#define | PRM_SPEEDO_YPOS "speedometer y pos" |
#define | PRM_SPEEDO_NDLXSZ "speedometer needle width" |
#define | PRM_SPEEDO_NDLYSZ "speedometer needle height" |
#define | PRM_SPEEDO_XCENTER "speedometer needle x center" |
#define | PRM_SPEEDO_YCENTER "speedometer needle y center" |
#define | PRM_SPEEDO_XDIGITCENTER "speedometer digit x center" |
#define | PRM_SPEEDO_YDIGITCENTER "speedometer digit y center" |
#define | PRM_SPEEDO_MINVAL "speedometer min value" |
#define | PRM_SPEEDO_MAXVAL "speedometer max value" |
#define | PRM_SPEEDO_MINANG "speedometer min angle" |
#define | PRM_SPEEDO_MAXANG "speedometer max angle" |
#define | PRM_SPEEDO_DIGITAL "speedometer digital" |
#define | VAL_LIGHT_HEAD1 "head1" |
#define | VAL_LIGHT_HEAD2 "head2" |
#define | VAL_LIGHT_BRAKE "brake" |
#define | VAL_LIGHT_BRAKE2 "brake2" |
#define | VAL_LIGHT_REVERSE "reverse" |
#define | VAL_LIGHT_REAR "rear" |
Typedefs | |
typedef CarPenalty | tCarPenalty |
One penalty. | |
typedef CarElt | tCarElt |
Car structure (tCarElt). | |
Functions | |
GF_TAILQ_HEAD (CarPenaltyHead, struct CarPenalty) |
|
|
|
|
|
|
|
|
|
|
|
short cut to tInitCar::bonnetPos::x
|
|
short cut to tInitCar::bonnetPos::y
|
|
short cut to tInitCar::bonnetPos::z
|
|
|
|
short cut to tWheelSpec::brakeDiskRadius
|
|
|
|
|
|
short cut to tInitCar::carName
|
|
short cut to tInitCar#cartegory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
short cut to tInitCar::dimension
|
|
short cut to tInitCar::dimension::x
|
|
short cut to tInitCar::dimension::y
|
|
short cut to tInitCar::dimension::z
|
|
|
|
|
|
|
|
short cut to tInitCar::driverType
|
|
short cut to tInitCar::drvPos::x
|
|
short cut to tInitCar::drvPos::y
|
|
short cut to tInitCar::drvPos::z
|
|
|
|
|
|
|
|
|
|
|
|
|
|
short cut to tVisualAttributes::exhaustNb
|
|
short cut to tVisualAttributes::exhaustPos
|
|
short cut to tVisualAttributes::exhaustPower
|
|
|
|
|
|
|
|
|
|
|
|
|
|
short cut to tInitCar::iconColor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
short cut to tInitCar::name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
short cut to tInitCar::raceNumber
|
|
|
|
|
|
|
|
short cut to tWheelSpec::rimRadius
|
|
|
|
|
|
|
|
short cut to tInitCar::skillLevel
|
|
|
|
|
|
|
|
|
|
|
|
short cut to tInitCar::startRank
|
|
|
|
short cut to tInitCar::statGC
|
|
short cut to tInitCar::statGC::x
|
|
short cut to tInitCar::statGC::y
|
|
short cut to tInitCar::statGC::z
|
|
|
|
short cut to tInitCar::steerLock
|
|
short cut to tInitCar::tank
|
|
|
|
|
|
|
|
short cut to tWheelSpec::tireHeight
|
|
short cut to tWheelSpec::tireWidth
|
|
|
|
|
|
short cut to tWheelSpec::wheelRadius
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front
|
|
front left
|
|
front right
|
|
left
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rear
|
|
rear left
|
|
rear right
|
|
right
|
|
Engine no more working.
|
|
Car did not finish.
|
|
Eliminated due to rules infringement.
|
|
Car having passed the finish line.
|
|
Do not simulate the car.
|
|
Car out of race.
|
|
Out of Gas.
|
|
Car currently stopped in pits.
|
|
Car pulled out in the air.
|
|
Car pulled out in the air.
|
|
Car pulled out in the air.
|
|
Simulation without car move (i.e. clutch applied and no wheel move) |
|
No race command.
|
|
Race command: Pit asked.
|
|
|
|
|
|
head light 1
|
|
head light 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Car structure (tCarElt). This is the main car structure, used everywhere in the code. |
|
One penalty.
|
|
|