TORCS  1.3.9
The Open Racing Car Simulator
Convex.cpp File Reference
#include "Convex.h"
#include "BBox.h"
#include "Transform.h"
Include dependency graph for Convex.cpp:

Go to the source code of this file.

Functions

void compute_det ()
 
bool valid (int s)
 
void compute_vector (int bits, Vector &v)
 
void compute_points (int bits, Point &p1, Point &p2)
 
bool closest (Vector &v)
 
bool degenerate (const Vector &w)
 
bool intersect (const Convex &a, const Convex &b, const Transform &a2w, const Transform &b2w, Vector &v)
 
bool intersect (const Convex &a, const Convex &b, const Transform &b2a, Vector &v)
 
bool common_point (const Convex &a, const Convex &b, const Transform &a2w, const Transform &b2w, Vector &v, Point &pa, Point &pb)
 
bool common_point (const Convex &a, const Convex &b, const Transform &b2a, Vector &v, Point &pa, Point &pb)
 
void closest_points (const Convex &a, const Convex &b, const Transform &a2w, const Transform &b2w, Point &pa, Point &pb)
 

Variables

Scalar rel_error = 1e-6
 
Scalar abs_error = 1e-10
 
static Point p [4]
 
static Point q [4]
 
static Vector y [4]
 
static int bits
 
static int last
 
static int last_bit
 
static int all_bits
 
static Scalar det [16][4]
 

Function Documentation

◆ closest()

bool closest ( Vector v)
inline

Definition at line 162 of file Convex.cpp.

Here is the call graph for this function:

◆ closest_points()

void closest_points ( const Convex a,
const Convex b,
const Transform a2w,
const Transform b2w,
Point pa,
Point pb 
)

Definition at line 386 of file Convex.cpp.

Here is the call graph for this function:

◆ common_point() [1/2]

bool common_point ( const Convex a,
const Convex b,
const Transform a2w,
const Transform b2w,
Vector v,
Point pa,
Point pb 
)

Definition at line 296 of file Convex.cpp.

Here is the call graph for this function:

◆ common_point() [2/2]

bool common_point ( const Convex a,
const Convex b,
const Transform b2a,
Vector v,
Point pa,
Point pb 
)

Definition at line 339 of file Convex.cpp.

Here is the call graph for this function:

◆ compute_det()

void compute_det ( )

Definition at line 72 of file Convex.cpp.

Here is the call graph for this function:

◆ compute_points()

void compute_points ( int  bits,
Point p1,
Point p2 
)
inline

Definition at line 136 of file Convex.cpp.

Here is the call graph for this function:

◆ compute_vector()

void compute_vector ( int  bits,
Vector v 
)
inline

Definition at line 124 of file Convex.cpp.

Here is the call graph for this function:

◆ degenerate()

bool degenerate ( const Vector w)
inline

Definition at line 206 of file Convex.cpp.

◆ intersect() [1/2]

bool intersect ( const Convex a,
const Convex b,
const Transform a2w,
const Transform b2w,
Vector v 
)

Definition at line 212 of file Convex.cpp.

Here is the call graph for this function:

◆ intersect() [2/2]

bool intersect ( const Convex a,
const Convex b,
const Transform b2a,
Vector v 
)

Definition at line 253 of file Convex.cpp.

Here is the call graph for this function:

◆ valid()

bool valid ( int  s)
inline

Definition at line 114 of file Convex.cpp.

Variable Documentation

◆ abs_error

Scalar abs_error = 1e-10

Definition at line 36 of file Convex.cpp.

◆ all_bits

int all_bits
static

Definition at line 61 of file Convex.cpp.

◆ bits

int bits
static

Definition at line 58 of file Convex.cpp.

◆ det

Scalar det[16][4]
static

Definition at line 63 of file Convex.cpp.

◆ last

int last
static

Definition at line 59 of file Convex.cpp.

◆ last_bit

int last_bit
static

Definition at line 60 of file Convex.cpp.

◆ p

Point p[4]
static

Definition at line 54 of file Convex.cpp.

◆ q

Point q[4]
static

Definition at line 55 of file Convex.cpp.

◆ rel_error

Scalar rel_error = 1e-6

Definition at line 35 of file Convex.cpp.

◆ y

Vector y[4]
static

Definition at line 56 of file Convex.cpp.