Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

triboxoverlap.cpp File Reference

#include "triboxoverlap.h"
#include <cmath>

Go to the source code of this file.

Defines

#define FINDMINMAX(x0, x1, x2, min, max)
#define AXISTEST_X01(a, b, fa, fb)
#define AXISTEST_X2(a, b, fa, fb)
#define AXISTEST_Y02(a, b, fa, fb)
#define AXISTEST_Y1(a, b, fa, fb)
#define AXISTEST_Z12(a, b, fa, fb)
#define AXISTEST_Z0(a, b, fa, fb)

Functions

bool plane_box_overlap (const Vector3 &normal, Real d, const Vector3 &maxbox)


Define Documentation

#define AXISTEST_X01 a,
b,
fa,
fb   ) 
 

Value:

p0 = a * v0.m_y - b * v0.m_z; \
    p2 = a * v2.m_y - b * v2.m_z; \
    if(p0 < p2) { min = p0; max = p2; } else { min = p2; max = p0; } \
    rad = fa * boxhalfsize.m_y + fb * boxhalfsize.m_z; \
    if(min > rad || max < -rad) return false;

Definition at line 88 of file triboxoverlap.cpp.

Referenced by toxic::tri_box_overlap().

#define AXISTEST_X2 a,
b,
fa,
fb   ) 
 

Value:

p0 = a * v0.m_y - b * v0.m_z; \
    p1 = a * v1.m_y - b * v1.m_z; \
    if(p0 < p1) { min = p0; max = p1; } else { min = p1; max = p0; } \
    rad = fa * boxhalfsize.m_y + fb * boxhalfsize.m_z; \
    if(min > rad || max < -rad) return false;

Definition at line 95 of file triboxoverlap.cpp.

Referenced by toxic::tri_box_overlap().

#define AXISTEST_Y02 a,
b,
fa,
fb   ) 
 

Value:

p0 = -a * v0.m_x + b * v0.m_z; \
    p2 = -a * v2.m_x + b * v2.m_z; \
    if(p0 < p2) { min = p0; max = p2; } else { min = p2; max = p0; } \
    rad = fa * boxhalfsize.m_x + fb * boxhalfsize.m_z; \
    if(min > rad || max < -rad) return false;

Definition at line 104 of file triboxoverlap.cpp.

Referenced by toxic::tri_box_overlap().

#define AXISTEST_Y1 a,
b,
fa,
fb   ) 
 

Value:

p0 = -a * v0.m_x + b * v0.m_z; \
    p1 = -a * v1.m_x + b * v1.m_z; \
    if(p0 < p1) { min = p0; max = p1; } else { min = p1; max = p0; } \
    rad = fa * boxhalfsize.m_x + fb * boxhalfsize.m_z; \
    if(min > rad || max < -rad) return false;

Definition at line 111 of file triboxoverlap.cpp.

Referenced by toxic::tri_box_overlap().

#define AXISTEST_Z0 a,
b,
fa,
fb   ) 
 

Value:

p0 = a * v0.m_x - b * v0.m_y; \
    p1 = a * v1.m_x - b * v1.m_y; \
    if(p0 < p1) { min = p0; max = p1; } else { min = p1; max = p0; } \
    rad = fa * boxhalfsize.m_x + fb * boxhalfsize.m_y; \
    if(min > rad || max < -rad) return false;

Definition at line 127 of file triboxoverlap.cpp.

Referenced by toxic::tri_box_overlap().

#define AXISTEST_Z12 a,
b,
fa,
fb   ) 
 

Value:

p1 = a * v1.m_x - b * v1.m_y; \
    p2 = a * v2.m_x - b * v2.m_y; \
    if(p2 < p1) { min = p2; max = p1; } else { min = p1; max = p2; } \
    rad = fa * boxhalfsize.m_x + fb * boxhalfsize.m_y; \
    if(min > rad || max < -rad) return false;

Definition at line 120 of file triboxoverlap.cpp.

Referenced by toxic::tri_box_overlap().

#define FINDMINMAX x0,
x1,
x2,
min,
max   ) 
 

Value:

min = max = x0; \
    if(x1 < min) min = x1; \
    if(x1 > max) max = x1; \
    if(x2 < min) min = x2; \
    if(x2 > max) max = x2;

Definition at line 44 of file triboxoverlap.cpp.

Referenced by toxic::tri_box_overlap().


Function Documentation

bool plane_box_overlap const Vector3 normal,
Real  d,
const Vector3 maxbox
[static]
 

Definition at line 52 of file triboxoverlap.cpp.

References sheep::Vector3::m_x, sheep::Vector3::m_y, and sheep::Vector3::m_z.

Referenced by toxic::tri_box_overlap().


Generated on Tue May 11 01:31:53 2004 for toxic by doxygen 1.3.6