TORCS  1.3.9
The Open Racing Car Simulator
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 
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_GRAPH "Graphic"
54 
55 #define TRK_ATT_3DDESC "3d description"
56 #define TRK_ATT_BKGRND "background image"
57 #define TRK_ATT_BKGRND2 "background image2"
58 #define TRK_ATT_BGTYPE "background type"
59 #define TRK_ATT_BGCLR_R "background color R"
60 #define TRK_ATT_BGCLR_G "background color G"
61 #define TRK_ATT_BGCLR_B "background color B"
62 #define TRK_LST_ENV "Environment Mapping"
63 #define TRK_ATT_ENVNAME "env map image"
64 #define TRK_ATT_SPEC_R "specular color R"
65 #define TRK_ATT_SPEC_G "specular color G"
66 #define TRK_ATT_SPEC_B "specular color B"
67 #define TRK_ATT_AMBIENT_R "ambient color R"
68 #define TRK_ATT_AMBIENT_G "ambient color G"
69 #define TRK_ATT_AMBIENT_B "ambient color B"
70 #define TRK_ATT_DIFFUSE_R "diffuse color R"
71 #define TRK_ATT_DIFFUSE_G "diffuse color G"
72 #define TRK_ATT_DIFFUSE_B "diffuse color B"
73 #define TRK_ATT_SHIN "shininess"
74 #define TRK_ATT_LIPOS_X "light position x"
75 #define TRK_ATT_LIPOS_Y "light position y"
76 #define TRK_ATT_LIPOS_Z "light position z"
77 #define TRK_ATT_FOVFACT "fov factor"
78 
79 #define TRK_SECT_TURNMARKS "Graphic/Turn Marks"
80 #define TRK_ATT_HSPACE "horizontal space"
81 #define TRK_ATT_VSPACE "vertical space"
82 
83 #define TRK_SECT_TERRAIN "Graphic/Terrain Generation"
84 
85 #define TRK_ATT_TSTEP "track step"
86 #define TRK_ATT_BMARGIN "border margin"
87 #define TRK_ATT_BSTEP "border step"
88 #define TRK_ATT_ORIENT "orientation"
89 #define TRK_VAL_CLOCK "clockwise"
90 #define TRK_VAL_CCLOCK "counter-clockwise"
91 #define TRK_ATT_SURFRAND "texture randomness"
92 #define TRK_ATT_RELIEF "relief file"
93 #define TRK_ATT_ELEVATION "elevation map"
94 #define TRK_ATT_ALT_MAX "maximum altitude"
95 #define TRK_ATT_ALT_MIN "minimum altitude"
96 #define TRK_ATT_GRPSZ "group size"
97 #define TRK_ATT_OBJMAP "object map"
98 #define TRK_ATT_COLOR "color"
99 #define TRK_ATT_OBJECT "object"
100 #define TRK_ATT_SEED "random seed"
101 #define TRK_ATT_ORIENTATION_TYPE "orientation type"
102 #define TRK_ATT_ORIENTATION "orientation"
103 #define TRK_ATT_DH "delta height"
104 #define TRK_ATT_DV "delta vert"
105 #define TRK_SECT_OBJMAP "Object Maps"
106 #define TRK_SECT_SURFACES "Surfaces"
107 #define TRK_SECT_OBJECTS "Objects"
108 
109 #define TRK_ATT_FRICTION "friction"
110 #define TRK_ATT_ROLLRES "rolling resistance"
111 #define TRK_ATT_ROUGHT "roughness"
112 #define TRK_ATT_ROUGHTWL "roughness wavelength"
113 #define TRK_ATT_DAMMAGE "dammage"
114 #define TRK_ATT_REBOUND "rebound"
115 #define TRK_ATT_TEXTURE "texture name"
116 #define TRK_ATT_BUMPNAME "bump name"
117 #define TRK_ATT_RACELINENAME "raceline name"
118 #define TRK_ATT_TEXTYPE "texture type"
119 #define TRK_ATT_TEXLINK "texture link with previous"
120 #define TRK_ATT_TEXSIZE "texture size"
121 #define TRK_ATT_BUMPSIZE "bump size"
122 #define TRK_ATT_TEXSTARTBOUNDARY "texture start on boundary"
123 #define TRK_ATT_TEXMIPMAP "texture mipmap"
124 #define TRK_ATT_R1 "color R1"
125 #define TRK_ATT_G1 "color G1"
126 #define TRK_ATT_B1 "color B1"
127 #define TRK_ATT_R2 "color R2"
128 #define TRK_ATT_G2 "color G2"
129 #define TRK_ATT_B2 "color B2"
130 
131 #define TRK_ATT_STEPLEN "steps length"
132 
133 #define TRK_VAL_YES "yes"
134 #define TRK_VAL_NO "no"
135 
136 #define TRK_SECT_MAIN "Main Track"
137 #define TRK_LST_SEGMENTS "Track Segments"
138 #define TRK_ATT_TYPE "type"
139 #define TRK_ATT_RLEXT "raceline ext"
140 #define TRK_ATT_RLINT "raceline int"
141 #define TRK_ATT_RLWIDTHSCALE "raceline widthscale"
142 
143 #define TRK_VAL_STR "str"
144 #define TRK_VAL_LFT "lft"
145 #define TRK_VAL_RGT "rgt"
146 
147 #define TRK_ATT_LG "lg"
148 #define TRK_ATT_RADIUS "radius"
149 #define TRK_ATT_RADIUSEND "end radius"
150 #define TRK_ATT_ARC "arc"
151 #define TRK_ATT_ZS "z start"
152 #define TRK_ATT_ZE "z end"
153 #define TRK_ATT_ZSL "z start left"
154 #define TRK_ATT_ZSR "z start right"
155 #define TRK_ATT_ZEL "z end left"
156 #define TRK_ATT_ZER "z end right"
157 #define TRK_ATT_GRADE "grade"
158 #define TRK_ATT_BKS "banking start"
159 #define TRK_ATT_BKE "banking end"
160 #define TRK_ATT_ID "id"
161 #define TRK_ATT_PROFIL "profil"
162 #define TRK_ATT_PROFSTEPS "profil steps"
163 #define TRK_ATT_PROFSTEPSLEN "profil steps length"
164 #define TRK_ATT_PROFTGTS "profil start tangent"
165 #define TRK_ATT_PROFTGTE "profil end tangent"
166 #define TRK_ATT_PROFTGTSL "profil start tangent left"
167 #define TRK_ATT_PROFTGTEL "profil end tangent left"
168 #define TRK_ATT_PROFTGTSR "profil start tangent right"
169 #define TRK_ATT_PROFTGTER "profil end tangent right"
170 #define TRK_ATT_MARKS "marks"
171 #define TRK_ATT_ENVMAP "env map"
172 #define TRK_ATT_DOVFACTOR "DoV factor"
173 
174 #define TRK_SECT_PITS "Pits"
175 
176 #define TRK_ATT_ENTRY "entry"
177 #define TRK_ATT_EXIT "exit"
178 #define TRK_ATT_START "start"
179 #define TRK_ATT_END "end"
180 #define TRK_ATT_SIDE "side"
181 #define TRK_ATT_LEN "length"
182 #define TRK_ATT_SPD_LIM "speed limit"
183 
184 #define TRK_SECT_LSIDE "Left Side"
185 #define TRK_SECT_RSIDE "Right Side"
186 #define TRK_SECT_LBORDER "Left Border"
187 #define TRK_SECT_RBORDER "Right Border"
188 #define TRK_SECT_LBARRIER "Left Barrier"
189 #define TRK_SECT_RBARRIER "Right Barrier"
190 
191 #define TRK_ATT_SWIDTH "start width"
192 #define TRK_ATT_EWIDTH "end width"
193 #define TRK_ATT_STYLE "style"
194 #define TRK_ATT_HEIGHT "height"
195 #define TRK_ATT_BANKTYPE "banking type"
196 
197 #define TRK_VAL_PLAN "plan"
198 #define TRK_VAL_WALL "wall"
199 #define TRK_VAL_CURB "curb"
200 #define TRK_VAL_FENCE "fence"
201 
202 
203 #define TRK_SECT_CAM "Cameras"
204 
205 #define TRK_ATT_SEGMENT "segment"
206 #define TRK_ATT_TORIGHT "to right"
207 #define TRK_ATT_TOSTART "to start"
208 #define TRK_ATT_HEIGHT "height"
209 #define TRK_ATT_CAM_FOV "fov start"
210 #define TRK_ATT_CAM_FOVE "fov end"
211 
212 #define TRK_VAL_ASPHALT "asphalt"
213 #define TRK_VAL_CONCRETE "concrete"
214 #define TRK_VAL_GRASS "grass"
215 #define TRK_VAL_SAND "sand"
216 #define TRK_VAL_DIRT "dirt"
217 #define TRK_VAL_BARRIER "barrier"
218 
219 #define TRK_VAL_LINEAR "linear"
220 #define TRK_VAL_SPLINE "spline"
221 
222 #define TRK_VAL_TANGENT "tangent"
223 #define TRK_VAL_LEVEL "level"
224 
226 typedef struct RoadCam
227 {
228  char *name;
230  struct RoadCam *next;
231 } tRoadCam;
232 
234 typedef struct SegExt
235 {
236  int nbMarks;
237  int *marks;
238 } tSegExt;
239 
240 
242 typedef struct trackSurface {
243  struct trackSurface *next;
245  const char *material;
254 } tTrackSurface;
255 
256 
257 
259 typedef struct trackBarrier {
260  int style;
264  vec2f normal; // Normal on the vertical track inside pointing towards the track middle.
265 } tTrackBarrier;
266 
267 
276 typedef struct trackSeg {
277  const char *name;
278  int id;
280  int type;
285 #define TR_RGT 1
286 #define TR_LFT 2
287 #define TR_STR 3
289  int type2;
296 #define TR_MAIN 1
297 #define TR_LSIDE 2
298 #define TR_RSIDE 3
299 #define TR_LBORDER 4
300 #define TR_RBORDER 5
302  int style;
309 #define TR_PLAN 0
310 #define TR_CURB 1
311 #define TR_WALL 2
312 #define TR_FENCE 3
313 #define TR_PITBUILDING 4
315  tdble length;
316  tdble width;
317  tdble startWidth;
318  tdble endWidth;
319  tdble lgfromstart;
320  tdble radius;
321  tdble radiusr;
322  tdble radiusl;
323  tdble arc;
324  t3Dd center;
325  t3Dd vertex[4];
332 #define TR_SL 0
333 #define TR_SR 1
334 #define TR_EL 2
335 #define TR_ER 3
337  tdble angle[7];
347 #define TR_ZS 0
348 #define TR_ZE 1
349 #define TR_YL 2
350 #define TR_YR 3
351 #define TR_XS 4
352 #define TR_XE 5
353 #define TR_CS 6
355  /* constants used to find the height of a point */
356  tdble Kzl; /* long constant */
357  tdble Kzw; /* width constant */
358  /* constant used to find the width of a segment */
359  tdble Kyl; /* find y along x */
360  t3Dd rgtSideNormal; /* normal to the right side in case of straight segment */
361  int envIndex; /* Environment mapping image index */
362 
365  unsigned int raceInfo;
376 #define TR_NORMAL 0x00000000
377 #define TR_LAST 0x00000001
378 #define TR_START 0x00000002
379 #define TR_PITLANE 0x00000004
380 #define TR_SPEEDLIMIT 0x00000008
381 #define TR_PITENTRY 0x00000010
382 #define TR_PITEXIT 0x00000020
383 #define TR_PIT 0x00000040
384 #define TR_PITSTART 0x00000080
385 #define TR_PITEND 0x00000100
387  tdble DoVfactor; /* the factor to use in calculating DoV for this Seg */
388 
389  /* pointers */
390 
391  /* optionnal extensions */
393 
396  tRoadCam *cam; /* current camera */
397  struct trackSeg *next;
398  struct trackSeg *prev;
400  // Union to avoid code duplication for left/right side cases and to
401  // keep compatibility of code. The side definition is so ugly to
402  // match the one of the barrier[].
403 #define TR_SIDE_LFT 1
404 #define TR_SIDE_RGT 0
405  union {
406  struct { struct trackSeg *rside, *lside; };
407  struct trackSeg* side[2];
408  };
409 
410 } tTrackSeg;
411 
412 /* selection for local position structure */
413 #define TR_TORIGHT 0
414 #define TR_TOMIDDLE 1
415 #define TR_TOLEFT 2
416 
418 typedef struct
419 {
421  int type;
427 #define TR_LPOS_MAIN 0
428 #define TR_LPOS_SEGMENT 1
429 #define TR_LPOS_TRACK 2
431  tdble toStart;
432  tdble toRight;
433  tdble toMiddle;
434  tdble toLeft;
435 } tTrkLocPos;
436 
437 struct CarElt;
438 
440 typedef struct TrackOwnPit
441 {
444 #define TR_PIT_STATE_FREE -1
445 #define TR_PIT_MAXCARPERPIT 4 // maximum cars per pit
448  int freeCarIndex; // Index of next free car entry (look at the next line).
450 } tTrackOwnPit;
451 
453 typedef struct
454 {
455  int type;
459 #define TR_PIT_NONE 0
460 #define TR_PIT_ON_TRACK_SIDE 1
461 #define TR_PIT_ON_SEPARATE_PATH 2
462  int nMaxPits;
463  int nPitSeg;
464  int side;
478 } tTrackPitInfo;
479 
480 typedef struct
481 {
487 
488 typedef struct
489 {
490  const char *background;
491  char *background2;
492  int bgtype;
493  float bgColor[3];
494  int envnb;
495  const char **env;
498 
502 typedef struct
503 {
504  const char *name;
505  const char *author;
506  char *filename;
507  void *params;
508  char *internalname;
509  const char *category;
510  int nseg;
511  int version;
521 } tTrack;
522 
523 
530 typedef tTrack*(*tfTrackBuild)(char* filename);
531 
542 
550 
563 typedef void(*tfTrackGlobal2Local)(tTrackSeg* seg, tdble X, tdble Y, tTrkLocPos* pos, int type);
564 
572 typedef void(*tfTrackLocal2Global)(tTrkLocPos* pos, tdble* X, tdble* Y);
573 
585 typedef void(*tfTrackSideNormal)(tTrackSeg* seg, tdble X, tdble Y, int side, t3Dd* norm);
586 
593 typedef void(*tfTrackSurfaceNormal)(tTrkLocPos *pos, t3Dd* norm);
594 
598 typedef void(*tfTrackShutdown)(void);
599 
603 typedef struct {
613 } tTrackItf;
614 
615 
616 /* For Type 3 tracks (now obsolete) */
617 
618 #define TRK_LST_SURF "List"
619 #define TRK_LST_CAM "list"
620 #define TRK_ATT_PIT_ENTRY "pit entry"
621 #define TRK_ATT_PIT_EXIT "pit exit"
622 #define TRK_ATT_PIT_START "pit start"
623 #define TRK_ATT_PIT_END "pit end"
624 #define TRK_ATT_PIT_TYPE "pit type"
625 #define TRK_ATT_PIT_SIDE "pit side"
626 #define TRK_ATT_PIT_LEN "pit length"
627 #define TRK_ATT_PIT_WIDTH "pit width"
628 
629 #define TRK_LST_SEG "segments"
630 #define TRK_ATT_ENVIND "env map index"
631 
632 
633 #define TRK_ATT_LST "lside type"
634 #define TRK_ATT_LSW "lside width"
635 #define TRK_ATT_LSWS "lside start width"
636 #define TRK_ATT_LSWE "lside end width"
637 #define TRK_ATT_LSSURF "lside surface"
638 #define TRK_ATT_RST "rside type"
639 #define TRK_ATT_RSW "rside width"
640 #define TRK_ATT_RSWS "rside start width"
641 #define TRK_ATT_RSWE "rside end width"
642 #define TRK_ATT_RSSURF "rside surface"
643 #define TRK_ATT_LBS "lborder style"
644 #define TRK_ATT_LBW "lborder width"
645 #define TRK_ATT_LBH "lborder height"
646 #define TRK_ATT_LBSURF "lborder surface"
647 #define TRK_ATT_RBS "rborder style"
648 #define TRK_ATT_RBW "rborder width"
649 #define TRK_ATT_RBH "rborder height"
650 #define TRK_ATT_RBSURF "rborder surface"
651 
652 #define TRK_ATT_BHEIGHT "border height"
653 
654 #define TRK_ATT_LBAS "lbarrier style"
655 #define TRK_ATT_LBAW "lbarrier width"
656 #define TRK_ATT_LBAH "lbarrier height"
657 #define TRK_ATT_LBAFRCT "lbarrier friction"
658 #define TRK_ATT_LBASURF "lbarrier surface"
659 #define TRK_ATT_RBAS "rbarrier style"
660 #define TRK_ATT_RBAW "rbarrier width"
661 #define TRK_ATT_RBAH "rbarrier height"
662 #define TRK_ATT_LBAFRCT "lbarrier friction"
663 #define TRK_ATT_RBASURF "rbarrier surface"
664 
665 #define TRK_VAL_PIT_TYPE_NONE "no pit"
666 #define TRK_VAL_PIT_TYPE_SIDE "track side"
667 #define TRK_VAL_PIT_TYPE_SEP_PATH "seperate path"
668 
669 #define TRK_ATT_FINISH "finish segment"
670 
671 #endif /* _TRACKV1_H_ */
672 
673 
674 
tfTrackBuild trkBuild
build track structure for simu
Definition: track.h:604
struct TrackOwnPit tTrackOwnPit
Driver&#39;s pit.
int nMaxPits
number max of pits
Definition: track.h:462
tdble kRoughness
Roughtness in m of the surface (wave height)
Definition: track.h:250
int driversPitsNb
Number of drivers.
Definition: track.h:477
tdble Kyl
Definition: track.h:359
void(* tfTrackLocal2Global)(tTrkLocPos *pos, tdble *X, tdble *Y)
Convert a local position (segment, toRight, toStart) into a global one (X, Y)
Definition: track.h:572
tTrackSeg * pitEnd
Pit lane segment.
Definition: track.h:473
tTrackOwnPit * driversPits
List of pits by driver.
Definition: track.h:475
struct trackSeg tTrackSeg
Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right...
int type
Geometrical type:
Definition: track.h:280
int * marks
marks array
Definition: track.h:237
int freeCarIndex
Definition: track.h:448
struct trackSurface * next
Next surface in list.
Definition: track.h:243
Location on the track in local coordinates.
Definition: track.h:418
tdble lmax
Pitting area length max.
Definition: track.h:447
int pitCarIndex
Index of the car in the car array below which occupies the pit.
Definition: track.h:443
int side
Pits side:
Definition: track.h:464
Car structure (tCarElt).
Definition: car.h:455
unsigned int raceInfo
Type of segment regarding the race: Mask value in:
Definition: track.h:365
tdble width
main track width
Definition: track.h:513
Track structure.
Definition: track.h:502
t3Dd rgtSideNormal
Definition: track.h:360
tdble lmin
Pitting area length min.
Definition: track.h:446
tdble Kzw
Definition: track.h:357
vec2f normal
Definition: track.h:264
Interface Structure for Track Loader.
Definition: track.h:603
Definition: Basic.h:58
struct RoadCam tRoadCam
road camera
int nPitSeg
actual number of pits
Definition: track.h:463
tdble kRebound
Coefficient of energy restitution.
Definition: track.h:248
tTrackSeg * pitEntry
Pit lane segment.
Definition: track.h:471
char * name
Definition: track.h:228
int envIndex
Definition: track.h:361
tdble length
main track length
Definition: track.h:512
tdble speedLimit
Speed limit between pitStart and pitEnd.
Definition: track.h:470
int type
Type of description:
Definition: track.h:421
char * internalname
Internal name of the track.
Definition: track.h:508
tTrkLocPos pos
Center of the pit position.
Definition: track.h:442
tTrackGraphicInfo graphic
Definition: track.h:520
const char * material
Type of material used.
Definition: track.h:245
struct CarElt * car[TR_PIT_MAXCARPERPIT]
Car links for pit.
Definition: track.h:449
t3Dd max
Definition: track.h:519
tTurnMarksInfo turnMarksInfo
Definition: track.h:496
tTrackBarrier * barrier[2]
Segment barriers.
Definition: track.h:395
tTrackSurface * surface
Barrier surface.
Definition: track.h:263
const char * name
Segment name.
Definition: track.h:277
road camera
Definition: track.h:226
struct SegExt tSegExt
Extended track segment.
tdble(* tfTrackHeightL)(tTrkLocPos *pos)
Returns the absolute height in meters of the road at the local position.
Definition: track.h:549
#define TR_PIT_MAXCARPERPIT
Definition: track.h:445
Driver&#39;s pit.
Definition: track.h:440
float tdble
Floating point type used in TORCS.
Definition: tgf.h:48
tdble width
Definition: track.h:483
tfTrackGlobal2Local trkGlobal2Local
Definition: track.h:608
tfTrackHeightL trkHeightL
Definition: track.h:607
int nseg
Number of segments.
Definition: track.h:510
tTrack *(* tfTrackBuild)(char *filename)
Read given track from filename into tTrack struct.
Definition: track.h:530
struct trackSeg * side[2]
Definition: track.h:407
const char * name
Name of the track.
Definition: track.h:504
Barrier.
Definition: track.h:259
The Gaming Framework API.
tfTrackHeightG trkHeightG
Definition: track.h:606
Definition: Basic.h:58
void * params
Parameters handle.
Definition: track.h:507
Surface.
Definition: track.h:242
tTrackSeg * pitExit
Pit lane segment.
Definition: track.h:474
tdble hSpace
Definition: track.h:484
tdble height
Barrier height.
Definition: track.h:262
int style
Barrier style.
Definition: track.h:260
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, toStart)
Definition: track.h:563
struct trackSurface tTrackSurface
Surface.
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:585
tdble kRollRes
Rolling resistance.
Definition: track.h:249
tdble height
Max height for curbs.
Definition: track.h:363
tTrackSeg * seg
Track segment.
Definition: track.h:420
tdble width
Width of each pit stop.
Definition: track.h:469
struct trackSeg * lside
Definition: track.h:406
int version
Version of the track type.
Definition: track.h:511
Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right...
Definition: track.h:276
const char * author
Author&#39;s name.
Definition: track.h:505
int carsPerPit
Definition: track.h:476
const char * background
Definition: track.h:490
tSegExt * ext
Definition: track.h:392
Pits Info Structure.
Definition: track.h:453
void(* tfTrackShutdown)(void)
Release current track and all its resources.
Definition: track.h:598
t3Dd min
Definition: track.h:518
tdble len
Lenght of each pit stop.
Definition: track.h:468
tfTrackLocal2Global trkLocal2Global
Definition: track.h:609
struct trackBarrier tTrackBarrier
Barrier.
struct trackSeg * prev
Previous segment.
Definition: track.h:398
tTrackSurface * surface
Segment surface.
Definition: track.h:394
tdble kDammage
Dammages in case of collision.
Definition: track.h:252
tTrackSeg * pitStart
Pit lane segment.
Definition: track.h:472
struct trackSeg * next
Next segment.
Definition: track.h:397
const char ** env
Definition: track.h:495
void(* tfTrackSurfaceNormal)(tTrkLocPos *pos, t3Dd *norm)
Get the normal vector of the road (pointing upward).
Definition: track.h:593
3D point.
Definition: tgf.h:115
tTrackSurface * surfaces
Segment surface list.
Definition: track.h:516
struct RoadCam * next
Definition: track.h:230
t3Dd pos
Definition: track.h:229
char * background2
Definition: track.h:491
struct trackSeg * rside
Definition: track.h:406
tdble vSpace
Definition: track.h:485
tfTrackShutdown trkShutdown
Definition: track.h:612
const char * category
Category of the track.
Definition: track.h:509
Extended track segment.
Definition: track.h:234
tRoadCam * cam
Definition: track.h:396
tTrackSeg * seg
Main track.
Definition: track.h:515
tTrackPitInfo pits
Pits information.
Definition: track.h:514
tdble kFriction
Coefficient of friction.
Definition: track.h:247
tdble Kzl
Definition: track.h:356
tfTrackSideNormal trkSideNormal
Definition: track.h:610
tdble kRoughWaveLen
Wave length in m of the surface.
Definition: track.h:251
char * filename
Filename of the track description.
Definition: track.h:506
int nbMarks
turn marks
Definition: track.h:236
tdble height
Definition: track.h:482
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:541
int id
Segment number.
Definition: track.h:278
tfTrackBuild trkBuildEx
build with graphic extensions (used by trackgen tool)
Definition: track.h:605
tfTrackSurfaceNormal trkSurfaceNormal
Definition: track.h:611
int type
Type of Pit:
Definition: track.h:455
tdble width
Barrier width.
Definition: track.h:261