Macros | Functions
OPC_TriTriOverlap.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EDGE_AGAINST_TRI_EDGES(V0, V1, U0, U1, U2)
 TO BE DOCUMENTED. More...
 
#define EDGE_EDGE_TEST(V0, U0, U1)
 Edge to edge test based on Franlin Antonio's gem: "Faster Line Segment Intersection", in Graphics Gems III, pp. 199-202. More...
 
#define LOCAL_EPSILON   0.000001f
 if OPC_TRITRI_EPSILON_TEST is true then we do a check (if |dv|<EPSILON then dv=0.0;) else no check is done (which is less robust, but faster) More...
 
#define NEWCOMPUTE_INTERVALS(VV0, VV1, VV2, D0, D1, D2, D0D1, D0D2, A, B, C, X0, X1)
 TO BE DOCUMENTED. More...
 
#define POINT_IN_TRI(V0, U0, U1, U2)
 TO BE DOCUMENTED. More...
 
#define SORT(a, b)
 sort so that a<=b More...
 

Functions

BOOL CoplanarTriTri (const Point &n, const Point &v0, const Point &v1, const Point &v2, const Point &u0, const Point &u1, const Point &u2)
 TO BE DOCUMENTED. More...
 

Macro Definition Documentation

#define EDGE_AGAINST_TRI_EDGES (   V0,
  V1,
  U0,
  U1,
  U2 
)
Value:
{ \
float Bx,By,Cx,Cy,d,f; \
const float Ax = V1[i0] - V0[i0]; \
const float Ay = V1[i1] - V0[i1]; \
/* test edge U0,U1 against V0,V1 */ \
EDGE_EDGE_TEST(V0, U0, U1); \
/* test edge U1,U2 against V0,V1 */ \
EDGE_EDGE_TEST(V0, U1, U2); \
/* test edge U2,U1 against V0,V1 */ \
EDGE_EDGE_TEST(V0, U2, U0); \
}
#define EDGE_EDGE_TEST(V0, U0, U1)
Edge to edge test based on Franlin Antonio&#39;s gem: "Faster Line Segment Intersection", in Graphics Gems III, pp. 199-202.
#define const
Definition: zconf.h:124

TO BE DOCUMENTED.

Definition at line 36 of file OPC_TriTriOverlap.h.

#define EDGE_EDGE_TEST (   V0,
  U0,
  U1 
)
Value:
Bx = U0[i0] - U1[i0]; \
By = U0[i1] - U1[i1]; \
Cx = V0[i0] - U0[i0]; \
Cy = V0[i1] - U0[i1]; \
f = Ay*Bx - Ax*By; \
d = By*Cx - Bx*Cy; \
if((f>0.0f && d>=0.0f && d<=f) || (f<0.0f && d<=0.0f && d>=f)) \
{ \
const float e=Ax*Cy - Ay*Cx; \
if(f>0.0f) \
{ \
if(e>=0.0f && e<=f) return TRUE; \
} \
else \
{ \
if(e<=0.0f && e>=f) return TRUE; \
} \
}
#define const
Definition: zconf.h:124

Edge to edge test based on Franlin Antonio's gem: "Faster Line Segment Intersection", in Graphics Gems III, pp. 199-202.

Definition at line 15 of file OPC_TriTriOverlap.h.

#define LOCAL_EPSILON   0.000001f

if OPC_TRITRI_EPSILON_TEST is true then we do a check (if |dv|<EPSILON then dv=0.0;) else no check is done (which is less robust, but faster)

Definition at line 3 of file OPC_TriTriOverlap.h.

#define NEWCOMPUTE_INTERVALS (   VV0,
  VV1,
  VV2,
  D0,
  D1,
  D2,
  D0D1,
  D0D2,
  A,
  B,
  C,
  X0,
  X1 
)

TO BE DOCUMENTED.

Definition at line 124 of file OPC_TriTriOverlap.h.

#define POINT_IN_TRI (   V0,
  U0,
  U1,
  U2 
)
Value:
{ \
/* is T1 completly inside T2? */ \
/* check if V0 is inside tri(U0,U1,U2) */ \
float a = U1[i1] - U0[i1]; \
float b = -(U1[i0] - U0[i0]); \
float c = -a*U0[i0] - b*U0[i1]; \
float d0 = a*V0[i0] + b*V0[i1] + c; \
\
a = U2[i1] - U1[i1]; \
b = -(U2[i0] - U1[i0]); \
c = -a*U1[i0] - b*U1[i1]; \
const float d1 = a*V0[i0] + b*V0[i1] + c; \
\
a = U0[i1] - U2[i1]; \
b = -(U0[i0] - U2[i0]); \
c = -a*U2[i0] - b*U2[i1]; \
const float d2 = a*V0[i0] + b*V0[i1] + c; \
if(d0*d1>0.0f) \
{ \
if(d0*d2>0.0f) return TRUE; \
} \
}
int c
Definition: autoplay.py:16
long b
Definition: jpegint.h:371
string a
#define const
Definition: zconf.h:124

TO BE DOCUMENTED.

Definition at line 50 of file OPC_TriTriOverlap.h.

#define SORT (   a,
  b 
)
Value:
if(a>b) \
{ \
const float c=a; \
a=b; \
b=c; \
}
int c
Definition: autoplay.py:16
long b
Definition: jpegint.h:371
string a
#define const
Definition: zconf.h:124

sort so that a<=b

Definition at line 6 of file OPC_TriTriOverlap.h.

Function Documentation

BOOL CoplanarTriTri ( const Point n,
const Point v0,
const Point v1,
const Point v2,
const Point u0,
const Point u1,
const Point u2 
)

TO BE DOCUMENTED.

Definition at line 75 of file OPC_TriTriOverlap.h.



openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:42