00001
00002
00003
00004 #ifndef Intersection_Header
00005 #define Intersection_Header
00006
00007 #include "face.h"
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 class Intersection {
00020
00021 public:
00022
00023 static int debug;
00024 static const char* rcsid;
00025
00026
00027 static Intersection* Instance();
00028
00029
00030 bool intersects(Face *face0, Face *face1);
00031
00032 bool intersects(Face *face0, Point3D *min, Point3D *max);
00033
00034 private:
00035
00036
00037 Intersection();
00038 ~Intersection();
00039
00040
00041 int NoDivTriTriIsect(float V0[3], float V1[3], float V2[3],
00042 float U0[3], float U1[3], float U2[3]);
00043 int triBoxOverlap(float boxcenter[3], float boxhalfsize[3], float triverts[3][3]);
00044
00045
00046 int coplanar_tri_tri(float N[3], float V0[3], float V1[3], float V2[3],
00047 float U0[3], float U1[3], float U2[3]);
00048 int planeBoxOverlap(float normal[3], float vert[3], float maxbox[3]);
00049
00050
00051 static Intersection* pinstance;
00052 };
00053
00054 #endif // Intersection_Header_Header