pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include <math.h>
#include <stdio.h>
Go to the source code of this file.
Defines | |
#define | X 0 |
#define | Y 1 |
#define | Z 2 |
#define | CROSS(dest, v1, v2) |
#define | DOT(v1, v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) |
#define | SUB(dest, v1, v2) |
#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 | |
int | planeBoxOverlap (double normal[3], double vert[3], double maxbox[3]) |
int | triBoxOverlap (double boxcenter[3], double boxhalfsize[3], double triverts[3][3]) |
#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 | |||
) |
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 26 of file tribox3.c.
Referenced by triBoxOverlap().
#define DOT | ( | v1, | |
v2 | |||
) | (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) |
Definition at line 31 of file tribox3.c.
Referenced by planeBoxOverlap().
#define FINDMINMAX | ( | x0, | |
x1, | |||
x2, | |||
min, | |||
max | |||
) |
#define SUB | ( | dest, | |
v1, | |||
v2 | |||
) |
dest[0]=v1[0]-v2[0]; \ dest[1]=v1[1]-v2[1]; \ dest[2]=v1[2]-v2[2];
Definition at line 33 of file tribox3.c.
Referenced by triBoxOverlap().
#define X 0 |
History: 2004-10-27 Stephane Popinet: changed float to double
Definition at line 22 of file tribox3.c.
Referenced by planeBoxOverlap(), and triBoxOverlap().
#define Y 1 |
Definition at line 23 of file tribox3.c.
Referenced by triBoxOverlap().
#define Z 2 |
Definition at line 24 of file tribox3.c.
Referenced by planeBoxOverlap(), and triBoxOverlap().
int planeBoxOverlap | ( | double | normal[3], |
double | vert[3], | ||
double | maxbox[3] | ||
) |
int triBoxOverlap | ( | double | boxcenter[3], |
double | boxhalfsize[3], | ||
double | triverts[3][3] | ||
) |
Definition at line 116 of file tribox3.c.
References AXISTEST_X01, AXISTEST_X2, AXISTEST_Y02, AXISTEST_Y1, AXISTEST_Z0, AXISTEST_Z12, CROSS, FINDMINMAX, max, min, planeBoxOverlap(), SUB, X, Y, and Z.
Referenced by gts_bbox_overlaps_segment(), and gts_bbox_overlaps_triangle().