TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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.
int id
 Segment number.
int type
 Geometrical type:
int type2
 Position type:
int style
 Border and barrier segments style:
tdble length
 Length in meters of the middle of the track.
tdble width
 Width of the segment (if constant width)
tdble startWidth
 Width of the beginning of the segment.
tdble endWidth
 Width of the end of the segment.
tdble lgfromstart
 Length of beginning of segment from starting line.
tdble radius
 Radius in meters of the middle of the track (>0)
tdble radiusr
 Radius in meters of the right side of the track (>0)
tdble radiusl
 Radius in meters of the left side of the track (>0)
tdble arc
 Arc in rad of the curve (>0)
t3Dd center
 Center of the curve.
t3Dd vertex [4]
 Coordinates of the 4 corners of the segment.
tdble angle [7]
tdble Kzl
tdble Kzw
tdble Kyl
t3Dd rgtSideNormal
int envIndex
tdble height
 Max height for curbs.
unsigned int raceInfo
 Type of segment regarding the race:
Mask value in:
tSegExt * ext
tTrackSurface * surface
 Segment surface.
tTrackBarrier * barrier [2]
 Segment barriers.
tRoadCam * cam
struct trackSeg * next
 Next segment.
struct trackSeg * prev
 Previous segment.
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)

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

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

Definition at line 293 of file track.h.

Member Data Documentation

◆ [union]

union { ... } trackSeg

◆ angle

tdble trackSeg::angle[7]

Definition at line 354 of file track.h.

◆ arc

tdble trackSeg::arc

Arc in rad of the curve (>0)

Definition at line 340 of file track.h.

◆ barrier

tTrackBarrier* trackSeg::barrier[2]

Segment barriers.

Definition at line 410 of file track.h.

◆ cam

tRoadCam* trackSeg::cam

Definition at line 411 of file track.h.

◆ center

t3Dd trackSeg::center

Center of the curve.

Definition at line 341 of file track.h.

◆ endWidth

tdble trackSeg::endWidth

Width of the end of the segment.

Definition at line 335 of file track.h.

◆ envIndex

int trackSeg::envIndex

Definition at line 378 of file track.h.

◆ ext

tSegExt* trackSeg::ext

Definition at line 407 of file track.h.

◆ height

tdble trackSeg::height

Max height for curbs.

Definition at line 380 of file track.h.

◆ id

int trackSeg::id

Segment number.

Definition at line 295 of file track.h.

◆ Kyl

tdble trackSeg::Kyl

Definition at line 376 of file track.h.

◆ Kzl

tdble trackSeg::Kzl

Definition at line 373 of file track.h.

◆ Kzw

tdble trackSeg::Kzw

Definition at line 374 of file track.h.

◆ length

tdble trackSeg::length

Length in meters of the middle of the track.

Definition at line 332 of file track.h.

◆ lgfromstart

tdble trackSeg::lgfromstart

Length of beginning of segment from starting line.

Definition at line 336 of file track.h.

◆ lside

struct trackSeg * trackSeg::lside

Definition at line 421 of file track.h.

◆ name

const char* trackSeg::name

Segment name.

Definition at line 294 of file track.h.

◆ next

struct trackSeg* trackSeg::next

Next segment.

Definition at line 412 of file track.h.

◆ prev

struct trackSeg* trackSeg::prev

Previous segment.

Definition at line 413 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 382 of file track.h.

◆ radius

tdble trackSeg::radius

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

Definition at line 337 of file track.h.

◆ radiusl

tdble trackSeg::radiusl

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

Definition at line 339 of file track.h.

◆ radiusr

tdble trackSeg::radiusr

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

Definition at line 338 of file track.h.

◆ rgtSideNormal

t3Dd trackSeg::rgtSideNormal

Definition at line 377 of file track.h.

◆ rside

struct trackSeg* trackSeg::rside

Definition at line 421 of file track.h.

◆ side

struct trackSeg* trackSeg::side[2]

Definition at line 422 of file track.h.

◆ startWidth

tdble trackSeg::startWidth

Width of the beginning of the segment.

Definition at line 334 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 319 of file track.h.

◆ surface

tTrackSurface* trackSeg::surface

Segment surface.

Definition at line 409 of file track.h.

◆ type

int trackSeg::type

Geometrical type:

  • TR_RGT
  • TR_LFT
  • TR_STR

Definition at line 297 of file track.h.

◆ type2

int trackSeg::type2

Position type:

  • TR_MAIN
  • TR_LSIDE
  • TR_RSIDE
  • TR_LBORDER
  • TR_RBORDER

Definition at line 306 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 342 of file track.h.

◆ width

tdble trackSeg::width

Width of the segment (if constant width)

Definition at line 333 of file track.h.


The documentation for this struct was generated from the following file:
  • C:/Users/berni/Development/torcs_git/torcs-code/torcs/torcs/src/interfaces/track.h