- Main Page
- Modules
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# CarTrace Class Reference

`#include <CarTrace.h>`

List of all members.

## Public Member Functions
| CarTrace ()
virtual | ~CarTrace ()
## Static Public Member Functions
static void | Trace (Car *thisCar, dReal &steer, dReal &speed, int nCarInitRotation)
static Sector * | findCarCurrentSector (SectorMap sectors, Vector3 car_pos, Vector3 car_dir, Simulator *simulator)
static int | isCarInGivenSector (SectorMap sectors, Vector3 car_pos, Vector3 car_dir, int givenSectorID)
static int | isCarInBorders (std::vector< Border > bc, Vector3 car_pos, Vector3 car_dir, int sector_id)
static int | IsCarInSector2 (std::vector< Border > bc, Vector3 carPosition, Vector3 carSpeed)
static Vector3 | GetMeetPointVectorAndUsecka (Vector3 startPoint, Vector3 endPoint, Vector3 car_pos, Vector3 car_dir, int *aColor, double *meetDistances, Vector3 *meetPoints, int &meetIndex, int *meetAngles, int angleWithVelocity)
static bool | GetMeetPointVectorAndUsecka (Vector3 startPoint, Vector3 endPoint, Vector3 car_pos, Vector3 car_dir)
static Vector3 | DReal2TVector (const dReal *position)
static Vector3 | DRealRotation2TVector (const dReal *position)
static Vector3 | DRealRotation2TVector2 (const dReal *position)

## Detailed Description

class gets position and direction of car as well as polygons and calculates how much we need to change direction and speed

## Constructor & Destructor Documentation

CarTrace::CarTrace | ( |  | ) |

virtual CarTrace::~CarTrace | ( |  | ) | `[virtual]`

## Member Function Documentation

static Vector3 CarTrace::DReal2TVector | ( | const dReal * | position | ) | `[inline, static]`

help function to convert ODE vector to Vector3

static Vector3 CarTrace::DRealRotation2TVector | ( | const dReal * | position | ) | `[inline, static]`

help function to convert ODE vector to Vector3

static Vector3 CarTrace::DRealRotation2TVector2 | ( | const dReal * | position | ) | `[inline, static]`

help function to convert ODE vector to Vector3

static Sector* CarTrace::findCarCurrentSector | ( | SectorMap | sectors,
|  | Vector3 | car_pos,
|  | Vector3 | car_dir,
|  | Simulator * | simulator |
| ) |  |  | `[inline, static]`

get know, if car is in given sector using one ray, counts how much times it crosses polygon

static bool CarTrace::GetMeetPointVectorAndUsecka | ( | Vector3 | startPoint,
|  | Vector3 | endPoint,
|  | Vector3 | car_pos,
|  | Vector3 | car_dir |
| ) |  |  | `[inline, static]`

call trace function II

static Vector3 CarTrace::GetMeetPointVectorAndUsecka | ( | Vector3 | startPoint,
|  | Vector3 | endPoint,
|  | Vector3 | car_pos,
|  | Vector3 | car_dir,
|  | int * | aColor,
|  | double * | meetDistances,
|  | Vector3 * | meetPoints,
|  | int & | meetIndex,
|  | int * | meetAngles,
|  | int | angleWithVelocity |
| ) |  |  | `[inline, static]`

call trace function

static int CarTrace::isCarInBorders | ( | std::vector< Border > | bc,
|  | Vector3 | car_pos,
|  | Vector3 | car_dir,
|  | int | sector_id |
| ) |  |  | `[inline, static]`

get know, if car is in given borders using one ray, counts how much times it crosses polygon

static int CarTrace::isCarInGivenSector | ( | SectorMap | sectors,
|  | Vector3 | car_pos,
|  | Vector3 | car_dir,
|  | int | givenSectorID |
| ) |  |  | `[inline, static]`

get know, if car is in given sector using one ray, counts how much times it crosses polygon

static int CarTrace::IsCarInSector2 | ( | std::vector< Border > | bc,
|  | Vector3 | carPosition,
|  | Vector3 | carSpeed |
| ) |  |  | `[inline, static]`

get know, if car is in the sector considers enter and leave as single line, so it jumps them needs the same orientation of ordering verticles in config, so second one it iterates descendent

static void CarTrace::Trace | ( | Car * | thisCar,
|  | dReal & | steer,
|  | dReal & | speed,
|  | int | nCarInitRotation |
| ) |  |  | `[inline, static]`

function gets position and direction of car as well as polygons and calculates how much we need to change direction and speed here is a low-level driver model

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

- src/vectorMath/CarTrace.h