torcs - 1.2.2

src/libs/robottools/rttrack.cpp File Reference


Detailed Description

This is a collection of useful functions for programming a robot.

Author:
Eric Espie
Version:
Id
rttrack.cpp,v 1.14 2003/11/23 20:21:12 torcs Exp

#include <stdlib.h>
#include <math.h>
#include <tgf.h>
#include <car.h>
#include <track.h>
#include <robottools.h>

Include dependency graph for rttrack.cpp:

Include dependency graph

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.

tTrackSegRtTrackGetSeg (tTrkLocPos *p)
 Get the current segment.

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.


Function Documentation

tTrackSeg* RtTrackGetSeg tTrkLocPos p  ) 
 

Get the current segment.

Here is the call graph for this function:


Generated at Thu Feb 26 21:53:08 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.