136 float U0[3],
float U1[3],
float U2[3],
float res1[3],
float res2[3])
139 float N1[3],N2[3],d1,d2;
140 float du0,du1,du2,dv0,dv1,dv2;
142 float isect1[2], isect2[2];
143 float du0du1,du0du2,dv0dv1,dv0dv2,du1du2,dv1dv2;
162#if USE_EPSILON_TEST==TRUE
166 if (du1 == 0 && du2 == 0 && fabs(du0) < 1e-4)
168 if (du0 == 0 && du2 == 0 && fabs(du1) < 1e-4)
170 if (du0 == 0 && du1 == 0 && fabs(du2) < 1e-4)
177 if(du0du1>0.0f && du0du2>0.0f) {
192#if USE_EPSILON_TEST==TRUE
196 if (dv1 == 0 && dv2 == 0 && fabs(dv0) < 1e-5)
198 if (dv0 == 0 && dv2 == 0 && fabs(dv1) < 1e-5)
200 if (dv0 == 0 && dv1 == 0 && fabs(dv2) < 1e-5)
207 if(dv0dv1>0.0f && dv0dv2>0.0f) {
218 if(b>max) max=b,
index=1;
219 if(c>max) max=c,
index=2;
236 SORT(isect1[0],isect1[1]);
237 SORT(isect2[0],isect2[1]);
274 std::cerr <<
"contact error" << std::endl;
309 std::cerr <<
"contact error" << std::endl;
312 for (
int i=3;i>0;i--)
313 for (
int j=0;j<i;j++)
317 for (
int k=0;k<3;k++)
318 SWAP(res[j][k], res[j+1][k]);
#define COMPUTE_INTERVALS(VV0, VV1, VV2, D0, D1, D2, D0D1, D0D2, isect0, isect1)
Definition tri_tri_intersection_test.hpp:92
int tri_tri_intersect(float V0[3], float V1[3], float V2[3], float U0[3], float U1[3], float U2[3], float res1[3], float res2[3])
Definition tri_tri_intersection_test.hpp:135