TORCS  1.3.9
The Open Racing Car Simulator
C-api.cpp File Reference
#include <SOLID/solid.h>
#include <algorithm>
#include "Box.h"
#include "Cone.h"
#include "Cylinder.h"
#include "Sphere.h"
#include "Complex.h"
#include "Encounter.h"
#include "Object.h"
#include "Simplex.h"
#include "Polygon.h"
#include "Polyhedron.h"
#include "Response.h"
#include "RespTable.h"
#include <map>
#include <set>
#include <vector>
Include dependency graph for C-api.cpp:

Go to the source code of this file.

Typedefs

typedef vector< PointPointBuf
 
typedef vector< unsigned int > IndexBuf
 
typedef vector< const Polytope * > PolyList
 
typedef vector< Complex * > ComplexList
 
typedef map< DtObjectRef, Object * > ObjectList
 
typedef set< EncounterProxList
 

Functions

void move ()
 
DtShapeRef dtBox (DtScalar x, DtScalar y, DtScalar z)
 
DtShapeRef dtCone (DtScalar radius, DtScalar height)
 
DtShapeRef dtCylinder (DtScalar radius, DtScalar height)
 
DtShapeRef dtSphere (DtScalar radius)
 
DtShapeRef dtNewComplexShape ()
 
void dtEndComplexShape ()
 
void dtBegin (DtPolyType type)
 
void dtEnd ()
 
void dtVertex (DtScalar x, DtScalar y, DtScalar z)
 
void dtVertexBase (const Point *base)
 
void dtVertexIndex (DtIndex index)
 
void dtVertexIndices (DtPolyType type, DtCount count, const DtIndex *indices)
 
void dtVertexRange (DtPolyType type, DtIndex first, DtCount count)
 
void dtDeleteShape (DtShapeRef shape)
 
void dtChangeVertexBase (DtShapeRef shape, const Point *base)
 
void dtCreateObject (DtObjectRef object, DtShapeRef shape)
 
void dtSelectObject (DtObjectRef object)
 
void dtDeleteObject (DtObjectRef object)
 
void dtTranslate (DtScalar x, DtScalar y, DtScalar z)
 
void dtRotate (DtScalar x, DtScalar y, DtScalar z, DtScalar w)
 
void dtScale (DtScalar x, DtScalar y, DtScalar z)
 
void dtLoadIdentity ()
 
void dtLoadMatrixf (const float *m)
 
void dtLoadMatrixd (const double *m)
 
void dtMultMatrixf (const float *m)
 
void dtMultMatrixd (const double *m)
 
void dtSetDefaultResponse (DtResponse response, DtResponseType type, void *client_data)
 
void dtClearDefaultResponse ()
 
void dtSetObjectResponse (DtObjectRef object, DtResponse response, DtResponseType type, void *client_data)
 
void dtClearObjectResponse (DtObjectRef object)
 
void dtResetObjectResponse (DtObjectRef object)
 
void dtSetPairResponse (DtObjectRef object1, DtObjectRef object2, DtResponse response, DtResponseType type, void *client_data)
 
void dtClearPairResponse (DtObjectRef object1, DtObjectRef object2)
 
void dtResetPairResponse (DtObjectRef object1, DtObjectRef object2)
 
void dtProceed ()
 
void dtEnableCaching ()
 
void dtDisableCaching ()
 
void dtSetTolerance (DtScalar tol)
 
void addPair (ObjectPtr object1, ObjectPtr object2)
 
void removePair (ObjectPtr object1, ObjectPtr object2)
 
bool object_test (Encounter &e)
 
DtCount dtTest ()
 

Variables

PointBuf pointBuf
 
IndexBuf indexBuf
 
PolyList polyList
 
ComplexList complexList
 
ObjectList objectList
 
RespTable respTable
 
ProxList proxList
 
DtPolyType currentType
 
ComplexcurrentComplex = 0
 
ObjectcurrentObject = 0
 
bool caching = true
 
Scalar rel_error
 

Typedef Documentation

◆ ComplexList

typedef vector<Complex *> ComplexList

Definition at line 58 of file C-api.cpp.

◆ IndexBuf

typedef vector<unsigned int> IndexBuf

Definition at line 56 of file C-api.cpp.

◆ ObjectList

typedef map<DtObjectRef, Object *> ObjectList

Definition at line 59 of file C-api.cpp.

◆ PointBuf

typedef vector<Point> PointBuf

Definition at line 55 of file C-api.cpp.

◆ PolyList

typedef vector<const Polytope *> PolyList

Definition at line 57 of file C-api.cpp.

◆ ProxList

typedef set<Encounter> ProxList

Definition at line 60 of file C-api.cpp.

Function Documentation

◆ addPair()

void addPair ( ObjectPtr  object1,
ObjectPtr  object2 
)

Definition at line 308 of file C-api.cpp.

◆ dtBegin()

void dtBegin ( DtPolyType  type)

Definition at line 118 of file C-api.cpp.

◆ dtBox()

DtShapeRef dtBox ( DtScalar  x,
DtScalar  y,
DtScalar  z 
)

Definition at line 84 of file C-api.cpp.

◆ dtChangeVertexBase()

void dtChangeVertexBase ( DtShapeRef  shape,
const Point base 
)

Definition at line 179 of file C-api.cpp.

◆ dtClearDefaultResponse()

void dtClearDefaultResponse ( )

Definition at line 255 of file C-api.cpp.

Here is the call graph for this function:

◆ dtClearObjectResponse()

void dtClearObjectResponse ( DtObjectRef  object)

Definition at line 264 of file C-api.cpp.

Here is the call graph for this function:

◆ dtClearPairResponse()

void dtClearPairResponse ( DtObjectRef  object1,
DtObjectRef  object2 
)

Definition at line 278 of file C-api.cpp.

Here is the call graph for this function:

◆ dtCone()

DtShapeRef dtCone ( DtScalar  radius,
DtScalar  height 
)

Definition at line 88 of file C-api.cpp.

◆ dtCreateObject()

void dtCreateObject ( DtObjectRef  object,
DtShapeRef  shape 
)

Definition at line 193 of file C-api.cpp.

Here is the call graph for this function:

◆ dtCylinder()

DtShapeRef dtCylinder ( DtScalar  radius,
DtScalar  height 
)

Definition at line 92 of file C-api.cpp.

◆ dtDeleteObject()

void dtDeleteObject ( DtObjectRef  object)

Definition at line 206 of file C-api.cpp.

Here is the call graph for this function:

◆ dtDeleteShape()

void dtDeleteShape ( DtShapeRef  shape)

Definition at line 170 of file C-api.cpp.

◆ dtDisableCaching()

void dtDisableCaching ( )

Definition at line 304 of file C-api.cpp.

◆ dtEnableCaching()

void dtEnableCaching ( )

Definition at line 297 of file C-api.cpp.

◆ dtEnd()

void dtEnd ( )

Definition at line 119 of file C-api.cpp.

Here is the call graph for this function:

◆ dtEndComplexShape()

void dtEndComplexShape ( )

Definition at line 105 of file C-api.cpp.

Here is the call graph for this function:

◆ dtLoadIdentity()

void dtLoadIdentity ( )

Definition at line 228 of file C-api.cpp.

Here is the call graph for this function:

◆ dtLoadMatrixd()

void dtLoadMatrixd ( const double *  m)

Definition at line 236 of file C-api.cpp.

Here is the call graph for this function:

◆ dtLoadMatrixf()

void dtLoadMatrixf ( const float *  m)

Definition at line 232 of file C-api.cpp.

Here is the call graph for this function:

◆ dtMultMatrixd()

void dtMultMatrixd ( const double *  m)

Definition at line 244 of file C-api.cpp.

Here is the call graph for this function:

◆ dtMultMatrixf()

void dtMultMatrixf ( const float *  m)

Definition at line 240 of file C-api.cpp.

Here is the call graph for this function:

◆ dtNewComplexShape()

DtShapeRef dtNewComplexShape ( )

Definition at line 100 of file C-api.cpp.

◆ dtProceed()

void dtProceed ( )

Definition at line 288 of file C-api.cpp.

◆ dtResetObjectResponse()

void dtResetObjectResponse ( DtObjectRef  object)

Definition at line 268 of file C-api.cpp.

Here is the call graph for this function:

◆ dtResetPairResponse()

void dtResetPairResponse ( DtObjectRef  object1,
DtObjectRef  object2 
)

Definition at line 282 of file C-api.cpp.

Here is the call graph for this function:

◆ dtRotate()

void dtRotate ( DtScalar  x,
DtScalar  y,
DtScalar  z,
DtScalar  w 
)

Definition at line 220 of file C-api.cpp.

Here is the call graph for this function:

◆ dtScale()

void dtScale ( DtScalar  x,
DtScalar  y,
DtScalar  z 
)

Definition at line 224 of file C-api.cpp.

Here is the call graph for this function:

◆ dtSelectObject()

void dtSelectObject ( DtObjectRef  object)

Definition at line 198 of file C-api.cpp.

Here is the call graph for this function:

◆ dtSetDefaultResponse()

void dtSetDefaultResponse ( DtResponse  response,
DtResponseType  type,
void *  client_data 
)

Definition at line 250 of file C-api.cpp.

Here is the call graph for this function:

◆ dtSetObjectResponse()

void dtSetObjectResponse ( DtObjectRef  object,
DtResponse  response,
DtResponseType  type,
void *  client_data 
)

Definition at line 259 of file C-api.cpp.

Here is the call graph for this function:

◆ dtSetPairResponse()

void dtSetPairResponse ( DtObjectRef  object1,
DtObjectRef  object2,
DtResponse  response,
DtResponseType  type,
void *  client_data 
)

Definition at line 272 of file C-api.cpp.

Here is the call graph for this function:

◆ dtSetTolerance()

void dtSetTolerance ( DtScalar  tol)

Definition at line 306 of file C-api.cpp.

◆ dtSphere()

DtShapeRef dtSphere ( DtScalar  radius)

Definition at line 96 of file C-api.cpp.

◆ dtTest()

DtCount dtTest ( )

Definition at line 346 of file C-api.cpp.

Here is the call graph for this function:

◆ dtTranslate()

void dtTranslate ( DtScalar  x,
DtScalar  y,
DtScalar  z 
)

Definition at line 216 of file C-api.cpp.

Here is the call graph for this function:

◆ dtVertex()

void dtVertex ( DtScalar  x,
DtScalar  y,
DtScalar  z 
)

Definition at line 124 of file C-api.cpp.

◆ dtVertexBase()

void dtVertexBase ( const Point base)

Definition at line 133 of file C-api.cpp.

Here is the call graph for this function:

◆ dtVertexIndex()

void dtVertexIndex ( DtIndex  index)

Definition at line 137 of file C-api.cpp.

◆ dtVertexIndices()

void dtVertexIndices ( DtPolyType  type,
DtCount  count,
const DtIndex indices 
)

Definition at line 139 of file C-api.cpp.

Here is the call graph for this function:

◆ dtVertexRange()

void dtVertexRange ( DtPolyType  type,
DtIndex  first,
DtCount  count 
)

Definition at line 163 of file C-api.cpp.

Here is the call graph for this function:

◆ move()

void move ( )
inline

Definition at line 81 of file C-api.cpp.

Here is the call graph for this function:

◆ object_test()

bool object_test ( Encounter e)

Definition at line 316 of file C-api.cpp.

Here is the call graph for this function:

◆ removePair()

void removePair ( ObjectPtr  object1,
ObjectPtr  object2 
)

Definition at line 312 of file C-api.cpp.

Variable Documentation

◆ caching

bool caching = true

Definition at line 77 of file C-api.cpp.

◆ complexList

ComplexList complexList

Definition at line 69 of file C-api.cpp.

◆ currentComplex

Complex* currentComplex = 0

Definition at line 75 of file C-api.cpp.

◆ currentObject

Object* currentObject = 0

Definition at line 76 of file C-api.cpp.

◆ currentType

DtPolyType currentType

Definition at line 74 of file C-api.cpp.

◆ indexBuf

IndexBuf indexBuf

Definition at line 67 of file C-api.cpp.

◆ objectList

ObjectList objectList

Definition at line 70 of file C-api.cpp.

◆ pointBuf

PointBuf pointBuf

Definition at line 66 of file C-api.cpp.

◆ polyList

PolyList polyList

Definition at line 68 of file C-api.cpp.

◆ proxList

ProxList proxList

Definition at line 72 of file C-api.cpp.

◆ rel_error

Scalar rel_error

Definition at line 35 of file Convex.cpp.

◆ respTable

RespTable respTable

Definition at line 71 of file C-api.cpp.