TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
track.h
Go to the documentation of this file.
1/***************************************************************************
2
3 file : track.h
4 created : Sun Jan 30 23:00:06 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
26
32
33#ifndef _TRACKV1_H_
34#define _TRACKV1_H_
35
36#include <tgf.h>
37#include <tmath/linalg_t.h>
38
39#define TRK_IDENT 0 /* from 0x01 to 0xFF */
40
41/* Parameters strings for track files */
42
43#define TRK_SECT_HDR "Header"
44
45#define TRK_ATT_WIDTH "width"
46#define TRK_ATT_SURF "surface"
47#define TRK_ATT_NAME "name"
48#define TRK_ATT_VERSION "version"
49#define TRK_ATT_AUTHOR "author"
50#define TRK_ATT_DESCR "description"
51#define TRK_ATT_CAT "category"
52
53#define TRK_SECT_GEOREFERENCE "Georeference"
54#define TRK_ATT_GEO_LATITUDE "latitude"
55#define TRK_ATT_GEO_LONGITUDE "longitude"
56#define TRK_ATT_GEO_ALTITUDE "altitude"
57#define TRK_ATT_GEO_HEADING "heading"
58
59#define TRK_SECT_GRAPH "Graphic"
60
61#define TRK_ATT_3DDESC "3d description"
62#define TRK_ATT_BKGRND "background image"
63#define TRK_ATT_BKGRND2 "background image2"
64#define TRK_ATT_BGTYPE "background type"
65#define TRK_ATT_BGCLR_R "background color R"
66#define TRK_ATT_BGCLR_G "background color G"
67#define TRK_ATT_BGCLR_B "background color B"
68#define TRK_LST_ENV "Environment Mapping"
69#define TRK_ATT_ENVNAME "env map image"
70#define TRK_ATT_SPEC_R "specular color R"
71#define TRK_ATT_SPEC_G "specular color G"
72#define TRK_ATT_SPEC_B "specular color B"
73#define TRK_ATT_AMBIENT_R "ambient color R"
74#define TRK_ATT_AMBIENT_G "ambient color G"
75#define TRK_ATT_AMBIENT_B "ambient color B"
76#define TRK_ATT_DIFFUSE_R "diffuse color R"
77#define TRK_ATT_DIFFUSE_G "diffuse color G"
78#define TRK_ATT_DIFFUSE_B "diffuse color B"
79#define TRK_ATT_SHIN "shininess"
80#define TRK_ATT_LIPOS_X "light position x"
81#define TRK_ATT_LIPOS_Y "light position y"
82#define TRK_ATT_LIPOS_Z "light position z"
83#define TRK_ATT_FOVFACT "fov factor"
84
85#define TRK_SECT_TURNMARKS "Graphic/Turn Marks"
86#define TRK_ATT_HSPACE "horizontal space"
87#define TRK_ATT_VSPACE "vertical space"
88
89#define TRK_SECT_TERRAIN "Graphic/Terrain Generation"
90
91#define TRK_ATT_TSTEP "track step"
92#define TRK_ATT_BMARGIN "border margin"
93#define TRK_ATT_BSTEP "border step"
94#define TRK_ATT_TTRANSITION "terrain transition"
95#define TRK_ATT_CROSSING_BRIDGE_SOCKET_GAP "crossing bridge socket gap"
96#define TRK_ATT_CROSSING_BRIDGE_THICKNESS "crossing bridge thickness"
97#define TRK_ATT_CROSSING_UNDERSIDE_SURFACE "crossing bridge underside surface"
98#define TRK_ATT_CROSSING_SIDE_SURFACE "crossing bridge side surface"
99#define TRK_ATT_CROSSING_SOCKET_SURFACE "crossing bridge socket surface"
100#define TRK_ATT_CROSSING_FLOOR_SURFACE "crossing bridge floor surface"
101#define TRK_ATT_ORIENT "orientation"
102#define TRK_VAL_CLOCK "clockwise"
103#define TRK_VAL_CCLOCK "counter-clockwise"
104#define TRK_ATT_SURFRAND "texture randomness"
105#define TRK_ATT_RELIEF "relief file"
106#define TRK_ATT_ELEVATION "elevation map"
107#define TRK_ATT_ALT_MAX "maximum altitude"
108#define TRK_ATT_ALT_MIN "minimum altitude"
109#define TRK_ATT_GRPSZ "group size"
110#define TRK_ATT_OBJMAP "object map"
111#define TRK_ATT_COLOR "color"
112#define TRK_ATT_OBJECT "object"
113#define TRK_ATT_SEED "random seed"
114#define TRK_ATT_ORIENTATION_TYPE "orientation type"
115#define TRK_ATT_ORIENTATION "orientation"
116#define TRK_ATT_DH "delta height"
117#define TRK_ATT_DV "delta vert"
118#define TRK_SECT_OBJMAP "Object Maps"
119#define TRK_SECT_SURFACES "Surfaces"
120#define TRK_SECT_OBJECTS "Objects"
121
122#define TRK_ATT_FRICTION "friction"
123#define TRK_ATT_ROLLRES "rolling resistance"
124#define TRK_ATT_ROUGHT "roughness"
125#define TRK_ATT_ROUGHTWL "roughness wavelength"
126#define TRK_ATT_DAMMAGE "dammage"
127#define TRK_ATT_REBOUND "rebound"
128#define TRK_ATT_TEXTURE "texture name"
129#define TRK_ATT_BUMPNAME "bump name"
130#define TRK_ATT_RACELINENAME "raceline name"
131#define TRK_ATT_TEXTYPE "texture type"
132#define TRK_ATT_TEXLINK "texture link with previous"
133#define TRK_ATT_TEXSIZE "texture size"
134#define TRK_ATT_TEXSIZE_V "texture size v"
135#define TRK_ATT_BUMPSIZE "bump size"
136#define TRK_ATT_TEXSTARTBOUNDARY "texture start on boundary"
137#define TRK_ATT_TEXMIPMAP "texture mipmap"
138#define TRK_ATT_R1 "color R1"
139#define TRK_ATT_G1 "color G1"
140#define TRK_ATT_B1 "color B1"
141#define TRK_ATT_R2 "color R2"
142#define TRK_ATT_G2 "color G2"
143#define TRK_ATT_B2 "color B2"
144
145#define TRK_ATT_STEPLEN "steps length"
146
147#define TRK_VAL_YES "yes"
148#define TRK_VAL_NO "no"
149
150#define TRK_SECT_MAIN "Main Track"
151#define TRK_LST_SEGMENTS "Track Segments"
152#define TRK_ATT_TYPE "type"
153#define TRK_ATT_RLEXT "raceline ext"
154#define TRK_ATT_RLINT "raceline int"
155#define TRK_ATT_RLWIDTHSCALE "raceline widthscale"
156
157#define TRK_VAL_STR "str"
158#define TRK_VAL_LFT "lft"
159#define TRK_VAL_RGT "rgt"
160
161#define TRK_ATT_LG "lg"
162#define TRK_ATT_RADIUS "radius"
163#define TRK_ATT_RADIUSEND "end radius"
164#define TRK_ATT_ARC "arc"
165#define TRK_ATT_ZS "z start"
166#define TRK_ATT_ZE "z end"
167#define TRK_ATT_ZSL "z start left"
168#define TRK_ATT_ZSR "z start right"
169#define TRK_ATT_ZEL "z end left"
170#define TRK_ATT_ZER "z end right"
171#define TRK_ATT_GRADE "grade"
172#define TRK_ATT_BKS "banking start"
173#define TRK_ATT_BKE "banking end"
174#define TRK_ATT_ID "id"
175#define TRK_ATT_PROFIL "profil"
176#define TRK_ATT_PROFSTEPS "profil steps"
177#define TRK_ATT_PROFSTEPSLEN "profil steps length"
178#define TRK_ATT_PROFTGTS "profil start tangent"
179#define TRK_ATT_PROFTGTE "profil end tangent"
180#define TRK_ATT_PROFTGTSL "profil start tangent left"
181#define TRK_ATT_PROFTGTEL "profil end tangent left"
182#define TRK_ATT_PROFTGTSR "profil start tangent right"
183#define TRK_ATT_PROFTGTER "profil end tangent right"
184#define TRK_ATT_MARKS "marks"
185#define TRK_ATT_ENVMAP "env map"
186
187#define TRK_SECT_PITS "Pits"
188
189#define TRK_ATT_ENTRY "entry"
190#define TRK_ATT_EXIT "exit"
191#define TRK_ATT_START "start"
192#define TRK_ATT_END "end"
193#define TRK_ATT_SIDE "side"
194#define TRK_ATT_LEN "length"
195#define TRK_ATT_SPD_LIM "speed limit"
196
197#define TRK_SECT_LSIDE "Left Side"
198#define TRK_SECT_RSIDE "Right Side"
199#define TRK_SECT_LBORDER "Left Border"
200#define TRK_SECT_RBORDER "Right Border"
201#define TRK_SECT_LBARRIER "Left Barrier"
202#define TRK_SECT_RBARRIER "Right Barrier"
203
204#define TRK_ATT_SWIDTH "start width"
205#define TRK_ATT_EWIDTH "end width"
206#define TRK_ATT_STYLE "style"
207#define TRK_ATT_HEIGHT "height"
208#define TRK_ATT_BANKTYPE "banking type"
209
210#define TRK_VAL_PLAN "plan"
211#define TRK_VAL_WALL "wall"
212#define TRK_VAL_CURB "curb"
213#define TRK_VAL_FENCE "fence"
214
215
216#define TRK_SECT_CAM "Cameras"
217
218#define TRK_ATT_SEGMENT "segment"
219#define TRK_ATT_TORIGHT "to right"
220#define TRK_ATT_TOSTART "to start"
221#define TRK_ATT_HEIGHT "height"
222#define TRK_ATT_CAM_FOV "fov start"
223#define TRK_ATT_CAM_FOVE "fov end"
224
225#define TRK_VAL_ASPHALT "asphalt"
226#define TRK_VAL_CONCRETE "concrete"
227#define TRK_VAL_BRIDGE_UNDERSIDE "bridge-underside"
228#define TRK_VAL_BRIDGE_SIDE "bridge-side"
229#define TRK_VAL_BRIDGE_SOCKET "bridge-socket"
230#define TRK_VAL_BRIDGE_FLOOR "bridge-floor"
231#define TRK_VAL_GRASS "grass"
232#define TRK_VAL_SAND "sand"
233#define TRK_VAL_DIRT "dirt"
234#define TRK_VAL_BARRIER "barrier"
235
236#define TRK_VAL_LINEAR "linear"
237#define TRK_VAL_SPLINE "spline"
238
239#define TRK_VAL_TANGENT "tangent"
240#define TRK_VAL_LEVEL "level"
241
243typedef struct RoadCam
244{
245 char *name;
247 struct RoadCam *next;
249
251typedef struct SegExt
252{
254 int *marks;
256
257
272
273
274
276typedef struct trackBarrier {
277 int style;
281 vec2f normal; // Normal on the vertical track inside pointing towards the track middle.
283
284
293typedef struct trackSeg {
294 const char *name;
295 int id;
296
297 int type;
302#define TR_RGT 1
303#define TR_LFT 2
304#define TR_STR 3
305
306 int type2;
313#define TR_MAIN 1
314#define TR_LSIDE 2
315#define TR_RSIDE 3
316#define TR_LBORDER 4
317#define TR_RBORDER 5
318
319 int style;
326#define TR_PLAN 0
327#define TR_CURB 1
328#define TR_WALL 2
329#define TR_FENCE 3
330#define TR_PITBUILDING 4
331
349#define TR_SL 0
350#define TR_SR 1
351#define TR_EL 2
352#define TR_ER 3
353
364#define TR_ZS 0
365#define TR_ZE 1
366#define TR_YL 2
367#define TR_YR 3
368#define TR_XS 4
369#define TR_XE 5
370#define TR_CS 6
371
372 /* constants used to find the height of a point */
373 tdble Kzl; /* long constant */
374 tdble Kzw; /* width constant */
375 /* constant used to find the width of a segment */
376 tdble Kyl; /* find y along x */
377 t3Dd rgtSideNormal; /* normal to the right side in case of straight segment */
378 int envIndex; /* Environment mapping image index */
379
381
382 unsigned int raceInfo;
393#define TR_NORMAL 0x00000000
394#define TR_LAST 0x00000001
395#define TR_START 0x00000002
396#define TR_PITLANE 0x00000004
397#define TR_SPEEDLIMIT 0x00000008
398#define TR_PITENTRY 0x00000010
399#define TR_PITEXIT 0x00000020
400#define TR_PIT 0x00000040
401#define TR_PITSTART 0x00000080
402#define TR_PITEND 0x00000100
403
404 /* pointers */
405
406 /* optionnal extensions */
408
411 tRoadCam *cam; /* current camera */
412 struct trackSeg *next;
413 struct trackSeg *prev;
414
415 // Union to avoid code duplication for left/right side cases and to
416 // keep compatibility of code. The side definition is so ugly to
417 // match the one of the barrier[].
418#define TR_SIDE_LFT 1
419#define TR_SIDE_RGT 0
420 union {
421 struct { struct trackSeg *rside, *lside; };
422 struct trackSeg* side[2];
423 };
424
426
427/* selection for local position structure */
428#define TR_TORIGHT 0
429#define TR_TOMIDDLE 1
430#define TR_TOLEFT 2
431
433typedef struct
434{
436 int type;
441
442#define TR_LPOS_MAIN 0
443#define TR_LPOS_SEGMENT 1
444#define TR_LPOS_TRACK 2
445
450} tTrkLocPos;
451
452struct CarElt;
453
455typedef struct TrackOwnPit
456{
459#define TR_PIT_STATE_FREE -1
460#define TR_PIT_MAXCARPERPIT 4 // maximum cars per pit
463 int freeCarIndex; // Index of next free car entry (look at the next line).
466
468typedef struct
469{
470 int type;
474#define TR_PIT_NONE 0
475#define TR_PIT_ON_TRACK_SIDE 1
476#define TR_PIT_ON_SEPARATE_PATH 2
479 int side;
494
502
503typedef struct
504{
505 const char *background;
508 float bgColor[3];
509 int envnb;
510 const char **env;
513
528
553
554
561typedef tTrack*(*tfTrackBuild)(char* filename);
562
573
581
594typedef void(*tfTrackGlobal2Local)(tTrackSeg* seg, tdble X, tdble Y, tTrkLocPos* pos, int type);
595
603typedef void(*tfTrackLocal2Global)(tTrkLocPos* pos, tdble* X, tdble* Y);
604
616typedef void(*tfTrackSideNormal)(tTrackSeg* seg, tdble X, tdble Y, int side, t3Dd* norm);
617
624typedef void(*tfTrackSurfaceNormal)(tTrkLocPos *pos, t3Dd* norm);
625
629typedef void(*tfTrackShutdown)(void);
630
645
646
647/* For Type 3 tracks (now obsolete) */
648
649#define TRK_LST_SURF "List"
650#define TRK_LST_CAM "list"
651#define TRK_ATT_PIT_ENTRY "pit entry"
652#define TRK_ATT_PIT_EXIT "pit exit"
653#define TRK_ATT_PIT_START "pit start"
654#define TRK_ATT_PIT_END "pit end"
655#define TRK_ATT_PIT_TYPE "pit type"
656#define TRK_ATT_PIT_SIDE "pit side"
657#define TRK_ATT_PIT_LEN "pit length"
658#define TRK_ATT_PIT_WIDTH "pit width"
659
660#define TRK_LST_SEG "segments"
661#define TRK_ATT_ENVIND "env map index"
662
663
664#define TRK_ATT_LST "lside type"
665#define TRK_ATT_LSW "lside width"
666#define TRK_ATT_LSWS "lside start width"
667#define TRK_ATT_LSWE "lside end width"
668#define TRK_ATT_LSSURF "lside surface"
669#define TRK_ATT_RST "rside type"
670#define TRK_ATT_RSW "rside width"
671#define TRK_ATT_RSWS "rside start width"
672#define TRK_ATT_RSWE "rside end width"
673#define TRK_ATT_RSSURF "rside surface"
674#define TRK_ATT_LBS "lborder style"
675#define TRK_ATT_LBW "lborder width"
676#define TRK_ATT_LBH "lborder height"
677#define TRK_ATT_LBSURF "lborder surface"
678#define TRK_ATT_RBS "rborder style"
679#define TRK_ATT_RBW "rborder width"
680#define TRK_ATT_RBH "rborder height"
681#define TRK_ATT_RBSURF "rborder surface"
682
683#define TRK_ATT_BHEIGHT "border height"
684
685#define TRK_ATT_LBAS "lbarrier style"
686#define TRK_ATT_LBAW "lbarrier width"
687#define TRK_ATT_LBAH "lbarrier height"
688#define TRK_ATT_LBAFRCT "lbarrier friction"
689#define TRK_ATT_LBASURF "lbarrier surface"
690#define TRK_ATT_RBAS "rbarrier style"
691#define TRK_ATT_RBAW "rbarrier width"
692#define TRK_ATT_RBAH "rbarrier height"
693#define TRK_ATT_LBAFRCT "lbarrier friction"
694#define TRK_ATT_RBASURF "rbarrier surface"
695
696#define TRK_VAL_PIT_TYPE_NONE "no pit"
697#define TRK_VAL_PIT_TYPE_SIDE "track side"
698#define TRK_VAL_PIT_TYPE_SEP_PATH "seperate path"
699
700#define TRK_ATT_FINISH "finish segment"
701
702#endif /* _TRACKV1_H_ */
@ Y
Definition Basic.h:58
@ X
Definition Basic.h:58
float tdble
Floating point type used in TORCS.
Definition tgf.h:47
void(* tfTrackShutdown)(void)
Release current track and all its resources.
Definition track.h:629
tTrack *(* tfTrackBuild)(char *filename)
Read given track from filename into tTrack struct.
Definition track.h:561
void(* tfTrackGlobal2Local)(tTrackSeg *seg, tdble X, tdble Y, tTrkLocPos *pos, int type)
Convert a global position (segment, X, Y) into a local position (segment, toRight,...
Definition track.h:594
tdble(* tfTrackHeightL)(tTrkLocPos *pos)
Returns the absolute height in meters of the road at the local position.
Definition track.h:580
void(* tfTrackSideNormal)(tTrackSeg *seg, tdble X, tdble Y, int side, t3Dd *norm)
Get the normal vector (in global coordinate system) of the border of the track including the sides.
Definition track.h:616
tdble(* tfTrackHeightG)(tTrackSeg *seg, tdble X, tdble Y)
Returns the absolute height in meters of the road at the given global position.
Definition track.h:572
void(* tfTrackLocal2Global)(tTrkLocPos *pos, tdble *X, tdble *Y)
Convert a local position (segment, toRight, toStart) into a global one (X, Y)
Definition track.h:603
void(* tfTrackSurfaceNormal)(tTrkLocPos *pos, t3Dd *norm)
Get the normal vector of the road (pointing upward).
Definition track.h:624
struct trackSeg tTrackSeg
Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right...
v2t< float > vec2f
Definition linalg_t.h:36
Car structure (tCarElt).
Definition car.h:458
road camera
Definition track.h:244
struct RoadCam * next
Definition track.h:247
char * name
Definition track.h:245
t3Dd pos
Definition track.h:246
Extended track segment.
Definition track.h:252
int * marks
marks array
Definition track.h:254
int nbMarks
turn marks
Definition track.h:253
Driver's pit.
Definition track.h:456
tdble lmin
Pitting area length min.
Definition track.h:461
int pitCarIndex
Index of the car in the car array below which occupies the pit.
Definition track.h:458
tTrkLocPos pos
Center of the pit position.
Definition track.h:457
int freeCarIndex
Definition track.h:463
struct CarElt * car[TR_PIT_MAXCARPERPIT]
Car links for pit.
Definition track.h:464
tdble lmax
Pitting area length max.
Definition track.h:462
3D point.
Definition tgf.h:114
Optional v4 geographic reference at the main road centre at the start of the first segment (seg->next...
Definition track.h:519
tdble heading
Radians clockwise from true north, [0, 2*pi)
Definition track.h:523
tdble altitude
Metres above mean sea level at reference road centre.
Definition track.h:522
int hasLocation
Both latitude and longitude are available.
Definition track.h:524
tdble longitude
Degrees east, [-180, 180].
Definition track.h:521
tdble latitude
Degrees north, [-90, 90].
Definition track.h:520
tTurnMarksInfo turnMarksInfo
Definition track.h:511
float bgColor[3]
Definition track.h:508
char * background2
Definition track.h:506
const char ** env
Definition track.h:510
const char * background
Definition track.h:505
Track structure.
Definition track.h:533
const char * name
Name of the track.
Definition track.h:534
tTrackGraphicInfo graphic
Definition track.h:550
tTrackSeg * seg
Main track.
Definition track.h:545
const char * author
Author's name.
Definition track.h:535
tTrackSurface * surfaces
Segment surface list.
Definition track.h:546
const char * category
Category of the track.
Definition track.h:539
tdble width
main track width
Definition track.h:543
tdble length
main track length
Definition track.h:542
t3Dd max
Definition track.h:549
void * params
Parameters handle.
Definition track.h:537
char * internalname
Internal name of the track.
Definition track.h:538
int version
Version of the track type.
Definition track.h:541
int nseg
Number of segments.
Definition track.h:540
char * filename
Filename of the track description.
Definition track.h:536
t3Dd min
Definition track.h:548
tTrackPitInfo pits
Pits information.
Definition track.h:544
tTrackGeoreference georeference
Definition track.h:551
Interface Structure for Track Loader.
Definition track.h:634
tfTrackBuild trkBuild
build track structure for simu
Definition track.h:635
tfTrackSurfaceNormal trkSurfaceNormal
Definition track.h:642
tfTrackShutdown trkShutdown
Definition track.h:643
tfTrackHeightL trkHeightL
Definition track.h:638
tfTrackHeightG trkHeightG
Definition track.h:637
tfTrackSideNormal trkSideNormal
Definition track.h:641
tfTrackBuild trkBuildEx
build with graphic extensions (used by trackgen tool)
Definition track.h:636
tfTrackGlobal2Local trkGlobal2Local
Definition track.h:639
tfTrackLocal2Global trkLocal2Global
Definition track.h:640
Pits Info Structure.
Definition track.h:469
tTrackSeg * pitStart
Pit lane segment.
Definition track.h:487
tTrackSeg * pitEntry
Pit lane segment.
Definition track.h:486
int nPitSeg
actual number of pits
Definition track.h:478
tTrackOwnPit * driversPits
List of pits by driver.
Definition track.h:490
tTrackSeg * pitExit
Pit lane segment.
Definition track.h:489
int side
Pits side:
Definition track.h:479
tdble len
Lenght of each pit stop.
Definition track.h:483
int carsPerPit
Definition track.h:491
tTrackSeg * pitEnd
Pit lane segment.
Definition track.h:488
tdble speedLimit
Speed limit between pitStart and pitEnd.
Definition track.h:485
int type
Type of Pit:
Definition track.h:470
int nMaxPits
number max of pits
Definition track.h:477
tdble width
Width of each pit stop.
Definition track.h:484
int driversPitsNb
Number of drivers.
Definition track.h:492
Location on the track in local coordinates.
Definition track.h:434
tdble toMiddle
Distance (+ to left, - to right) relative to the middle of segment.
Definition track.h:448
tdble toLeft
Distance (- to left, + to right) relative to left side of segment.
Definition track.h:449
tdble toRight
Distance (+ to left, - to right) relative to the right side of segment.
Definition track.h:447
tTrackSeg * seg
Track segment.
Definition track.h:435
int type
Type of description:
Definition track.h:436
tdble toStart
Distance to start of segment (or arc if turn)
Definition track.h:446
tdble height
Definition track.h:497
tdble vSpace
Definition track.h:500
tdble width
Definition track.h:498
tdble hSpace
Definition track.h:499
Barrier.
Definition track.h:276
tdble width
Barrier width.
Definition track.h:278
tdble height
Barrier height.
Definition track.h:279
tTrackSurface * surface
Barrier surface.
Definition track.h:280
vec2f normal
Definition track.h:281
int style
Barrier style.
Definition track.h:277
Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right...
Definition track.h:293
int type
Geometrical type:
Definition track.h:297
tTrackSurface * surface
Segment surface.
Definition track.h:409
tdble height
Max height for curbs.
Definition track.h:380
tSegExt * ext
Definition track.h:407
t3Dd vertex[4]
Coordinates of the 4 corners of the segment.
Definition track.h:342
tdble radiusr
Radius in meters of the right side of the track (>0)
Definition track.h:338
unsigned int raceInfo
Type of segment regarding the race: Mask value in:
Definition track.h:382
int envIndex
Definition track.h:378
tdble radius
Radius in meters of the middle of the track (>0)
Definition track.h:337
tdble arc
Arc in rad of the curve (>0)
Definition track.h:340
tdble angle[7]
Definition track.h:354
tdble lgfromstart
Length of beginning of segment from starting line.
Definition track.h:336
int id
Segment number.
Definition track.h:295
t3Dd center
Center of the curve.
Definition track.h:341
tdble Kyl
Definition track.h:376
const char * name
Segment name.
Definition track.h:294
tdble length
Length in meters of the middle of the track.
Definition track.h:332
tdble radiusl
Radius in meters of the left side of the track (>0)
Definition track.h:339
tdble Kzw
Definition track.h:374
tRoadCam * cam
Definition track.h:411
struct trackSeg * rside
Definition track.h:421
tTrackBarrier * barrier[2]
Segment barriers.
Definition track.h:410
struct trackSeg * next
Next segment.
Definition track.h:412
tdble startWidth
Width of the beginning of the segment.
Definition track.h:334
struct trackSeg * prev
Previous segment.
Definition track.h:413
int style
Border and barrier segments style:
Definition track.h:319
struct trackSeg * side[2]
Definition track.h:422
t3Dd rgtSideNormal
Definition track.h:377
tdble width
Width of the segment (if constant width)
Definition track.h:333
tdble Kzl
Definition track.h:373
int type2
Position type:
Definition track.h:306
struct trackSeg * lside
Definition track.h:421
tdble endWidth
Width of the end of the segment.
Definition track.h:335
Surface.
Definition track.h:259
tdble kRebound
Coefficient of energy restitution.
Definition track.h:265
tdble kDammage
Dammages in case of collision.
Definition track.h:269
tdble kFriction
Coefficient of friction.
Definition track.h:264
tdble kRollRes
Rolling resistance.
Definition track.h:266
const char * material
Type of material used.
Definition track.h:262
struct trackSurface * next
Next surface in list.
Definition track.h:260
tdble kRoughWaveLen
Wave length in m of the surface.
Definition track.h:268
tdble kRoughness
Roughtness in m of the surface (wave height)
Definition track.h:267
struct TrackOwnPit tTrackOwnPit
Driver's pit.
struct trackSurface tTrackSurface
Surface.
struct RoadCam tRoadCam
road camera
struct SegExt tSegExt
Extended track segment.
struct trackBarrier tTrackBarrier
Barrier.
#define TR_PIT_MAXCARPERPIT
Definition track.h:460