Namespaces | Macros | Functions
FastAABBTriangleTest.h File Reference
#include <math.h>
#include <stdio.h>
Include dependency graph for FastAABBTriangleTest.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 FastAABTriangleTest
 

Macros

#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_Z0(a, b, fa, fb)
 
#define AXISTEST_Z12(a, b, fa, fb)
 
#define CROSS(dest, v1, v2)
 
#define DOT(v1, v2)   (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2])
 
#define FINDMINMAX(x0, x1, x2, min, max)
 
#define SUB(dest, v1, v2)
 
#define X   0
 
#define Y   1
 
#define Z   2
 

Functions

int FastAABTriangleTest::planeBoxOverlap (float normal[3], float vert[3], float maxbox[3])
 
int FastAABTriangleTest::triBoxOverlap (float boxcenter[3], float boxhalfsize[3], float triverts[3][3])
 

Macro Definition Documentation

#define AXISTEST_X01 (   a,
  b,
  fa,
  fb 
)
Value:
p0 = a*v0[Y] - b*v0[Z]; \
p2 = a*v2[Y] - b*v2[Z]; \
if(p0<p2) {min=p0; max=p2;} else {min=p2; max=p0;} \
rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \
if(min>rad || max<-rad) return 0;
#define Z
float max(float a, float b, float c)
float min(float a, float b, float c)
#define Y

Definition at line 77 of file FastAABBTriangleTest.h.

#define AXISTEST_X2 (   a,
  b,
  fa,
  fb 
)
Value:
p0 = a*v0[Y] - b*v0[Z]; \
p1 = a*v1[Y] - b*v1[Z]; \
if(p0<p1) {min=p0; max=p1;} else {min=p1; max=p0;} \
rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \
if(min>rad || max<-rad) return 0;
#define Z
float max(float a, float b, float c)
float min(float a, float b, float c)
#define Y

Definition at line 83 of file FastAABBTriangleTest.h.

#define AXISTEST_Y02 (   a,
  b,
  fa,
  fb 
)
Value:
p0 = -a*v0[X] + b*v0[Z]; \
p2 = -a*v2[X] + b*v2[Z]; \
if(p0<p2) {min=p0; max=p2;} else {min=p2; max=p0;} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \
if(min>rad || max<-rad) return 0;
#define Z
#define X
float max(float a, float b, float c)
float min(float a, float b, float c)

Definition at line 91 of file FastAABBTriangleTest.h.

#define AXISTEST_Y1 (   a,
  b,
  fa,
  fb 
)
Value:
p0 = -a*v0[X] + b*v0[Z]; \
p1 = -a*v1[X] + b*v1[Z]; \
if(p0<p1) {min=p0; max=p1;} else {min=p1; max=p0;} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \
if(min>rad || max<-rad) return 0;
#define Z
#define X
float max(float a, float b, float c)
float min(float a, float b, float c)

Definition at line 98 of file FastAABBTriangleTest.h.

#define AXISTEST_Z0 (   a,
  b,
  fa,
  fb 
)
Value:
p0 = a*v0[X] - b*v0[Y]; \
p1 = a*v1[X] - b*v1[Y]; \
if(p0<p1) {min=p0; max=p1;} else {min=p1; max=p0;} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \
if(min>rad || max<-rad) return 0;
#define X
float max(float a, float b, float c)
float min(float a, float b, float c)
#define Y

Definition at line 112 of file FastAABBTriangleTest.h.

#define AXISTEST_Z12 (   a,
  b,
  fa,
  fb 
)
Value:
p1 = a*v1[X] - b*v1[Y]; \
p2 = a*v2[X] - b*v2[Y]; \
if(p2<p1) {min=p2; max=p1;} else {min=p1; max=p2;} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \
if(min>rad || max<-rad) return 0;
#define X
float max(float a, float b, float c)
float min(float a, float b, float c)
#define Y

Definition at line 106 of file FastAABBTriangleTest.h.

#define CROSS (   dest,
  v1,
  v2 
)
Value:
dest[0]=v1[1]*v2[2]-v1[2]*v2[1]; \
dest[1]=v1[2]*v2[0]-v1[0]*v2[2]; \
dest[2]=v1[0]*v2[1]-v1[1]*v2[0];

Definition at line 32 of file FastAABBTriangleTest.h.

#define DOT (   v1,
  v2 
)    (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2])

Definition at line 37 of file FastAABBTriangleTest.h.

#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;
float max(float a, float b, float c)
float min(float a, float b, float c)

Definition at line 44 of file FastAABBTriangleTest.h.

#define SUB (   dest,
  v1,
  v2 
)
Value:
dest[0]=v1[0]-v2[0]; \
dest[1]=v1[1]-v2[1]; \
dest[2]=v1[2]-v2[2];

Definition at line 39 of file FastAABBTriangleTest.h.

#define X   0

Definition at line 28 of file FastAABBTriangleTest.h.

#define Y   1

Definition at line 29 of file FastAABBTriangleTest.h.

#define Z   2

Definition at line 30 of file FastAABBTriangleTest.h.



or_octomap_plugin
Author(s): Yan Yu
autogenerated on Tue Oct 24 2017 18:02:48