TORCS  1.3.9
The Open Racing Car Simulator
trackSeg Struct Reference

Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right to the left) More...

#include <track.h>

Collaboration diagram for trackSeg:

Public Attributes

const char * name
 Segment name. More...
 
int id
 Segment number. More...
 
int type
 Geometrical type: More...
 
int type2
 Position type: More...
 
int style
 Border and barrier segments style: More...
 
tdble length
 Length in meters of the middle of the track. More...
 
tdble width
 Width of the segment (if constant width) More...
 
tdble startWidth
 Width of the beginning of the segment. More...
 
tdble endWidth
 Width of the end of the segment. More...
 
tdble lgfromstart
 Length of beginning of segment from starting line. More...
 
tdble radius
 Radius in meters of the middle of the track (>0) More...
 
tdble radiusr
 Radius in meters of the right side of the track (>0) More...
 
tdble radiusl
 Radius in meters of the left side of the track (>0) More...
 
tdble arc
 Arc in rad of the curve (>0) More...
 
t3Dd center
 Center of the curve. More...
 
t3Dd vertex [4]
 Coordinates of the 4 corners of the segment. More...
 
tdble angle [7]
 
tdble Kzl
 
tdble Kzw
 
tdble Kyl
 
t3Dd rgtSideNormal
 
int envIndex
 
tdble height
 Max height for curbs. More...
 
unsigned int raceInfo
 Type of segment regarding the race:
Mask value in: More...
 
tdble DoVfactor
 
tSegExtext
 
tTrackSurfacesurface
 Segment surface. More...
 
tTrackBarrierbarrier [2]
 Segment barriers. More...
 
tRoadCamcam
 
struct trackSegnext
 Next segment. More...
 
struct trackSegprev
 Previous segment. More...
 
union {
   struct {
      struct trackSeg *   rside
 
      struct trackSeg *   lside
 
   } 
 
   struct trackSeg *   side [2]
 
}; 
 

Detailed Description

Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right to the left)

straight-desc.png

Or can be turn segments (type TR_RGT or TR_LFT): (the track goes from the left to the right)

turn-1-desc.png

The reference angle is the orientation of the first segment of the track.

Definition at line 276 of file track.h.

Member Data Documentation

◆ @21

union { ... }

◆ angle

tdble trackSeg::angle[7]

Definition at line 337 of file track.h.

◆ arc

tdble trackSeg::arc

Arc in rad of the curve (>0)

Definition at line 323 of file track.h.

◆ barrier

tTrackBarrier* trackSeg::barrier[2]

Segment barriers.

Definition at line 395 of file track.h.

◆ cam

tRoadCam* trackSeg::cam

Definition at line 396 of file track.h.

◆ center

t3Dd trackSeg::center

Center of the curve.

Definition at line 324 of file track.h.

◆ DoVfactor

tdble trackSeg::DoVfactor

Definition at line 387 of file track.h.

◆ endWidth

tdble trackSeg::endWidth

Width of the end of the segment.

Definition at line 318 of file track.h.

◆ envIndex

int trackSeg::envIndex

Definition at line 361 of file track.h.

◆ ext

tSegExt* trackSeg::ext

Definition at line 392 of file track.h.

◆ height

tdble trackSeg::height

Max height for curbs.

Definition at line 363 of file track.h.

◆ id

int trackSeg::id

Segment number.

Definition at line 278 of file track.h.

◆ Kyl

tdble trackSeg::Kyl

Definition at line 359 of file track.h.

◆ Kzl

tdble trackSeg::Kzl

Definition at line 356 of file track.h.

◆ Kzw

tdble trackSeg::Kzw

Definition at line 357 of file track.h.

◆ length

tdble trackSeg::length

Length in meters of the middle of the track.

Definition at line 315 of file track.h.

◆ lgfromstart

tdble trackSeg::lgfromstart

Length of beginning of segment from starting line.

Definition at line 319 of file track.h.

◆ lside

struct trackSeg * trackSeg::lside

Definition at line 406 of file track.h.

◆ name

const char* trackSeg::name

Segment name.

Definition at line 277 of file track.h.

◆ next

struct trackSeg* trackSeg::next

Next segment.

Definition at line 397 of file track.h.

◆ prev

struct trackSeg* trackSeg::prev

Previous segment.

Definition at line 398 of file track.h.

◆ raceInfo

unsigned int trackSeg::raceInfo

Type of segment regarding the race:
Mask value in:

  • TR_NORMAL
  • TR_LAST
  • TR_START
  • TR_PITLANE
  • TR_SPEEDLIMIT
  • TR_PITENTRY
  • TR_PITEXIT
  • TR_PIT

Definition at line 365 of file track.h.

◆ radius

tdble trackSeg::radius

Radius in meters of the middle of the track (>0)

Definition at line 320 of file track.h.

◆ radiusl

tdble trackSeg::radiusl

Radius in meters of the left side of the track (>0)

Definition at line 322 of file track.h.

◆ radiusr

tdble trackSeg::radiusr

Radius in meters of the right side of the track (>0)

Definition at line 321 of file track.h.

◆ rgtSideNormal

t3Dd trackSeg::rgtSideNormal

Definition at line 360 of file track.h.

◆ rside

struct trackSeg* trackSeg::rside

Definition at line 406 of file track.h.

◆ side

struct trackSeg* trackSeg::side[2]

Definition at line 407 of file track.h.

◆ startWidth

tdble trackSeg::startWidth

Width of the beginning of the segment.

Definition at line 317 of file track.h.

◆ style

int trackSeg::style

Border and barrier segments style:

  • TR_PLAN
  • TR_CURB
  • TR_WALL
  • TR_FENCE
  • TR_PITBUILDING

Definition at line 302 of file track.h.

◆ surface

tTrackSurface* trackSeg::surface

Segment surface.

Definition at line 394 of file track.h.

◆ type

int trackSeg::type

Geometrical type:

  • TR_RGT
  • TR_LFT
  • TR_STR

Definition at line 280 of file track.h.

◆ type2

int trackSeg::type2

Position type:

  • TR_MAIN
  • TR_LSIDE
  • TR_RSIDE
  • TR_LBORDER
  • TR_RBORDER

Definition at line 289 of file track.h.

◆ vertex

t3Dd trackSeg::vertex[4]

Coordinates of the 4 corners of the segment.


Index in:

  • TR_SL
  • TR_SL
  • TR_EL
  • TR_ER

Definition at line 325 of file track.h.

◆ width

tdble trackSeg::width

Width of the segment (if constant width)

Definition at line 316 of file track.h.


The documentation for this struct was generated from the following file: