Macros | Functions
OPC_TriBoxOverlap.h File Reference

Go to the source code of this file.

Macros

#define AXISTEST_X01(a, b, fa, fb)
 TO BE DOCUMENTED. More...
 
#define AXISTEST_X2(a, b, fa, fb)
 TO BE DOCUMENTED. More...
 
#define AXISTEST_Y02(a, b, fa, fb)
 TO BE DOCUMENTED. More...
 
#define AXISTEST_Y1(a, b, fa, fb)
 TO BE DOCUMENTED. More...
 
#define AXISTEST_Z0(a, b, fa, fb)
 TO BE DOCUMENTED. More...
 
#define AXISTEST_Z12(a, b, fa, fb)
 TO BE DOCUMENTED. More...
 
#define FINDMINMAX(x0, x1, x2, min, max)
 This macro quickly finds the min & max values among 3 variables. More...
 
#define IMPLEMENT_CLASS3_TESTS
 

Functions

inline_ BOOL planeBoxOverlap (const Point &normal, const float d, const Point &maxbox)
 TO BE DOCUMENTED. More...
 

Macro Definition Documentation

◆ AXISTEST_X01

#define AXISTEST_X01 (   a,
  b,
  fa,
  fb 
)
Value:
min = a*v0.y - b*v0.z; \
max = a*v2.y - b*v2.z; \
if(min>max) {const float tmp=max; max=min; min=tmp; } \
rad = fa * extents.y + fb * extents.z; \
if(min>rad || max<-rad) return FALSE;

TO BE DOCUMENTED.

Definition at line 26 of file OPC_TriBoxOverlap.h.

◆ AXISTEST_X2

#define AXISTEST_X2 (   a,
  b,
  fa,
  fb 
)
Value:
min = a*v0.y - b*v0.z; \
max = a*v1.y - b*v1.z; \
if(min>max) {const float tmp=max; max=min; min=tmp; } \
rad = fa * extents.y + fb * extents.z; \
if(min>rad || max<-rad) return FALSE;

TO BE DOCUMENTED.

Definition at line 34 of file OPC_TriBoxOverlap.h.

◆ AXISTEST_Y02

#define AXISTEST_Y02 (   a,
  b,
  fa,
  fb 
)
Value:
min = b*v0.z - a*v0.x; \
max = b*v2.z - a*v2.x; \
if(min>max) {const float tmp=max; max=min; min=tmp; } \
rad = fa * extents.x + fb * extents.z; \
if(min>rad || max<-rad) return FALSE;

TO BE DOCUMENTED.

Definition at line 42 of file OPC_TriBoxOverlap.h.

◆ AXISTEST_Y1

#define AXISTEST_Y1 (   a,
  b,
  fa,
  fb 
)
Value:
min = b*v0.z - a*v0.x; \
max = b*v1.z - a*v1.x; \
if(min>max) {const float tmp=max; max=min; min=tmp; } \
rad = fa * extents.x + fb * extents.z; \
if(min>rad || max<-rad) return FALSE;

TO BE DOCUMENTED.

Definition at line 50 of file OPC_TriBoxOverlap.h.

◆ AXISTEST_Z0

#define AXISTEST_Z0 (   a,
  b,
  fa,
  fb 
)
Value:
min = a*v0.x - b*v0.y; \
max = a*v1.x - b*v1.y; \
if(min>max) {const float tmp=max; max=min; min=tmp; } \
rad = fa * extents.x + fb * extents.y; \
if(min>rad || max<-rad) return FALSE;

TO BE DOCUMENTED.

Definition at line 66 of file OPC_TriBoxOverlap.h.

◆ AXISTEST_Z12

#define AXISTEST_Z12 (   a,
  b,
  fa,
  fb 
)
Value:
min = a*v1.x - b*v1.y; \
max = a*v2.x - b*v2.y; \
if(min>max) {const float tmp=max; max=min; min=tmp; } \
rad = fa * extents.x + fb * extents.y; \
if(min>rad || max<-rad) return FALSE;

TO BE DOCUMENTED.

Definition at line 58 of file OPC_TriBoxOverlap.h.

◆ FINDMINMAX

#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;

This macro quickly finds the min & max values among 3 variables.

Definition at line 3 of file OPC_TriBoxOverlap.h.

◆ IMPLEMENT_CLASS3_TESTS

#define IMPLEMENT_CLASS3_TESTS
Value:
float rad; \
float min, max; \
\
const float fey0 = fabsf(e0.y); \
const float fez0 = fabsf(e0.z); \
AXISTEST_X01(e0.z, e0.y, fez0, fey0); \
const float fex0 = fabsf(e0.x); \
AXISTEST_Y02(e0.z, e0.x, fez0, fex0); \
AXISTEST_Z12(e0.y, e0.x, fey0, fex0); \
\
const float fey1 = fabsf(e1.y); \
const float fez1 = fabsf(e1.z); \
AXISTEST_X01(e1.z, e1.y, fez1, fey1); \
const float fex1 = fabsf(e1.x); \
AXISTEST_Y02(e1.z, e1.x, fez1, fex1); \
AXISTEST_Z0(e1.y, e1.x, fey1, fex1); \
\
const Point e2 = mLeafVerts[0] - mLeafVerts[2]; \
const float fey2 = fabsf(e2.y); \
const float fez2 = fabsf(e2.z); \
AXISTEST_X2(e2.z, e2.y, fez2, fey2); \
const float fex2 = fabsf(e2.x); \
AXISTEST_Y1(e2.z, e2.x, fez2, fex2); \
AXISTEST_Z12(e2.y, e2.x, fey2, fex2);

Definition at line 78 of file OPC_TriBoxOverlap.h.

Function Documentation

◆ planeBoxOverlap()

inline_ BOOL planeBoxOverlap ( const Point normal,
const float  d,
const Point maxbox 
)

TO BE DOCUMENTED.

Definition at line 11 of file OPC_TriBoxOverlap.h.

b
long b
Definition: jpegint.h:371
hrp::max
static int max(int a, int b)
Definition: MatrixSolvers.cpp:54
hrp::min
static int min(int a, int b)
Definition: MatrixSolvers.cpp:55
FALSE
#define FALSE
Definition: OPC_IceHook.h:9
Point
Definition: IcePoint.h:25
test.a
int a
Definition: test.py:1


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:05