colmodel.cpp File Reference

#include "colmodel.h"
#include "globals.h"
#include "log.h"

Include dependency graph for colmodel.cpp:

Go to the source code of this file.

Defines

#define SEP_TEST(box1, box2, a1, a2, b1, b2)
#define SEPSELF_TEST(box1, box2, a1, a2, b1, b2)
#define SEPSELF_MINUSTEST(box1, box2, a1, a2, b1, b2)
#define SEP_TESTMAX(box1, box2, a1, a2, b1, b2)
#define SEPSELF_TESTMAX(box1, box2, a1, a2, b1, b2)
#define SEPSELF_MINUSTESTMAX(box1, box2, a1, a2, b1, b2)

Functions

double projectAndCompareMax (const CDBox &box1, const CDBox &box2, const GLVector3d &normal, double scale)
double trySepparatingAxisMax (const CDBox &box1, const CDBox &box2, int a1, int a2, int b1, int b2, GLVector3d &normal, const GLVector3d &direction)
double trySepparatingAxisSelfMax (const CDBox &box1, const CDBox &box2, int a1, int a2, int b1, int b2, GLVector3d &normal, const GLVector3d &direction)

Variables

const double EPSILON = 0.00001


Define Documentation

#define SEP_TEST box1,
box2,
a1,
a2,
b1,
b2   ) 
 

Value:

if ( absD((d=box1.trySepparatingAxis(box2, a1, a2, b1, b2, normal))) < absD(min)) \
        { \
                if (absD(min = d) < EPSILON) return false; \
                result = normal; \
        }

Definition at line 23 of file colmodel.cpp.

Referenced by CollisionModel::computeMinimalAvoidVector().

#define SEP_TESTMAX box1,
box2,
a1,
a2,
b1,
b2   ) 
 

Value:

if ( (d = trySepparatingAxisMax(box1, box2, a1, a2, b1, b2, normal, direction)) <  min) \
        { \
                if ((min = d) < EPSILON) return 0; \
                if (min < 0) \
                 LOGE " POZOR!!!" << endl; \
        }

Definition at line 145 of file colmodel.cpp.

Referenced by CollisionModel::computeMinimalAvoidDistance().

#define SEPSELF_MINUSTEST box1,
box2,
a1,
a2,
b1,
b2   ) 
 

Value:

if ( absD((d=box1.trySepparatingAxisSelf(box2, a1, a2, b1, b2, normal))) < absD(min)) \
        { \
                if (absD(min = -d) < EPSILON) return false; \
                result = normal; \
        }

Definition at line 37 of file colmodel.cpp.

Referenced by CollisionModel::computeMinimalAvoidVector().

#define SEPSELF_MINUSTESTMAX box1,
box2,
a1,
a2,
b1,
b2   ) 
 

Value:

if ( (d = trySepparatingAxisSelfMax(box1, box2, a1, a2, b1, b2, normal, -direction)) <  min) \
        { \
                if ((min = d) < EPSILON) return 0; \
                if (min < 0) \
                 LOGE " POZOR!!!" << endl; \
        }

Definition at line 161 of file colmodel.cpp.

Referenced by CollisionModel::computeMinimalAvoidDistance().

#define SEPSELF_TEST box1,
box2,
a1,
a2,
b1,
b2   ) 
 

Value:

if ( absD((d=box1.trySepparatingAxisSelf(box2, a1, a2, b1, b2, normal))) < absD(min)) \
        { \
                if (absD(min = d) < EPSILON) return false; \
                result = normal; \
        }

Definition at line 30 of file colmodel.cpp.

Referenced by CollisionModel::computeMinimalAvoidVector().

#define SEPSELF_TESTMAX box1,
box2,
a1,
a2,
b1,
b2   ) 
 

Value:

if ( (d = trySepparatingAxisSelfMax(box1, box2, a1, a2, b1, b2, normal, direction)) <  min) \
        { \
                if ((min = d) < EPSILON) return 0; \
                if (min < 0) \
                 LOGE " POZOR!!!" << endl; \
        }

Definition at line 153 of file colmodel.cpp.

Referenced by CollisionModel::computeMinimalAvoidDistance().


Function Documentation

double projectAndCompareMax const CDBox box1,
const CDBox box2,
const GLVector3d &  normal,
double  scale
 

Definition at line 87 of file colmodel.cpp.

References CDBox::project().

Referenced by trySepparatingAxisMax(), and trySepparatingAxisSelfMax().

Here is the call graph for this function:

double trySepparatingAxisMax const CDBox box1,
const CDBox box2,
int  a1,
int  a2,
int  b1,
int  b2,
GLVector3d &  normal,
const GLVector3d &  direction
 

Definition at line 108 of file colmodel.cpp.

References CDBox::mVertex, and projectAndCompareMax().

Here is the call graph for this function:

double trySepparatingAxisSelfMax const CDBox box1,
const CDBox box2,
int  a1,
int  a2,
int  b1,
int  b2,
GLVector3d &  normal,
const GLVector3d &  direction
 

Definition at line 126 of file colmodel.cpp.

References CDBox::mVertex, and projectAndCompareMax().

Here is the call graph for this function:


Variable Documentation

const double EPSILON = 0.00001
 

Definition at line 8 of file colmodel.cpp.


Generated on Wed Apr 12 13:56:18 2006 for bjs by  doxygen 1.4.5