![]() |
torcs - 1.2.2 | ![]() |
Functions | |
tdble | RtTrackGetWidth (tTrackSeg *seg, tdble toStart) |
Get the track width at the specified point. | |
void | RtTrackLocal2Global (tTrkLocPos *p, tdble *X, tdble *Y, int flag) |
Convert a Local position (segment, toRight, toStart). | |
void | RtTrackGlobal2Local (tTrackSeg *segment, tdble X, tdble Y, tTrkLocPos *p, int type) |
Convert a Global (segment, X, Y) position into a Local one (segment, toRight, toStart). | |
tdble | RtTrackHeightL (tTrkLocPos *p) |
Returns the absolute height in meters of the road at the Local position p. | |
tdble | RtTrackHeightG (tTrackSeg *seg, tdble X, tdble Y) |
Returns the absolute height in meters of the road at the Global position (segment, X, Y). | |
void | RtTrackSideNormalG (tTrackSeg *seg, tdble X, tdble Y, int side, t3Dd *norm) |
Give the normal vector of the border of the track including the sides. | |
tdble | RtTrackSideTgAngleL (tTrkLocPos *p) |
Used to get the tangent angle for a track position The angle is given in radian. | |
void | RtTrackSurfaceNormalL (tTrkLocPos *p, t3Dd *norm) |
Used to get the normal vector of the road (pointing upward). | |
tdble | RtGetDistFromStart (tCarElt *car) |
Get the distance from the start lane. | |
tdble | RtGetDistFromStart2 (tTrkLocPos *p) |
Get the distance from the start lane. | |
int | RtDistToPit (struct CarElt *car, tTrack *track, tdble *dL, tdble *dW) |
Get the distance to the pit stop. |
|
Get the distance to the pit stop.
|
Here is the call graph for this function:
|
Get the distance from the start lane.
|
|
Get the distance from the start lane.
|
|
Get the track width at the specified point.
|
|
Convert a Global (segment, X, Y) position into a Local one (segment, toRight, toStart). The segment in the Global position is used to start the search of a good segment in term of toStart value. The segments are scanned in order to find a toStart value between 0 and the length of the segment for straights or the arc of the curve. The sides parameters is to indicate wether to use the track sides (1) or not (0) in the toRight computation.
|
Here is the call graph for this function:
|
Returns the absolute height in meters of the road at the Global position (segment, X, Y).
|
Here is the call graph for this function:
|
Returns the absolute height in meters of the road at the Local position p. If the point lies outside the track (and sides) the height is computed using the tangent to the banking of the segment (or side). | + Point given | .^ | . | | . | | . | | / | heigth | / | | ______/ v | ^ ^^ ^ | | || | | track side
|
Here is the call graph for this function:
|
Convert a Local position (segment, toRight, toStart). into a Global one (X, Y) The ToStart position refers to the current segment, the function will not search for next segment if toStart is greater than the segment length. toStart represent an angle in radian for curves and a length in meters for straights.
|
|
Give the normal vector of the border of the track including the sides. The side parameter is used to indicate the right (TR_RGT) of the left (TR_LFT) side to consider. The Global position given (segment, X, Y) is used to project the point on the border, it is not necessary to give a point directly on the border itself. The vector is normalized.
|
|
Used to get the tangent angle for a track position The angle is given in radian. the angle 0 is parallel to the first segment start.
|
|
Used to get the normal vector of the road (pointing upward). Local coordinates are used to locate the point where to get the road normal vector. The vector is normalized.
|
Here is the call graph for this function: