DELAUNAY.H

Go to the documentation of this file.
00001 /* --
00002 OpenFX version 2.0 - Modelling, Animation and Rendering Package
00003 Copyright (C) 2000  - 2007 OpenFX Development Team
00004 -- */
00005 
00006 /* delaunay.h  */
00007 
00013 typedef struct Delaunay_FACET_tag {
00014   long f;
00015   long ea[3]; 
00016   long fa[3]; 
00017 } FACET;
00018 
00019 #ifndef min
00020 #define min(a,b)  ( ((a) < (b)) ? (a) : (b) )
00021 #endif
00022 #ifndef max
00023 #define max(a,b)  ( ((a) > (b)) ? (a) : (b) )
00024 #endif
00025 #define VECCOPY(a,b)    { b[0] = a[0]; b[1] = a[1]; b[2] = a[2]; }
00026 #define VECSUB(a,b,c)   { c[0]=a[0]-b[0]; c[1]=a[1]-b[1]; c[2]=a[2]-b[2];}
00027 #define VECSUM(a,b,c)   { c[0]=a[0]+b[0]; c[1]=a[1]+b[1]; c[2]=a[2]+b[2];}
00028 #define VECSCALE(a,b,c) { c[0]=(a)*b[0]; c[1]=(a)*b[1]; c[2]=(a)*b[2];}
00029 #define DOT(a,b)        ( (a[0]*b[0]) + (a[1]*b[1]) + (a[2]*b[2]) )
00030 #define CROSS(v1,v2,r)  { \
00031                           r[0] = (v1[1]*v2[2]) - (v2[1]*v1[2]);  \
00032                           r[1] = (v1[2]*v2[0]) - (v1[0]*v2[2]);  \
00033                           r[2] = (v1[0]*v2[1]) - (v2[0]*v1[1]);  \
00034                          }
00035 #define POINT2VECTOR(p,v) v[0]=(double)p[0]; v[1]=(double)p[1]; \
00036                           v[2]=(double)p[2];
00037 #define VECTOR2POINT(v,p) p[0]=(long)v[0]; p[1]=(long)v[1]; \
00038                           p[2]=(long)v[2];
00039 
00040 #define NO               0
00041 #define YES              1
00042 #define FAIL            -1
00043 #define OK               1
00044 
00045 static FACET *add_small_face(long , long , long ,
00046                              long , long , FACET *w,
00047                              long *);
00048 static long BoolAddVertex(vector , short );
00049 static short EdgePierceFace(vector ,
00050                             vector , vector , vector ,
00051                             short *, short *);
00052 static FACET *AddDelaunayTriangulation(vector ,long *, FACET *);
00053 static short Del_Swap(vector, long, long, long );
00054 static long Del_Edgeid(long , long , FACET *, long ,
00055                        long *, long *, long *, long *);
00056 static void IntersectObject(int);
00057 
00058 

Generated on Sun Apr 27 14:20:10 2014 for OpenFX by  doxygen 1.5.6