diff options
Diffstat (limited to 'extern/qhull/include')
-rw-r--r-- | extern/qhull/include/qhull/geom.h | 177 | ||||
-rw-r--r-- | extern/qhull/include/qhull/io.h | 149 | ||||
-rw-r--r-- | extern/qhull/include/qhull/mem.h | 174 | ||||
-rw-r--r-- | extern/qhull/include/qhull/merge.h | 171 | ||||
-rw-r--r-- | extern/qhull/include/qhull/poly.h | 290 | ||||
-rw-r--r-- | extern/qhull/include/qhull/qhull.h | 1048 | ||||
-rw-r--r-- | extern/qhull/include/qhull/qhull_a.h | 127 | ||||
-rw-r--r-- | extern/qhull/include/qhull/qset.h | 468 | ||||
-rw-r--r-- | extern/qhull/include/qhull/stat.h | 520 | ||||
-rw-r--r-- | extern/qhull/include/qhull/user.h | 762 |
10 files changed, 0 insertions, 3886 deletions
diff --git a/extern/qhull/include/qhull/geom.h b/extern/qhull/include/qhull/geom.h deleted file mode 100644 index 32440cff56f..00000000000 --- a/extern/qhull/include/qhull/geom.h +++ /dev/null @@ -1,177 +0,0 @@ -/*<html><pre> -<a href="qh-geom.htm" - >-------------------------------</a><a name="TOP">-</a> - - geom.h - header file for geometric routines - - see qh-geom.htm and geom.c - - copyright (c) 1993-2002 The Geometry Center -*/ - -#ifndef qhDEFgeom -#define qhDEFgeom 1 - -/* ============ -macros- ======================== */ - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="fabs_">-</a> - - fabs_(a) - returns the absolute value of a -*/ -#define fabs_( a ) ((( a ) < 0 ) ? -( a ):( a )) - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="fmax_">-</a> - - fmax_(a,b) - returns the maximum value of a and b -*/ -#define fmax_( a,b ) ( ( a ) < ( b ) ? ( b ) : ( a ) ) - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="fmin_">-</a> - - fmin_(a,b) - returns the minimum value of a and b -*/ -#define fmin_( a,b ) ( ( a ) > ( b ) ? ( b ) : ( a ) ) - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="maximize_">-</a> - - maximize_(maxval, val) - set maxval to val if val is greater than maxval -*/ -#define maximize_( maxval, val ) {if (( maxval ) < ( val )) ( maxval )= ( val );} - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="minimize_">-</a> - - minimize_(minval, val) - set minval to val if val is less than minval -*/ -#define minimize_( minval, val ) {if (( minval ) > ( val )) ( minval )= ( val );} - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="det2_">-</a> - - det2_(a1, a2, - b1, b2) - - compute a 2-d determinate -*/ -#define det2_( a1,a2,b1,b2 ) (( a1 )*( b2 ) - ( a2 )*( b1 )) - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="det3_">-</a> - - det3_(a1, a2, a3, - b1, b2, b3, - c1, c2, c3) - - compute a 3-d determinate -*/ -#define det3_( a1,a2,a3,b1,b2,b3,c1,c2,c3 ) ( ( a1 )*det2_( b2,b3,c2,c3 ) \ - - ( b1 )*det2_( a2,a3,c2,c3 ) + ( c1 )*det2_( a2,a3,b2,b3 ) ) - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="dX">-</a> - - dX( p1, p2 ) - dY( p1, p2 ) - dZ( p1, p2 ) - - given two indices into rows[], - - compute the difference between X, Y, or Z coordinates -*/ -#define dX( p1,p2 ) ( *( rows[p1] ) - *( rows[p2] )) -#define dY( p1,p2 ) ( *( rows[p1]+1 ) - *( rows[p2]+1 )) -#define dZ( p1,p2 ) ( *( rows[p1]+2 ) - *( rows[p2]+2 )) -#define dW( p1,p2 ) ( *( rows[p1]+3 ) - *( rows[p2]+3 )) - -/*============= prototypes in alphabetical order, infrequent at end ======= */ - -void qh_backnormal (realT **rows, int numrow, int numcol, boolT sign, coordT *normal, boolT *nearzero); -void qh_distplane (pointT *point, facetT *facet, realT *dist); -facetT *qh_findbest (pointT *point, facetT *startfacet, - boolT bestoutside, boolT isnewfacets, boolT noupper, - realT *dist, boolT *isoutside, int *numpart); -facetT *qh_findbesthorizon (boolT ischeckmax, pointT *point, - facetT *startfacet, boolT noupper, realT *bestdist, int *numpart); -facetT *qh_findbestnew (pointT *point, facetT *startfacet, realT *dist, - boolT bestoutside, boolT *isoutside, int *numpart); -void qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero); -realT qh_getangle(pointT *vect1, pointT *vect2); -pointT *qh_getcenter(setT *vertices); -pointT *qh_getcentrum(facetT *facet); -realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist); -void qh_normalize (coordT *normal, int dim, boolT toporient); -void qh_normalize2 (coordT *normal, int dim, boolT toporient, - realT *minnorm, boolT *ismin); -pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist); - -void qh_setfacetplane(facetT *newfacets); -void qh_sethyperplane_det (int dim, coordT **rows, coordT *point0, - boolT toporient, coordT *normal, realT *offset, boolT *nearzero); -void qh_sethyperplane_gauss (int dim, coordT **rows, pointT *point0, - boolT toporient, coordT *normal, coordT *offset, boolT *nearzero); -boolT qh_sharpnewfacets (void); - -/*========= infrequently used code in geom2.c =============*/ - - -coordT *qh_copypoints (coordT *points, int numpoints, int dimension); -void qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]); -realT qh_determinant (realT **rows, int dim, boolT *nearzero); -realT qh_detjoggle (pointT *points, int numpoints, int dimension); -void qh_detroundoff (void); -realT qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero); -realT qh_distnorm (int dim, pointT *point, pointT *normal, realT *offsetp); -realT qh_distround (int dimension, realT maxabs, realT maxsumabs); -realT qh_divzero(realT numer, realT denom, realT mindenom1, boolT *zerodiv); -realT qh_facetarea (facetT *facet); -realT qh_facetarea_simplex (int dim, coordT *apex, setT *vertices, - vertexT *notvertex, boolT toporient, coordT *normal, realT *offset); -pointT *qh_facetcenter (setT *vertices); -facetT *qh_findgooddist (pointT *point, facetT *facetA, realT *distp, facetT **facetlist); -void qh_getarea (facetT *facetlist); -boolT qh_gram_schmidt(int dim, realT **rows); -boolT qh_inthresholds (coordT *normal, realT *angle); -void qh_joggleinput (void); -realT *qh_maxabsval (realT *normal, int dim); -setT *qh_maxmin(pointT *points, int numpoints, int dimension); -realT qh_maxouter (void); -void qh_maxsimplex (int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex); -realT qh_minabsval (realT *normal, int dim); -int qh_mindiff (realT *vecA, realT *vecB, int dim); -boolT qh_orientoutside (facetT *facet); -void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane); -coordT qh_pointdist(pointT *point1, pointT *point2, int dim); -void qh_printmatrix (FILE *fp, char *string, realT **rows, int numrow, int numcol); -void qh_printpoints (FILE *fp, char *string, setT *points); -void qh_projectinput (void); -void qh_projectpoints (signed char *project, int n, realT *points, - int numpoints, int dim, realT *newpoints, int newdim); -int qh_rand( void); -void qh_srand( int seed); -realT qh_randomfactor (void); -void qh_randommatrix (realT *buffer, int dim, realT **row); -void qh_rotateinput (realT **rows); -void qh_rotatepoints (realT *points, int numpoints, int dim, realT **rows); -void qh_scaleinput (void); -void qh_scalelast (coordT *points, int numpoints, int dim, coordT low, - coordT high, coordT newhigh); -void qh_scalepoints (pointT *points, int numpoints, int dim, - realT *newlows, realT *newhighs); -boolT qh_sethalfspace (int dim, coordT *coords, coordT **nextp, - coordT *normal, coordT *offset, coordT *feasible); -coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible); -pointT *qh_voronoi_center (int dim, setT *points); - -#endif /* qhDEFgeom */ - - - diff --git a/extern/qhull/include/qhull/io.h b/extern/qhull/include/qhull/io.h deleted file mode 100644 index 351d56b3708..00000000000 --- a/extern/qhull/include/qhull/io.h +++ /dev/null @@ -1,149 +0,0 @@ -/*<html><pre> -<a href="qh-io.htm" - >-------------------------------</a><a name="TOP">-</a> - - io.h - declarations of Input/Output functions - - see README, qhull.h and io.c - - copyright (c) 1993-2002, The Geometry Center -*/ - -#ifndef qhDEFio -#define qhDEFio 1 - -/*============ constants and flags ==================*/ - -/*-<a href="qh-io.htm#TOC" - >--------------------------------</a><a name="qh_MAXfirst">-</a> - - qh_MAXfirst - maximum length of first two lines of stdin -*/ -#define qh_MAXfirst 200 - -/*-<a href="qh-io.htm#TOC" - >--------------------------------</a><a name="qh_MINradius">-</a> - - qh_MINradius - min radius for Gp and Gv, fraction of maxcoord -*/ -#define qh_MINradius 0.02 - -/*-<a href="qh-io.htm#TOC" - >--------------------------------</a><a name="qh_GEOMepsilon">-</a> - - qh_GEOMepsilon - adjust outer planes for 'lines closer' and geomview roundoff. - This prevents bleed through. -*/ -#define qh_GEOMepsilon 2e-3 - -/*-<a href="qh-io.htm#TOC" - >--------------------------------</a><a name="qh_WHITESPACE">-</a> - - qh_WHITESPACE - possible values of white space -*/ -#define qh_WHITESPACE " \n\t\v\r\f" - - -/*-<a href="qh-io.htm#TOC" - >--------------------------------</a><a name="RIDGE">-</a> - - qh_RIDGE - to select which ridges to print in qh_eachvoronoi -*/ -typedef enum -{ - qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter -} -qh_RIDGE; - -/*-<a href="qh-io.htm#TOC" - >--------------------------------</a><a name="printvridgeT">-</a> - - printvridgeT - prints results of qh_printvdiagram - - see: - <a href="io.c#printvridge">qh_printvridge</a> for an example -*/ -typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded); - -/*============== -prototypes in alphabetical order =========*/ - -void dfacet( unsigned id); -void dvertex( unsigned id); -void qh_countfacets (facetT *facetlist, setT *facets, boolT printall, - int *numfacetsp, int *numsimplicialp, int *totneighborsp, - int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp); -pointT *qh_detvnorm (vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp); -setT *qh_detvridge (vertexT *vertex); -setT *qh_detvridge3 (vertexT *atvertex, vertexT *vertex); -int qh_eachvoronoi (FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder); -int qh_eachvoronoi_all (FILE *fp, printvridgeT printvridge, boolT isupper, qh_RIDGE innerouter, boolT inorder); -void qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist); -setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets); -void qh_geomplanes (facetT *facet, realT *outerplane, realT *innerplane); -void qh_markkeep (facetT *facetlist); -setT *qh_markvoronoi (facetT *facetlist, setT *facets, boolT printall, boolT *islowerp, int *numcentersp); -void qh_order_vertexneighbors(vertexT *vertex); -void qh_printafacet(FILE *fp, int format, facetT *facet, boolT printall); -void qh_printbegin (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall); -void qh_printcenter (FILE *fp, int format, char *string, facetT *facet); -void qh_printcentrum (FILE *fp, facetT *facet, realT radius); -void qh_printend (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall); -void qh_printend4geom (FILE *fp, facetT *facet, int *num, boolT printall); -void qh_printextremes (FILE *fp, facetT *facetlist, setT *facets, int printall); -void qh_printextremes_2d (FILE *fp, facetT *facetlist, setT *facets, int printall); -void qh_printextremes_d (FILE *fp, facetT *facetlist, setT *facets, int printall); -void qh_printfacet(FILE *fp, facetT *facet); -void qh_printfacet2math(FILE *fp, facetT *facet, int notfirst); -void qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]); -void qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2, - facetT *facet, realT offset, realT color[3]); -void qh_printfacet3math (FILE *fp, facetT *facet, int notfirst); -void qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]); -void qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]); -void qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]); -void qh_printfacet3vertex(FILE *fp, facetT *facet, int format); -void qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]); -void qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]); -void qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, int format); -void qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, int format); -void qh_printfacetheader(FILE *fp, facetT *facet); -void qh_printfacetridges(FILE *fp, facetT *facet); -void qh_printfacets(FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall); -void qh_printhelp_degenerate(FILE *fp); -void qh_printhelp_singular(FILE *fp); -void qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2, - setT *vertices, realT color[3]); -void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall); -void qh_printline3geom (FILE *fp, pointT *pointA, pointT *pointB, realT color[3]); -void qh_printpoint(FILE *fp, char *string, pointT *point); -void qh_printpointid(FILE *fp, char *string, int dim, pointT *point, int id); -void qh_printpoint3 (FILE *fp, pointT *point); -void qh_printpoints_out (FILE *fp, facetT *facetlist, setT *facets, int printall); -void qh_printpointvect (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]); -void qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius); -void qh_printridge(FILE *fp, ridgeT *ridge); -void qh_printspheres(FILE *fp, setT *vertices, realT radius); -void qh_printvdiagram (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall); -int qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder); -void qh_printvertex(FILE *fp, vertexT *vertex); -void qh_printvertexlist (FILE *fp, char* string, facetT *facetlist, - setT *facets, boolT printall); -void qh_printvertices (FILE *fp, char* string, setT *vertices); -void qh_printvneighbors (FILE *fp, facetT* facetlist, setT *facets, boolT printall); -void qh_printvoronoi (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall); -void qh_printvnorm (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded); -void qh_printvridge (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded); -void qh_produce_output(void); -void qh_projectdim3 (pointT *source, pointT *destination); -int qh_readfeasible (int dim, char *remainder); -coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc); -void qh_setfeasible (int dim); -boolT qh_skipfacet(facetT *facet); - -#endif /* qhDEFio */ diff --git a/extern/qhull/include/qhull/mem.h b/extern/qhull/include/qhull/mem.h deleted file mode 100644 index e9ebd1bb9bc..00000000000 --- a/extern/qhull/include/qhull/mem.h +++ /dev/null @@ -1,174 +0,0 @@ -/*<html><pre> -<a href="qh-mem.htm" - >-------------------------------</a><a name="TOP">-</a> - - mem.h - prototypes for memory management functions - - see qh-mem.htm, mem.c and qset.h - - for error handling, writes message and calls - qh_errexit (qhmem_ERRmem, NULL, NULL) if insufficient memory - and - qh_errexit (qhmem_ERRqhull, NULL, NULL) otherwise - - copyright (c) 1993-2002, The Geometry Center -*/ - -#ifndef qhDEFmem -#define qhDEFmem - -/*-<a href="qh-mem.htm#TOC" - >-------------------------------</a><a name="NOmem">-</a> - - qh_NOmem - turn off quick-fit memory allocation - - notes: - mem.c implements Quickfit memory allocation for about 20% time - savings. If it fails on your machine, try to locate the - problem, and send the answer to qhull@geom.umn.edu. If this can - not be done, define qh_NOmem to use malloc/free instead. - - #define qh_NOmem -*/ - -/*------------------------------------------- - to avoid bus errors, memory allocation must consider alignment requirements. - malloc() automatically takes care of alignment. Since mem.c manages - its own memory, we need to explicitly specify alignment in - qh_meminitbuffers(). - - A safe choice is sizeof(double). sizeof(float) may be used if doubles - do not occur in data structures and pointers are the same size. Be careful - of machines (e.g., DEC Alpha) with large pointers. If gcc is available, - use __alignof__(double) or fmax_(__alignof__(float), __alignof__(void *)). - - see <a href="user.h#MEMalign">qh_MEMalign</a> in user.h for qhull's alignment -*/ - -#define qhmem_ERRmem 4 /* matches qh_ERRmem in qhull.h */ -#define qhmem_ERRqhull 5 /* matches qh_ERRqhull in qhull.h */ - -/*-<a href="qh-mem.htm#TOC" - >--------------------------------</a><a name="ptr_intT">-</a> - - ptr_intT - for casting a void* to an integer-type - - notes: - On 64-bit machines, a pointer may be larger than an 'int'. - qh_meminit() checks that 'long' holds a 'void*' -*/ -typedef unsigned long ptr_intT; - -/*-<a href="qh-mem.htm#TOC" - >--------------------------------</a><a name="qhmemT">-</a> - - qhmemT - global memory structure for mem.c - - notes: - users should ignore qhmem except for writing extensions - qhmem is allocated in mem.c - - qhmem could be swapable like qh and qhstat, but then - multiple qh's and qhmem's would need to keep in synch. - A swapable qhmem would also waste memory buffers. As long - as memory operations are atomic, there is no problem with - multiple qh structures being active at the same time. - If you need separate address spaces, you can swap the - contents of qhmem. -*/ -typedef struct qhmemT qhmemT; -extern qhmemT qhmem; - -struct qhmemT { /* global memory management variables */ - int BUFsize; /* size of memory allocation buffer */ - int BUFinit; /* initial size of memory allocation buffer */ - int TABLEsize; /* actual number of sizes in free list table */ - int NUMsizes; /* maximum number of sizes in free list table */ - int LASTsize; /* last size in free list table */ - int ALIGNmask; /* worst-case alignment, must be 2^n-1 */ - void **freelists; /* free list table, linked by offset 0 */ - int *sizetable; /* size of each freelist */ - int *indextable; /* size->index table */ - void *curbuffer; /* current buffer, linked by offset 0 */ - void *freemem; /* free memory in curbuffer */ - int freesize; /* size of free memory in bytes */ - void *tempstack; /* stack of temporary memory, managed by users */ - FILE *ferr; /* file for reporting errors */ - int IStracing; /* =5 if tracing memory allocations */ - int cntquick; /* count of quick allocations */ - /* remove statistics doesn't effect speed */ - int cntshort; /* count of short allocations */ - int cntlong; /* count of long allocations */ - int curlong; /* current count of inuse, long allocations */ - int freeshort; /* count of short memfrees */ - int freelong; /* count of long memfrees */ - int totshort; /* total size of short allocations */ - int totlong; /* total size of long allocations */ - int maxlong; /* maximum totlong */ - int cntlarger; /* count of setlarger's */ - int totlarger; /* total copied by setlarger */ -}; - - -/*==================== -macros ====================*/ - -/*-<a href="qh-mem.htm#TOC" - >--------------------------------</a><a name="memalloc_">-</a> - - qh_memalloc_(size, object, type) - returns object of size bytes - assumes size<=qhmem.LASTsize and void **freelistp is a temp -*/ - -#ifdef qh_NOmem -#define qh_memalloc_(size, freelistp, object, type) {\ - object= (type*)qh_memalloc (size); } -#else /* !qh_NOmem */ - -#define qh_memalloc_(size, freelistp, object, type) {\ - freelistp= qhmem.freelists + qhmem.indextable[size];\ - if ((object= (type*)*freelistp)) {\ - qhmem.cntquick++; \ - *freelistp= *((void **)*freelistp);\ - }else object= (type*)qh_memalloc (size);} -#endif - -/*-<a href="qh-mem.htm#TOC" - >--------------------------------</a><a name="memfree_">-</a> - - qh_memfree_(object, size) - free up an object - - notes: - object may be NULL - assumes size<=qhmem.LASTsize and void **freelistp is a temp -*/ -#ifdef qh_NOmem -#define qh_memfree_(object, size, freelistp) {\ - qh_memfree (object, size); } -#else /* !qh_NOmem */ - -#define qh_memfree_(object, size, freelistp) {\ - if (object) { \ - qhmem .freeshort++;\ - freelistp= qhmem.freelists + qhmem.indextable[size];\ - *((void **)object)= *freelistp;\ - *freelistp= object;}} -#endif - -/*=============== prototypes in alphabetical order ============*/ - -void *qh_memalloc(int insize); -void qh_memfree (void *object, int size); -void qh_memfreeshort (int *curlong, int *totlong); -void qh_meminit (FILE *ferr); -void qh_meminitbuffers (int tracelevel, int alignment, int numsizes, - int bufsize, int bufinit); -void qh_memsetup (void); -void qh_memsize(int size); -void qh_memstatistics (FILE *fp); - -#endif /* qhDEFmem */ diff --git a/extern/qhull/include/qhull/merge.h b/extern/qhull/include/qhull/merge.h deleted file mode 100644 index 7fc2afa5967..00000000000 --- a/extern/qhull/include/qhull/merge.h +++ /dev/null @@ -1,171 +0,0 @@ -/*<html><pre> -<a href="qh-merge.htm" - >-------------------------------</a><a name="TOP">-</a> - - merge.h - header file for merge.c - - see qh-merge.htm and merge.c - - copyright (c) 1993-2002, The Geometry Center -*/ - -#ifndef qhDEFmerge -#define qhDEFmerge 1 - - -/*============ -constants- ==============*/ - -/*-<a href="qh-merge.htm#TOC" - >--------------------------------</a><a name="qh_ANGLEredundant">-</a> - - qh_ANGLEredundant - indicates redundant merge in mergeT->angle -*/ -#define qh_ANGLEredundant 6.0 - -/*-<a href="qh-merge.htm#TOC" - >--------------------------------</a><a name="qh_ANGLEdegen">-</a> - - qh_ANGLEdegen - indicates degenerate facet in mergeT->angle -*/ -#define qh_ANGLEdegen 5.0 - -/*-<a href="qh-merge.htm#TOC" - >--------------------------------</a><a name="qh_ANGLEconcave">-</a> - - qh_ANGLEconcave - offset to indicate concave facets in mergeT->angle - - notes: - concave facets are assigned the range of [2,4] in mergeT->angle - roundoff error may make the angle less than 2 -*/ -#define qh_ANGLEconcave 1.5 - -/*-<a href="qh-merge.htm#TOC" - >--------------------------------</a><a name="MRG">-</a> - - MRG... (mergeType) - indicates the type of a merge (mergeT->type) -*/ -typedef enum { /* in sort order for facet_mergeset */ - MRGnone= 0, - MRGcoplanar, /* centrum coplanar */ - MRGanglecoplanar, /* angle coplanar */ - /* could detect half concave ridges */ - MRGconcave, /* concave ridge */ - MRGflip, /* flipped facet. facet1 == facet2 */ - MRGridge, /* duplicate ridge (qh_MERGEridge) */ - /* degen and redundant go onto degen_mergeset */ - MRGdegen, /* degenerate facet (not enough neighbors) facet1 == facet2 */ - MRGredundant, /* redundant facet (vertex subset) */ - /* merge_degenredundant assumes degen < redundant */ - MRGmirror, /* mirror facet from qh_triangulate */ - ENDmrg -} mergeType; - -/*-<a href="qh-merge.htm#TOC" - >--------------------------------</a><a name="qh_MERGEapex">-</a> - - qh_MERGEapex - flag for qh_mergefacet() to indicate an apex merge -*/ -#define qh_MERGEapex True - -/*============ -structures- ====================*/ - -/*-<a href="qh-merge.htm#TOC" - >--------------------------------</a><a name="mergeT">-</a> - - mergeT - structure used to merge facets -*/ - -typedef struct mergeT mergeT; -struct mergeT { /* initialize in qh_appendmergeset */ - realT angle; /* angle between normals of facet1 and facet2 */ - facetT *facet1; /* will merge facet1 into facet2 */ - facetT *facet2; - mergeType type; -}; - - -/*=========== -macros- =========================*/ - -/*-<a href="qh-merge.htm#TOC" - >--------------------------------</a><a name="FOREACHmerge_">-</a> - - FOREACHmerge_( merges ) {...} - assign 'merge' to each merge in merges - - notes: - uses 'mergeT *merge, **mergep;' - if qh_mergefacet(), - restart since qh.facet_mergeset may change - see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHmerge_( merges ) FOREACHsetelement_(mergeT, merges, merge) - -/*============ prototypes in alphabetical order after pre/postmerge =======*/ - -void qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle); -void qh_postmerge (char *reason, realT maxcentrum, realT maxangle, - boolT vneighbors); -void qh_all_merges (boolT othermerge, boolT vneighbors); -void qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle); -setT *qh_basevertices( facetT *samecycle); -void qh_checkconnect (void /* qh new_facets */); -boolT qh_checkzero (boolT testall); -void qh_copynonconvex (ridgeT *atridge); -void qh_degen_redundant_facet (facetT *facet); -void qh_degen_redundant_neighbors (facetT *facet, facetT *delfacet); -vertexT *qh_find_newvertex (vertexT *oldvertex, setT *vertices, setT *ridges); -void qh_findbest_test (boolT testcentrum, facetT *facet, facetT *neighbor, - facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp); -facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp); -void qh_flippedmerges(facetT *facetlist, boolT *wasmerge); -void qh_forcedmerges( boolT *wasmerge); -void qh_getmergeset(facetT *facetlist); -void qh_getmergeset_initial (facetT *facetlist); -void qh_hashridge (setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex); -ridgeT *qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge, - vertexT *vertex, vertexT *oldvertex, int *hashslot); -void qh_makeridges(facetT *facet); -void qh_mark_dupridges(facetT *facetlist); -void qh_maydropneighbor (facetT *facet); -int qh_merge_degenredundant (void); -void qh_merge_nonconvex( facetT *facet1, facetT *facet2, mergeType mergetype); -void qh_mergecycle (facetT *samecycle, facetT *newfacet); -void qh_mergecycle_all (facetT *facetlist, boolT *wasmerge); -void qh_mergecycle_facets( facetT *samecycle, facetT *newfacet); -void qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet); -void qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet); -void qh_mergecycle_vneighbors( facetT *samecycle, facetT *newfacet); -void qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex); -void qh_mergefacet2d (facetT *facet1, facetT *facet2); -void qh_mergeneighbors(facetT *facet1, facetT *facet2); -void qh_mergeridges(facetT *facet1, facetT *facet2); -void qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex); -void qh_mergevertex_del (vertexT *vertex, facetT *facet1, facetT *facet2); -void qh_mergevertex_neighbors(facetT *facet1, facetT *facet2); -void qh_mergevertices(setT *vertices1, setT **vertices); -setT *qh_neighbor_intersections (vertexT *vertex); -void qh_newvertices (setT *vertices); -boolT qh_reducevertices (void); -vertexT *qh_redundant_vertex (vertexT *vertex); -boolT qh_remove_extravertices (facetT *facet); -vertexT *qh_rename_sharedvertex (vertexT *vertex, facetT *facet); -void qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex); -void qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges, - facetT *oldfacet, facetT *neighborA); -boolT qh_test_appendmerge (facetT *facet, facetT *neighbor); -boolT qh_test_vneighbors (void /* qh newfacet_list */); -void qh_tracemerge (facetT *facet1, facetT *facet2); -void qh_tracemerging (void); -void qh_updatetested( facetT *facet1, facetT *facet2); -setT *qh_vertexridges (vertexT *vertex); -void qh_vertexridges_facet (vertexT *vertex, facetT *facet, setT **ridges); -void qh_willdelete (facetT *facet, facetT *replace); - -#endif /* qhDEFmerge */ diff --git a/extern/qhull/include/qhull/poly.h b/extern/qhull/include/qhull/poly.h deleted file mode 100644 index 294ec9527fc..00000000000 --- a/extern/qhull/include/qhull/poly.h +++ /dev/null @@ -1,290 +0,0 @@ -/*<html><pre> -<a href="qh-poly.htm" - >-------------------------------</a><a name="TOP">-</a> - - poly.h - header file for poly.c and poly2.c - - see qh-poly.htm, qhull.h and poly.c - - copyright (c) 1993-2002, The Geometry Center -*/ - -#ifndef qhDEFpoly -#define qhDEFpoly 1 - -/*=============== constants ========================== */ - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="ALGORITHMfault">-</a> - - ALGORITHMfault - use as argument to checkconvex() to report errors during buildhull -*/ -#define qh_ALGORITHMfault 0 - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="DATAfault">-</a> - - DATAfault - use as argument to checkconvex() to report errors during initialhull -*/ -#define qh_DATAfault 1 - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="DUPLICATEridge">-</a> - - DUPLICATEridge - special value for facet->neighbor to indicate a duplicate ridge - - notes: - set by matchneighbor, used by matchmatch and mark_dupridge -*/ -#define qh_DUPLICATEridge ( facetT * ) 1L - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="MERGEridge">-</a> - - MERGEridge flag in facet - special value for facet->neighbor to indicate a merged ridge - - notes: - set by matchneighbor, used by matchmatch and mark_dupridge -*/ -#define qh_MERGEridge ( facetT * ) 2L - - -/*============ -structures- ====================*/ - -/*=========== -macros- =========================*/ - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLfacet_">-</a> - - FORALLfacet_( facetlist ) { ... } - assign 'facet' to each facet in facetlist - - notes: - uses 'facetT *facet;' - assumes last facet is a sentinel - - see: - FORALLfacets -*/ -#define FORALLfacet_( facetlist ) if ( facetlist ) for( facet=( facetlist );facet && facet->next;facet=facet->next ) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLnew_facets">-</a> - - FORALLnew_facets { ... } - assign 'newfacet' to each facet in qh.newfacet_list - - notes: - uses 'facetT *newfacet;' - at exit, newfacet==NULL -*/ -#define FORALLnew_facets for( newfacet=qh newfacet_list;newfacet && newfacet->next;newfacet=newfacet->next ) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLvertex_">-</a> - - FORALLvertex_( vertexlist ) { ... } - assign 'vertex' to each vertex in vertexlist - - notes: - uses 'vertexT *vertex;' - at exit, vertex==NULL -*/ -#define FORALLvertex_( vertexlist ) for ( vertex=( vertexlist );vertex && vertex->next;vertex= vertex->next ) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLvisible_facets">-</a> - - FORALLvisible_facets { ... } - assign 'visible' to each visible facet in qh.visible_list - - notes: - uses 'vacetT *visible;' - at exit, visible==NULL -*/ -#define FORALLvisible_facets for (visible=qh visible_list; visible && visible->visible; visible= visible->next) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLsame_">-</a> - - FORALLsame_( newfacet ) { ... } - assign 'same' to each facet in newfacet->f.samecycle - - notes: - uses 'facetT *same;' - stops when it returns to newfacet -*/ -#define FORALLsame_(newfacet) for (same= newfacet->f.samecycle; same != newfacet; same= same->f.samecycle) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLsame_cycle_">-</a> - - FORALLsame_cycle_( newfacet ) { ... } - assign 'same' to each facet in newfacet->f.samecycle - - notes: - uses 'facetT *same;' - at exit, same == NULL -*/ -#define FORALLsame_cycle_(newfacet) \ - for (same= newfacet->f.samecycle; \ - same; same= (same == newfacet ? NULL : same->f.samecycle)) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHneighborA_">-</a> - - FOREACHneighborA_( facet ) { ... } - assign 'neighborA' to each neighbor in facet->neighbors - - FOREACHneighborA_( vertex ) { ... } - assign 'neighborA' to each neighbor in vertex->neighbors - - declare: - facetT *neighborA, **neighborAp; - - see: - <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHneighborA_(facet) FOREACHsetelement_(facetT, facet->neighbors, neighborA) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHvisible_">-</a> - - FOREACHvisible_( facets ) { ... } - assign 'visible' to each facet in facets - - notes: - uses 'facetT *facet, *facetp;' - see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHvisible_(facets) FOREACHsetelement_(facetT, facets, visible) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHnewfacet_">-</a> - - FOREACHnewfacet_( facets ) { ... } - assign 'newfacet' to each facet in facets - - notes: - uses 'facetT *newfacet, *newfacetp;' - see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHnewfacet_(facets) FOREACHsetelement_(facetT, facets, newfacet) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHvertexA_">-</a> - - FOREACHvertexA_( vertices ) { ... } - assign 'vertexA' to each vertex in vertices - - notes: - uses 'vertexT *vertexA, *vertexAp;' - see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHvertexA_(vertices) FOREACHsetelement_(vertexT, vertices, vertexA) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHvertexreverse12_">-</a> - - FOREACHvertexreverse12_( vertices ) { ... } - assign 'vertex' to each vertex in vertices - reverse order of first two vertices - - notes: - uses 'vertexT *vertex, *vertexp;' - see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHvertexreverse12_(vertices) FOREACHsetelementreverse12_(vertexT, vertices, vertex) - - -/*=============== prototypes poly.c in alphabetical order ================*/ - -void qh_appendfacet(facetT *facet); -void qh_appendvertex(vertexT *vertex); -void qh_attachnewfacets (void); -boolT qh_checkflipped (facetT *facet, realT *dist, boolT allerror); -void qh_delfacet(facetT *facet); -void qh_deletevisible(void /*qh visible_list, qh horizon_list*/); -setT *qh_facetintersect (facetT *facetA, facetT *facetB, int *skipAp,int *skipBp, int extra); -unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *skipelem); -facetT *qh_makenewfacet(setT *vertices, boolT toporient, facetT *facet); -void qh_makenewplanes ( void /* newfacet_list */); -facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew); -facetT *qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew); -void qh_matchneighbor (facetT *newfacet, int newskip, int hashsize, - int *hashcount); -void qh_matchnewfacets (void); -boolT qh_matchvertices (int firstindex, setT *verticesA, int skipA, - setT *verticesB, int *skipB, boolT *same); -facetT *qh_newfacet(void); -ridgeT *qh_newridge(void); -int qh_pointid (pointT *point); -void qh_removefacet(facetT *facet); -void qh_removevertex(vertexT *vertex); -void qh_updatevertices (void); - - -/*========== -prototypes poly2.c in alphabetical order ===========*/ - -void qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash); -void qh_check_bestdist (void); -void qh_check_maxout (void); -void qh_check_output (void); -void qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2); -void qh_check_points(void); -void qh_checkconvex(facetT *facetlist, int fault); -void qh_checkfacet(facetT *facet, boolT newmerge, boolT *waserrorp); -void qh_checkflipped_all (facetT *facetlist); -void qh_checkpolygon(facetT *facetlist); -void qh_checkvertex (vertexT *vertex); -void qh_clearcenters (qh_CENTER type); -void qh_createsimplex(setT *vertices); -void qh_delridge(ridgeT *ridge); -void qh_delvertex (vertexT *vertex); -setT *qh_facet3vertex (facetT *facet); -facetT *qh_findbestfacet (pointT *point, boolT bestoutside, - realT *bestdist, boolT *isoutside); -facetT *qh_findfacet_all (pointT *point, realT *bestdist, boolT *isoutside, - int *numpart); -int qh_findgood (facetT *facetlist, int goodhorizon); -void qh_findgood_all (facetT *facetlist); -void qh_furthestnext (void /* qh facet_list */); -void qh_furthestout (facetT *facet); -void qh_infiniteloop (facetT *facet); -void qh_initbuild(void); -void qh_initialhull(setT *vertices); -setT *qh_initialvertices(int dim, setT *maxpoints, pointT *points, int numpoints); -vertexT *qh_isvertex (pointT *point, setT *vertices); -vertexT *qh_makenewfacets (pointT *point /*horizon_list, visible_list*/); -void qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount); -void qh_nearcoplanar ( void /* qh.facet_list */); -vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp); -int qh_newhashtable(int newsize); -vertexT *qh_newvertex(pointT *point); -ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp); -void qh_outcoplanar (void /* facet_list */); -pointT *qh_point (int id); -void qh_point_add (setT *set, pointT *point, void *elem); -setT *qh_pointfacet (void /*qh facet_list*/); -setT *qh_pointvertex (void /*qh facet_list*/); -void qh_prependfacet(facetT *facet, facetT **facetlist); -void qh_printhashtable(FILE *fp); -void qh_printlists (void); -void qh_resetlists (boolT stats, boolT resetVisible /*qh newvertex_list newfacet_list visible_list*/); -void qh_setvoronoi_all (void); -void qh_triangulate (void /*qh facet_list*/); -void qh_triangulate_facet (facetT *facetA, vertexT **first_vertex); -void qh_triangulate_link (facetT *oldfacetA, facetT *facetA, facetT *oldfacetB, facetT *facetB); -void qh_triangulate_mirror (facetT *facetA, facetT *facetB); -void qh_triangulate_null (facetT *facetA); -void qh_vertexintersect(setT **vertexsetA,setT *vertexsetB); -setT *qh_vertexintersect_new(setT *vertexsetA,setT *vertexsetB); -void qh_vertexneighbors (void /*qh facet_list*/); -boolT qh_vertexsubset(setT *vertexsetA, setT *vertexsetB); - - -#endif /* qhDEFpoly */ diff --git a/extern/qhull/include/qhull/qhull.h b/extern/qhull/include/qhull/qhull.h deleted file mode 100644 index 896ec1e9c18..00000000000 --- a/extern/qhull/include/qhull/qhull.h +++ /dev/null @@ -1,1048 +0,0 @@ -/*<html><pre> -<a href="qh-qhull.htm" - >-------------------------------</a><a name="TOP">-</a> - - qhull.h - user-level header file for using qhull.a library - - see qh-qhull.htm, qhull_a.h - - copyright (c) 1993-2002, The Geometry Center - - NOTE: access to qh_qh is via the 'qh' macro. This allows - qh_qh to be either a pointer or a structure. An example - of using qh is "qh DROPdim" which accesses the DROPdim - field of qh_qh. Similarly, access to qh_qhstat is via - the 'qhstat' macro. - - includes function prototypes for qhull.c, geom.c, global.c, io.c, user.c - - use mem.h for mem.c - use qset.h for qset.c - - see unix.c for an example of using qhull.h - - recompile qhull if you change this file -*/ - -#ifndef qhDEFqhull -#define qhDEFqhull 1 - -/*=========================== -included files ==============*/ - -#include <setjmp.h> -#include <float.h> -#include <time.h> - -#if __MWERKS__ && __POWERPC__ -#include <SIOUX.h> -#include <Files.h> -#include <Desk.h> -#endif - -#ifndef __STDC__ -#ifndef __cplusplus -#if !_MSC_VER -#error Neither __STDC__ nor __cplusplus is defined. Please use strict ANSI C or C++ to compile -#error Qhull. You may need to turn off compiler extensions in your project configuration. If -#error your compiler is a standard C compiler, you can delete this warning from qhull.h -#endif -#endif -#endif - -#include "user.h" /* user defineable constants */ - -/*============ constants and basic types ====================*/ - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="qh_VERSION">-</a> - - qh_VERSION - version string by year and date - - the revision increases on code changes only - - notes: - change date: Changes.txt, Announce.txt, README.txt, qhull.man - qhull-news.html, Eudora signatures, - change version: README.txt, qhull.html, file_id.diz, Makefile - change year: Copying.txt - check download size - recompile user_eg.c, rbox.c, qhull.c, qconvex.c, qdelaun.c qvoronoi.c, qhalf.c - make copy of qhull-news.html as qh-news.htm -*/ - -#define qh_VERSION "2002.1 2002/8/20" - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="coordT">-</a> - - coordT - coordinates and coefficients are stored as realT (i.e., double) - - notes: - could use 'float' for data and 'double' for calculations (realT vs. coordT) - This requires many type casts, and adjusted error bounds. - Also C compilers may do expressions in double anyway. -*/ -#define coordT realT - -/*-<a href="qh-geom.htm#TOC" - >--------------------------------</a><a name="pointT">-</a> - - pointT - a point is an array of DIM3 coordinates -*/ -#define pointT coordT - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="flagT">-</a> - - flagT - Boolean flag as a bit -*/ -#define flagT unsigned int - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="boolT">-</a> - - boolT - boolean value, either True or False - - notes: - needed for portability -*/ -#define boolT unsigned int -#ifdef False -#undef False -#endif -#ifdef True -#undef True -#endif -#define False 0 -#define True 1 - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="CENTERtype">-</a> - - qh_CENTER - to distinguish facet->center -*/ -typedef enum -{ - qh_ASnone = 0, qh_ASvoronoi, qh_AScentrum -} -qh_CENTER; - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="qh_PRINT">-</a> - - qh_PRINT - output formats for printing (qh.PRINTout). - 'Fa' 'FV' 'Fc' 'FC' - - - notes: - some of these names are similar to qh names. The similar names are only - used in switch statements in qh_printbegin() etc. -*/ -typedef enum {qh_PRINTnone= 0, - qh_PRINTarea, qh_PRINTaverage, /* 'Fa' 'FV' 'Fc' 'FC' */ - qh_PRINTcoplanars, qh_PRINTcentrums, - qh_PRINTfacets, qh_PRINTfacets_xridge, /* 'f' 'FF' 'G' 'FI' 'Fi' 'Fn' */ - qh_PRINTgeom, qh_PRINTids, qh_PRINTinner, qh_PRINTneighbors, - qh_PRINTnormals, qh_PRINTouter, /* 'n' 'Fo' 'i' 'm' 'Fm' 'o' */ - qh_PRINTincidences, qh_PRINTmathematica, qh_PRINTmerges, qh_PRINToff, - qh_PRINToptions, qh_PRINTpointintersect, /* 'FO' 'Fp' 'FP' 'p' 'FQ' 'FS' */ - qh_PRINTpointnearest, qh_PRINTpoints, qh_PRINTqhull, qh_PRINTsize, - qh_PRINTsummary, qh_PRINTtriangles, /* 'Fs' 'Ft' 'Fv' 'FN' 'Fx' */ - qh_PRINTvertices, qh_PRINTvneighbors, qh_PRINTextremes, - qh_PRINTEND} qh_PRINT; - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="qh_ALL">-</a> - - qh_ALL - argument flag for selecting everything -*/ -#define qh_ALL True -#define qh_NOupper True /* argument for qh_findbest */ -#define qh_IScheckmax True /* argument for qh_findbesthorizon */ -#define qh_ISnewfacets True /* argument for qh_findbest */ -#define qh_RESETvisible True /* argument for qh_resetlists */ - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="qh_ERR">-</a> - - qh_ERR - Qhull exit codes, for indicating errors -*/ -#define qh_ERRnone 0 /* no error occurred during qhull */ -#define qh_ERRinput 1 /* input inconsistency */ -#define qh_ERRsingular 2 /* singular input data */ -#define qh_ERRprec 3 /* precision error */ -#define qh_ERRmem 4 /* insufficient memory, matches mem.h */ -#define qh_ERRqhull 5 /* internal error detected, matches mem.h */ - -/* ============ -structures- ==================== - each of the following structures is defined by a typedef - all realT and coordT fields occur at the beginning of a structure - (otherwise space may be wasted due to alignment) - define all flags together and pack into 32-bit number -*/ - -typedef struct vertexT vertexT; -typedef struct ridgeT ridgeT; -typedef struct facetT facetT; -#ifndef DEFsetT -#define DEFsetT 1 -typedef struct setT setT; /* defined in qset.h */ -#endif - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="facetT">-</a> - - facetT - defines a facet - - notes: - qhull() generates the hull as a list of facets. - - topological information: - f.previous,next doubly-linked list of facets - f.vertices set of vertices - f.ridges set of ridges - f.neighbors set of neighbors - f.toporient True if facet has top-orientation (else bottom) - - geometric information: - f.offset,normal hyperplane equation - f.maxoutside offset to outer plane -- all points inside - f.center centrum for testing convexity - f.simplicial True if facet is simplicial - f.flipped True if facet does not include qh.interior_point - - for constructing hull: - f.visible True if facet on list of visible facets (will be deleted) - f.newfacet True if facet on list of newly created facets - f.coplanarset set of points coplanar with this facet - (includes near-inside points for later testing) - f.outsideset set of points outside of this facet - f.furthestdist distance to furthest point of outside set - f.visitid marks visited facets during a loop - f.replace replacement facet for to-be-deleted, visible facets - f.samecycle,newcycle cycle of facets for merging into horizon facet - - see below for other flags and fields -*/ -struct facetT { -#if !qh_COMPUTEfurthest - coordT furthestdist;/* distance to furthest point of outsideset */ -#endif -#if qh_MAXoutside - coordT maxoutside; /* max computed distance of point to facet - Before QHULLfinished this is an approximation - since maxdist not always set for mergefacet - Actual outer plane is +DISTround and - computed outer plane is +2*DISTround */ -#endif - coordT offset; /* exact offset of hyperplane from origin */ - coordT *normal; /* normal of hyperplane, hull_dim coefficients */ - /* if tricoplanar, shared with a neighbor */ - union { /* in order of testing */ - realT area; /* area of facet, only in io.c if ->isarea */ - facetT *replace; /* replacement facet if ->visible and NEWfacets - is NULL only if qh_mergedegen_redundant or interior */ - facetT *samecycle; /* cycle of facets from the same visible/horizon intersection, - if ->newfacet */ - facetT *newcycle; /* in horizon facet, current samecycle of new facets */ - facetT *trivisible; /* visible facet for ->tricoplanar facets during qh_triangulate() */ - facetT *triowner; /* owner facet for ->tricoplanar, !isarea facets w/ ->keepcentrum */ - }f; - coordT *center; /* centrum for convexity, qh CENTERtype == qh_AScentrum */ - /* Voronoi center, qh CENTERtype == qh_ASvoronoi */ - /* if tricoplanar, shared with a neighbor */ - facetT *previous; /* previous facet in the facet_list */ - facetT *next; /* next facet in the facet_list */ - setT *vertices; /* vertices for this facet, inverse sorted by ID - if simplicial, 1st vertex was apex/furthest */ - setT *ridges; /* explicit ridges for nonsimplicial facets. - for simplicial facets, neighbors defines ridge */ - setT *neighbors; /* neighbors of the facet. If simplicial, the kth - neighbor is opposite the kth vertex, and the first - neighbor is the horizon facet for the first vertex*/ - setT *outsideset; /* set of points outside this facet - if non-empty, last point is furthest - if NARROWhull, includes coplanars for partitioning*/ - setT *coplanarset; /* set of points coplanar with this facet - > qh.min_vertex and <= facet->max_outside - a point is assigned to the furthest facet - if non-empty, last point is furthest away */ - unsigned visitid; /* visit_id, for visiting all neighbors, - all uses are independent */ - unsigned id; /* unique identifier from qh facet_id */ - unsigned nummerge:9; /* number of merges */ -#define qh_MAXnummerge 511 /* 2^9-1, 32 flags total, see "flags:" in io.c */ - flagT tricoplanar:1; /* True if TRIangulate and simplicial and coplanar with a neighbor */ - /* all tricoplanars share the same ->center, ->normal, ->offset, ->maxoutside */ - /* all tricoplanars share the same apex */ - /* if ->degenerate, does not span facet (one logical ridge) */ - /* one tricoplanar has ->keepcentrum and ->coplanarset */ - /* during qh_triangulate, f.trivisible points to original facet */ - flagT newfacet:1; /* True if facet on qh newfacet_list (new or merged) */ - flagT visible:1; /* True if visible facet (will be deleted) */ - flagT toporient:1; /* True if created with top orientation - after merging, use ridge orientation */ - flagT simplicial:1;/* True if simplicial facet, ->ridges may be implicit */ - flagT seen:1; /* used to perform operations only once, like visitid */ - flagT seen2:1; /* used to perform operations only once, like visitid */ - flagT flipped:1; /* True if facet is flipped */ - flagT upperdelaunay:1; /* True if facet is upper envelope of Delaunay triangulation */ - flagT notfurthest:1; /* True if last point of outsideset is not furthest*/ - -/*-------- flags primarily for output ---------*/ - flagT good:1; /* True if a facet marked good for output */ - flagT isarea:1; /* True if facet->f.area is defined */ - -/*-------- flags for merging ------------------*/ - flagT dupridge:1; /* True if duplicate ridge in facet */ - flagT mergeridge:1; /* True if facet or neighbor contains a qh_MERGEridge - ->normal defined (also defined for mergeridge2) */ - flagT mergeridge2:1; /* True if neighbor contains a qh_MERGEridge (mark_dupridges */ - flagT coplanar:1; /* True if horizon facet is coplanar at last use */ - flagT mergehorizon:1; /* True if will merge into horizon (->coplanar) */ - flagT cycledone:1;/* True if mergecycle_all already done */ - flagT tested:1; /* True if facet convexity has been tested (false after merge */ - flagT keepcentrum:1; /* True if keep old centrum after a merge, or marks owner for ->tricoplanar */ - flagT newmerge:1; /* True if facet is newly merged for reducevertices */ - flagT degenerate:1; /* True if facet is degenerate (degen_mergeset or ->tricoplanar) */ - flagT redundant:1; /* True if facet is redundant (degen_mergeset) */ -}; - - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="ridgeT">-</a> - - ridgeT - defines a ridge - - notes: - a ridge is DIM3-1 simplex between two neighboring facets. If the - facets are non-simplicial, there may be more than one ridge between - two facets. E.G. a 4-d hypercube has two triangles between each pair - of neighboring facets. - - topological information: - vertices a set of vertices - top,bottom neighboring facets with orientation - - geometric information: - tested True if ridge is clearly convex - nonconvex True if ridge is non-convex -*/ -struct ridgeT { - setT *vertices; /* vertices belonging to this ridge, inverse sorted by ID - NULL if a degen ridge (matchsame) */ - facetT *top; /* top facet this ridge is part of */ - facetT *bottom; /* bottom facet this ridge is part of */ - unsigned id:24; /* unique identifier, =>room for 8 flags */ - flagT seen:1; /* used to perform operations only once */ - flagT tested:1; /* True when ridge is tested for convexity */ - flagT nonconvex:1; /* True if getmergeset detected a non-convex neighbor - only one ridge between neighbors may have nonconvex */ -}; - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="vertexT">-</a> - - vertexT - defines a vertex - - topological information: - next,previous doubly-linked list of all vertices - neighbors set of adjacent facets (only if qh.VERTEXneighbors) - - geometric information: - point array of DIM3 coordinates -*/ -struct vertexT { - vertexT *next; /* next vertex in vertex_list */ - vertexT *previous; /* previous vertex in vertex_list */ - pointT *point; /* hull_dim coordinates (coordT) */ - setT *neighbors; /* neighboring facets of vertex, qh_vertexneighbors() - inits in io.c or after first merge */ - unsigned visitid; /* for use with qh vertex_visit */ - unsigned id:24; /* unique identifier, =>room for 8 flags */ - flagT seen:1; /* used to perform operations only once */ - flagT seen2:1; /* another seen flag */ - flagT delridge:1; /* vertex was part of a deleted ridge */ - flagT deleted:1; /* true if vertex on qh del_vertices */ - flagT newlist:1; /* true if vertex on qh newvertex_list */ -}; - -/*======= -global variables -qh ============================*/ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh">-</a> - - qh - all global variables for qhull are in qh, qhmem, and qhstat - - notes: - qhmem is defined in mem.h and qhstat is defined in stat.h - access to qh_qh is via the "qh" macro. See qh_QHpointer in user.h -*/ -typedef struct qhT qhT; -#if qh_QHpointer -#define qh qh_qh-> -extern qhT *qh_qh; /* allocated in global.c */ -#else -#define qh qh_qh. -extern qhT qh_qh; -#endif - -struct qhT { - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-const">-</a> - - qh constants - configuration flags and constants for Qhull - - notes: - The user configures Qhull by defining flags. They are - copied into qh by qh_setflags(). qh-quick.htm#options defines the flags. -*/ - boolT ALLpoints; /* true 'Qs' if search all points for initial simplex */ - boolT ANGLEmerge; /* true 'Qa' if sort potential merges by angle */ - boolT APPROXhull; /* true 'Wn' if MINoutside set */ - realT MINoutside; /* 'Wn' min. distance for an outside point */ - boolT ATinfinity; /* true 'Qz' if point num_points-1 is "at-infinity" - for improving precision in Delaunay triangulations */ - boolT AVOIDold; /* true 'Q4' if avoid old->new merges */ - boolT BESToutside; /* true 'Qf' if partition points into best outsideset */ - boolT CDDinput; /* true 'Pc' if input uses CDD format (1.0/offset first) */ - boolT CDDoutput; /* true 'PC' if print normals in CDD format (offset first) */ - boolT CHECKfrequently; /* true 'Tc' if checking frequently */ - realT premerge_cos; /* 'A-n' cos_max when pre merging */ - realT postmerge_cos; /* 'An' cos_max when post merging */ - boolT DELAUNAY; /* true 'd' if computing DELAUNAY triangulation */ - boolT DOintersections; /* true 'Gh' if print hyperplane intersections */ - int DROPdim; /* drops dim 'GDn' for 4-d -> 3-d output */ - boolT FORCEoutput; /* true 'Po' if forcing output despite degeneracies */ - int GOODpoint; /* 1+n for 'QGn', good facet if visible/not(-) from point n*/ - pointT *GOODpointp; /* the actual point */ - boolT GOODthreshold; /* true if qh lower_threshold/upper_threshold defined - false if qh SPLITthreshold */ - int GOODvertex; /* 1+n, good facet if vertex for point n */ - pointT *GOODvertexp; /* the actual point */ - boolT HALFspace; /* true 'Hn,n,n' if halfspace intersection */ - int IStracing; /* trace execution, 0=none, 1=least, 4=most, -1=events */ - int KEEParea; /* 'PAn' number of largest facets to keep */ - boolT KEEPcoplanar; /* true 'Qc' if keeping nearest facet for coplanar points */ - boolT KEEPinside; /* true 'Qi' if keeping nearest facet for inside points - set automatically if 'd Qc' */ - int KEEPmerge; /* 'PMn' number of facets to keep with most merges */ - realT KEEPminArea; /* 'PFn' minimum facet area to keep */ - realT MAXcoplanar; /* 'Un' max distance below a facet to be coplanar*/ - boolT MERGEexact; /* true 'Qx' if exact merges (coplanar, degen, dupridge, flipped) */ - boolT MERGEindependent; /* true 'Q2' if merging independent sets */ - boolT MERGING; /* true if exact-, pre- or post-merging, with angle and centrum tests */ - realT premerge_centrum; /* 'C-n' centrum_radius when pre merging. Default is round-off */ - realT postmerge_centrum; /* 'Cn' centrum_radius when post merging. Default is round-off */ - boolT MERGEvertices; /* true 'Q3' if merging redundant vertices */ - realT MINvisible; /* 'Vn' min. distance for a facet to be visible */ - boolT NOnarrow; /* true 'Q10' if no special processing for narrow distributions */ - boolT NOnearinside; /* true 'Q8' if ignore near-inside points when partitioning */ - boolT NOpremerge; /* true 'Q0' if no defaults for C-0 or Qx */ - boolT ONLYgood; /* true 'Qg' if process points with good visible or horizon facets */ - boolT ONLYmax; /* true 'Qm' if only process points that increase max_outside */ - boolT PICKfurthest; /* true 'Q9' if process furthest of furthest points*/ - boolT POSTmerge; /* true if merging after buildhull (Cn or An) */ - boolT PREmerge; /* true if merging during buildhull (C-n or A-n) */ - /* NOTE: some of these names are similar to qh_PRINT names */ - boolT PRINTcentrums; /* true 'Gc' if printing centrums */ - boolT PRINTcoplanar; /* true 'Gp' if printing coplanar points */ - int PRINTdim; /* print dimension for Geomview output */ - boolT PRINTdots; /* true 'Ga' if printing all points as dots */ - boolT PRINTgood; /* true 'Pg' if printing good facets */ - boolT PRINTinner; /* true 'Gi' if printing inner planes */ - boolT PRINTneighbors; /* true 'PG' if printing neighbors of good facets */ - boolT PRINTnoplanes; /* true 'Gn' if printing no planes */ - boolT PRINToptions1st; /* true 'FO' if printing options to stderr */ - boolT PRINTouter; /* true 'Go' if printing outer planes */ - boolT PRINTprecision; /* false 'Pp' if not reporting precision problems */ - qh_PRINT PRINTout[qh_PRINTEND]; /* list of output formats to print */ - boolT PRINTridges; /* true 'Gr' if print ridges */ - boolT PRINTspheres; /* true 'Gv' if print vertices as spheres */ - boolT PRINTstatistics; /* true 'Ts' if printing statistics to stderr */ - boolT PRINTsummary; /* true 's' if printing summary to stderr */ - boolT PRINTtransparent; /* true 'Gt' if print transparent outer ridges */ - boolT PROJECTdelaunay; /* true if DELAUNAY, no readpoints() and - need projectinput() for Delaunay in qh_init_B */ - int PROJECTinput; /* number of projected dimensions 'bn:0Bn:0' */ - boolT QUICKhelp; /* true if quick help message for degen input */ - boolT RANDOMdist; /* true if randomly change distplane and setfacetplane */ - realT RANDOMfactor; /* maximum random perturbation */ - realT RANDOMa; /* qh_randomfactor is randr * RANDOMa + RANDOMb */ - realT RANDOMb; - boolT RANDOMoutside; /* true if select a random outside point */ - int REPORTfreq; /* buildtracing reports every n facets */ - int REPORTfreq2; /* tracemerging reports every REPORTfreq/2 facets */ - int RERUN; /* 'TRn' rerun qhull n times (qh.build_cnt) */ - int ROTATErandom; /* 'QRn' seed, 0 time, >= rotate input */ - boolT SCALEinput; /* true 'Qbk' if scaling input */ - boolT SCALElast; /* true 'Qbb' if scale last coord to max prev coord */ - boolT SETroundoff; /* true 'E' if qh DISTround is predefined */ - boolT SKIPcheckmax; /* true 'Q5' if skip qh_check_maxout */ - boolT SKIPconvex; /* true 'Q6' if skip convexity testing during pre-merge */ - boolT SPLITthresholds; /* true if upper_/lower_threshold defines a region - used only for printing (not for qh ONLYgood) */ - int STOPcone; /* 'TCn' 1+n for stopping after cone for point n*/ - /* also used by qh_build_withresart for err exit*/ - int STOPpoint; /* 'TVn' 'TV-n' 1+n for stopping after/before(-) - adding point n */ - int TESTpoints; /* 'QTn' num of test points after qh.num_points. Test points always coplanar. */ - boolT TESTvneighbors; /* true 'Qv' if test vertex neighbors at end */ - int TRACElevel; /* 'Tn' conditional IStracing level */ - int TRACElastrun; /* qh.TRACElevel applies to last qh.RERUN */ - int TRACEpoint; /* 'TPn' start tracing when point n is a vertex */ - realT TRACEdist; /* 'TWn' start tracing when merge distance too big */ - int TRACEmerge; /* 'TMn' start tracing before this merge */ - boolT TRIangulate; /* true 'Qt' if triangulate non-simplicial facets */ - boolT TRInormals; /* true 'Q11' if triangulate duplicates normals (sets Qt) */ - boolT UPPERdelaunay; /* true 'Qu' if computing furthest-site Delaunay */ - boolT VERIFYoutput; /* true 'Tv' if verify output at end of qhull */ - boolT VIRTUALmemory; /* true 'Q7' if depth-first processing in buildhull */ - boolT VORONOI; /* true 'v' if computing Voronoi diagram */ - - /*--------input constants ---------*/ - realT AREAfactor; /* 1/(hull_dim-1)! for converting det's to area */ - boolT DOcheckmax; /* true if calling qh_check_maxout (qh_initqhull_globals) */ - char *feasible_string; /* feasible point 'Hn,n,n' for halfspace intersection */ - coordT *feasible_point; /* as coordinates, both malloc'd */ - boolT GETarea; /* true 'Fa', 'FA', 'FS', 'PAn', 'PFn' if compute facet area/Voronoi volume in io.c */ - boolT KEEPnearinside; /* true if near-inside points in coplanarset */ - int hull_dim; /* dimension of hull, set by initbuffers */ - int input_dim; /* dimension of input, set by initbuffers */ - int num_points; /* number of input points */ - pointT *first_point; /* array of input points, see POINTSmalloc */ - boolT POINTSmalloc; /* true if qh first_point/num_points allocated */ - pointT *input_points; /* copy of original qh.first_point for input points for qh_joggleinput */ - boolT input_malloc; /* true if qh input_points malloc'd */ - char qhull_command[256];/* command line that invoked this program */ - char rbox_command[256]; /* command line that produced the input points */ - char qhull_options[512];/* descriptive list of options */ - int qhull_optionlen; /* length of last line */ - int qhull_optionsiz; /* size of qhull_options before qh_initbuild */ - boolT VERTEXneighbors; /* true if maintaining vertex neighbors */ - boolT ZEROcentrum; /* true if 'C-0' or 'C-0 Qx'. sets ZEROall_ok */ - realT *upper_threshold; /* don't print if facet->normal[k]>=upper_threshold[k] - must set either GOODthreshold or SPLITthreshold - if Delaunay, default is 0.0 for upper envelope */ - realT *lower_threshold; /* don't print if facet->normal[k] <=lower_threshold[k] */ - realT *upper_bound; /* scale point[k] to new upper bound */ - realT *lower_bound; /* scale point[k] to new lower bound - project if both upper_ and lower_bound == 0 */ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-prec">-</a> - - qh precision constants - precision constants for Qhull - - notes: - qh_detroundoff() computes the maximum roundoff error for distance - and other computations. It also sets default values for the - qh constants above. -*/ - realT ANGLEround; /* max round off error for angles */ - realT centrum_radius; /* max centrum radius for convexity (roundoff added) */ - realT cos_max; /* max cosine for convexity (roundoff added) */ - realT DISTround; /* max round off error for distances, 'E' overrides */ - realT MAXabs_coord; /* max absolute coordinate */ - realT MAXlastcoord; /* max last coordinate for qh_scalelast */ - realT MAXsumcoord; /* max sum of coordinates */ - realT MAXwidth; /* max rectilinear width of point coordinates */ - realT MINdenom_1; /* min. abs. value for 1/x */ - realT MINdenom; /* use divzero if denominator < MINdenom */ - realT MINdenom_1_2; /* min. abs. val for 1/x that allows normalization */ - realT MINdenom_2; /* use divzero if denominator < MINdenom_2 */ - realT MINlastcoord; /* min. last coordinate for qh_scalelast */ - boolT NARROWhull; /* set in qh_initialhull if angle < qh_MAXnarrow */ - realT *NEARzero; /* hull_dim array for near zero in gausselim */ - realT NEARinside; /* keep points for qh_check_maxout if close to facet */ - realT ONEmerge; /* max distance for merging simplicial facets */ - realT outside_err; /* application's epsilon for coplanar points - qh_check_bestdist() qh_check_points() reports error if point outside */ - realT WIDEfacet; /* size of wide facet for skipping ridge in - area computation and locking centrum */ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-intern">-</a> - - qh internal constants - internal constants for Qhull -*/ - char qhull[sizeof("qhull")]; /* for checking ownership */ - void *old_stat; /* pointer to saved qh_qhstat, qh_save_qhull */ - jmp_buf errexit; /* exit label for qh_errexit, defined by setjmp() */ - char jmpXtra[40]; /* extra bytes in case jmp_buf is defined wrong by compiler */ - jmp_buf restartexit; /* restart label for qh_errexit, defined by setjmp() */ - char jmpXtra2[40]; /* extra bytes in case jmp_buf is defined wrong by compiler*/ - FILE *fin; /* pointer to input file, init by qh_meminit */ - FILE *fout; /* pointer to output file */ - FILE *ferr; /* pointer to error file */ - pointT *interior_point; /* center point of the initial simplex*/ - int normal_size; /* size in bytes for facet normals and point coords*/ - int center_size; /* size in bytes for Voronoi centers */ - int TEMPsize; /* size for small, temporary sets (in quick mem) */ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-lists">-</a> - - qh facet and vertex lists - defines lists of facets, new facets, visible facets, vertices, and - new vertices. Includes counts, next ids, and trace ids. - see: - qh_resetlists() -*/ - facetT *facet_list; /* first facet */ - facetT *facet_tail; /* end of facet_list (dummy facet) */ - facetT *facet_next; /* next facet for buildhull() - previous facets do not have outside sets - NARROWhull: previous facets may have coplanar outside sets for qh_outcoplanar */ - facetT *newfacet_list; /* list of new facets to end of facet_list */ - facetT *visible_list; /* list of visible facets preceeding newfacet_list, - facet->visible set */ - int num_visible; /* current number of visible facets */ - unsigned tracefacet_id; /* set at init, then can print whenever */ - facetT *tracefacet; /* set in newfacet/mergefacet, undone in delfacet*/ - unsigned tracevertex_id; /* set at buildtracing, can print whenever */ - vertexT *tracevertex; /* set in newvertex, undone in delvertex*/ - vertexT *vertex_list; /* list of all vertices, to vertex_tail */ - vertexT *vertex_tail; /* end of vertex_list (dummy vertex) */ - vertexT *newvertex_list; /* list of vertices in newfacet_list, to vertex_tail - all vertices have 'newlist' set */ - int num_facets; /* number of facets in facet_list - includes visble faces (num_visible) */ - int num_vertices; /* number of vertices in facet_list */ - int num_outside; /* number of points in outsidesets (for tracing and RANDOMoutside) - includes coplanar outsideset points for NARROWhull/qh_outcoplanar() */ - int num_good; /* number of good facets (after findgood_all) */ - unsigned facet_id; /* ID of next, new facet from newfacet() */ - unsigned ridge_id; /* ID of next, new ridge from newridge() */ - unsigned vertex_id; /* ID of next, new vertex from newvertex() */ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-var">-</a> - - qh global variables - defines minimum and maximum distances, next visit ids, several flags, - and other global variables. - initialize in qh_initbuild or qh_maxmin if used in qh_buildhull -*/ - unsigned long hulltime; /* ignore time to set up input and randomize */ - /* use unsigned to avoid wrap-around errors */ - boolT ALLOWrestart; /* true if qh_precision can use qh.restartexit */ - int build_cnt; /* number of calls to qh_initbuild */ - qh_CENTER CENTERtype; /* current type of facet->center, qh_CENTER */ - int furthest_id; /* pointid of furthest point, for tracing */ - facetT *GOODclosest; /* closest facet to GOODthreshold in qh_findgood */ - realT JOGGLEmax; /* set 'QJn' if randomly joggle input */ - boolT maxoutdone; /* set qh_check_maxout(), cleared by qh_addpoint() */ - realT max_outside; /* maximum distance from a point to a facet, - before roundoff, not simplicial vertices - actual outer plane is +DISTround and - computed outer plane is +2*DISTround */ - realT max_vertex; /* maximum distance (>0) from vertex to a facet, - before roundoff, due to a merge */ - realT min_vertex; /* minimum distance (<0) from vertex to a facet, - before roundoff, due to a merge - if qh.JOGGLEmax, qh_makenewplanes sets it - recomputed if qh.DOcheckmax, default -qh.DISTround */ - boolT NEWfacets; /* true while visible facets invalid due to new or merge - from makecone/attachnewfacets to deletevisible */ - boolT findbestnew; /* true if partitioning calls qh_findbestnew */ - boolT findbest_notsharp; /* true if new facets are at least 90 degrees */ - boolT NOerrexit; /* true if qh.errexit is not available */ - realT PRINTcradius; /* radius for printing centrums */ - realT PRINTradius; /* radius for printing vertex spheres and points */ - boolT POSTmerging; /* true when post merging */ - int printoutvar; /* temporary variable for qh_printbegin, etc. */ - int printoutnum; /* number of facets printed */ - boolT QHULLfinished; /* True after qhull() is finished */ - realT totarea; /* 'FA': total facet area computed by qh_getarea */ - realT totvol; /* 'FA': total volume computed by qh_getarea */ - unsigned int visit_id; /* unique ID for searching neighborhoods, */ - unsigned int vertex_visit; /* unique ID for searching vertices */ - boolT ZEROall_ok; /* True if qh_checkzero always succeeds */ - boolT WAScoplanar; /* True if qh_partitioncoplanar (qh_check_maxout) */ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-set">-</a> - - qh global sets - defines sets for merging, initial simplex, hashing, extra input points, - and deleted vertices -*/ - setT *facet_mergeset; /* temporary set of merges to be done */ - setT *degen_mergeset; /* temporary set of degenerate and redundant merges */ - setT *hash_table; /* hash table for matching ridges in qh_matchfacets - size is setsize() */ - setT *other_points; /* additional points (first is qh interior_point) */ - setT *del_vertices; /* vertices to partition and delete with visible - facets. Have deleted set for checkfacet */ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-buf">-</a> - - qh global buffers - defines buffers for maxtrix operations, input, and error messages -*/ - coordT *gm_matrix; /* (dim+1)Xdim matrix for geom.c */ - coordT **gm_row; /* array of gm_matrix rows */ - char* line; /* malloc'd input line of maxline+1 chars */ - int maxline; - coordT *half_space; /* malloc'd input array for halfspace (qh normal_size+coordT) */ - coordT *temp_malloc; /* malloc'd input array for points */ - -/*-<a href="qh-globa.htm#TOC" - >--------------------------------</a><a name="qh-static">-</a> - - qh static variables - defines static variables for individual functions - - notes: - do not use 'static' within a function. Multiple instances of qhull - may exist. - - do not assume zero initialization, 'QPn' may cause a restart -*/ - boolT ERREXITcalled; /* true during errexit (prevents duplicate calls */ - boolT firstcentrum; /* for qh_printcentrum */ - realT last_low; /* qh_scalelast parameters for qh_setdelaunay */ - realT last_high; - realT last_newhigh; - unsigned lastreport; /* for qh_buildtracing */ - int mergereport; /* for qh_tracemerging */ - boolT old_randomdist; /* save RANDOMdist when io, tracing, or statistics */ - int ridgeoutnum; /* number of ridges in 4OFF output */ - void *old_qhstat; /* for saving qh_qhstat in save_qhull() */ - setT *old_tempstack; /* for saving qhmem.tempstack in save_qhull */ - setT *coplanarset; /* set of coplanar facets for searching qh_findbesthorizon() */ -}; - -/*=========== -macros- =========================*/ - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="otherfacet_">-</a> - - otherfacet_(ridge, facet) - return neighboring facet for a ridge in facet -*/ -#define otherfacet_(ridge, facet) \ - (((ridge)->top == (facet)) ? (ridge)->bottom : (ridge)->top) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="getid_">-</a> - - getid_(p) - return ID for facet, ridge, or vertex - return MAXINT if NULL (-1 causes type conversion error ) -*/ -#define getid_(p) ((p) ? (p)->id : -1) - -/*============== FORALL macros ===================*/ - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLfacets">-</a> - - FORALLfacets { ... } - assign 'facet' to each facet in qh.facet_list - - notes: - uses 'facetT *facet;' - assumes last facet is a sentinel - - see: - FORALLfacet_( facetlist ) -*/ -#define FORALLfacets for (facet=qh facet_list;facet && facet->next;facet=facet->next) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLpoints">-</a> - - FORALLpoints { ... } - assign 'point' to each point in qh.first_point, qh.num_points - - declare: - coordT *point, *pointtemp; -*/ -#define FORALLpoints FORALLpoint_(qh first_point, qh num_points) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLpoint_">-</a> - - FORALLpoint_( points, num) { ... } - assign 'point' to each point in points array of num points - - declare: - coordT *point, *pointtemp; -*/ -#define FORALLpoint_(points, num) for(point= (points), \ - pointtemp= (points)+qh hull_dim*(num); point < pointtemp; point += qh hull_dim) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FORALLvertices">-</a> - - FORALLvertices { ... } - assign 'vertex' to each vertex in qh.vertex_list - - declare: - vertexT *vertex; - - notes: - assumes qh.vertex_list terminated with a sentinel -*/ -#define FORALLvertices for (vertex=qh vertex_list;vertex && vertex->next;vertex= vertex->next) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHfacet_">-</a> - - FOREACHfacet_( facets ) { ... } - assign 'facet' to each facet in facets - - declare: - facetT *facet, **facetp; - - see: - <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHfacet_(facets) FOREACHsetelement_(facetT, facets, facet) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHneighbor_">-</a> - - FOREACHneighbor_( facet ) { ... } - assign 'neighbor' to each neighbor in facet->neighbors - - FOREACHneighbor_( vertex ) { ... } - assign 'neighbor' to each neighbor in vertex->neighbors - - declare: - facetT *neighbor, **neighborp; - - see: - <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHneighbor_(facet) FOREACHsetelement_(facetT, facet->neighbors, neighbor) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHpoint_">-</a> - - FOREACHpoint_( points ) { ... } - assign 'point' to each point in points set - - declare: - pointT *point, **pointp; - - see: - <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHpoint_(points) FOREACHsetelement_(pointT, points, point) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHridge_">-</a> - - FOREACHridge_( ridges ) { ... } - assign 'ridge' to each ridge in ridges set - - declare: - ridgeT *ridge, **ridgep; - - see: - <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHridge_(ridges) FOREACHsetelement_(ridgeT, ridges, ridge) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHvertex_">-</a> - - FOREACHvertex_( vertices ) { ... } - assign 'vertex' to each vertex in vertices set - - declare: - vertexT *vertex, **vertexp; - - see: - <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a> -*/ -#define FOREACHvertex_(vertices) FOREACHsetelement_(vertexT, vertices,vertex) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHfacet_i_">-</a> - - FOREACHfacet_i_( facets ) { ... } - assign 'facet' and 'facet_i' for each facet in facets set - - declare: - facetT *facet; - int facet_n, facet_i; - - see: - <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a> -*/ -#define FOREACHfacet_i_(facets) FOREACHsetelement_i_(facetT, facets, facet) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHneighbor_i_">-</a> - - FOREACHneighbor_i_( facet ) { ... } - assign 'neighbor' and 'neighbor_i' for each neighbor in facet->neighbors - - FOREACHneighbor_i_( vertex ) { ... } - assign 'neighbor' and 'neighbor_i' for each neighbor in vertex->neighbors - - declare: - facetT *neighbor; - int neighbor_n, neighbor_i; - - see: - <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a> -*/ -#define FOREACHneighbor_i_(facet) FOREACHsetelement_i_(facetT, facet->neighbors, neighbor) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHpoint_i_">-</a> - - FOREACHpoint_i_( points ) { ... } - assign 'point' and 'point_i' for each point in points set - - declare: - pointT *point; - int point_n, point_i; - - see: - <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a> -*/ -#define FOREACHpoint_i_(points) FOREACHsetelement_i_(pointT, points, point) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHridge_i_">-</a> - - FOREACHridge_i_( ridges ) { ... } - assign 'ridge' and 'ridge_i' for each ridge in ridges set - - declare: - ridgeT *ridge; - int ridge_n, ridge_i; - - see: - <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a> -*/ -#define FOREACHridge_i_(ridges) FOREACHsetelement_i_(ridgeT, ridges, ridge) - -/*-<a href="qh-poly.htm#TOC" - >--------------------------------</a><a name="FOREACHvertex_i_">-</a> - - FOREACHvertex_i_( vertices ) { ... } - assign 'vertex' and 'vertex_i' for each vertex in vertices set - - declare: - vertexT *vertex; - int vertex_n, vertex_i; - - see: - <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a> - */ -#define FOREACHvertex_i_(vertices) FOREACHsetelement_i_(vertexT, vertices,vertex) - -/********* -qhull.c prototypes (duplicated from qhull_a.h) **********************/ - -void qh_qhull (void); -boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist); -void qh_printsummary(FILE *fp); - -/********* -user.c prototypes (alphabetical) **********************/ - -void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge); -void qh_errprint(char* string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex); -int qh_new_qhull (int dim, int numpoints, coordT *points, boolT ismalloc, - char *qhull_cmd, FILE *outfile, FILE *errfile); -void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall); -void qh_user_memsizes (void); - -/***** -geom.c/geom2.c prototypes (duplicated from geom.h) ****************/ - -facetT *qh_findbest (pointT *point, facetT *startfacet, - boolT bestoutside, boolT newfacets, boolT noupper, - realT *dist, boolT *isoutside, int *numpart); -facetT *qh_findbestnew (pointT *point, facetT *startfacet, - realT *dist, boolT bestoutside, boolT *isoutside, int *numpart); -boolT qh_gram_schmidt(int dim, realT **rows); -void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane); -void qh_printsummary(FILE *fp); -void qh_projectinput (void); -void qh_randommatrix (realT *buffer, int dim, realT **row); -void qh_rotateinput (realT **rows); -void qh_scaleinput (void); -void qh_setdelaunay (int dim, int count, pointT *points); -coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible); - -/***** -global.c prototypes (alphabetical) ***********************/ - -unsigned long qh_clock (void); -void qh_checkflags (char *command, char *hiddenflags); -void qh_freebuffers (void); -void qh_freeqhull (boolT allmem); -void qh_init_A (FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[]); -void qh_init_B (coordT *points, int numpoints, int dim, boolT ismalloc); -void qh_init_qhull_command (int argc, char *argv[]); -void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc); -void qh_initflags (char *command); -void qh_initqhull_buffers (void); -void qh_initqhull_globals (coordT *points, int numpoints, int dim, boolT ismalloc); -void qh_initqhull_mem (void); -void qh_initqhull_start (FILE *infile, FILE *outfile, FILE *errfile); -void qh_initthresholds (char *command); -void qh_option (char *option, int *i, realT *r); -#if qh_QHpointer -void qh_restore_qhull (qhT **oldqh); -qhT *qh_save_qhull (void); -#endif - -/***** -io.c prototypes (duplicated from io.h) ***********************/ - -void dfacet( unsigned id); -void dvertex( unsigned id); -void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall); -void qh_produce_output(void); -coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc); - - -/********* -mem.c prototypes (duplicated from mem.h) **********************/ - -void qh_meminit (FILE *ferr); -void qh_memfreeshort (int *curlong, int *totlong); - -/********* -poly.c/poly2.c prototypes (duplicated from poly.h) **********************/ - -void qh_check_output (void); -void qh_check_points (void); -setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets); -facetT *qh_findbestfacet (pointT *point, boolT bestoutside, - realT *bestdist, boolT *isoutside); -vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp); -pointT *qh_point (int id); -setT *qh_pointfacet (void /*qh.facet_list*/); -int qh_pointid (pointT *point); -setT *qh_pointvertex (void /*qh.facet_list*/); -void qh_setvoronoi_all (void); -void qh_triangulate (void /*qh facet_list*/); - -/********* -stat.c prototypes (duplicated from stat.h) **********************/ - -void qh_collectstatistics (void); -void qh_printallstatistics (FILE *fp, char *string); - -#endif /* qhDEFqhull */ diff --git a/extern/qhull/include/qhull/qhull_a.h b/extern/qhull/include/qhull/qhull_a.h deleted file mode 100644 index d4e69b071be..00000000000 --- a/extern/qhull/include/qhull/qhull_a.h +++ /dev/null @@ -1,127 +0,0 @@ -/*<html><pre> -<a href="qh-qhull.htm" - >-------------------------------</a><a name="TOP">-</a> - - qhull_a.h - all header files for compiling qhull - - see qh-qhull.htm - - see qhull.h for user-level definitions - - see user.h for user-defineable constants - - defines internal functions for qhull.c global.c - - copyright (c) 1993-2002, The Geometry Center - - Notes: grep for ((" and (" to catch fprintf("lkasdjf"); - full parens around (x?y:z) - use '#include qhull/qhull_a.h' to avoid name clashes -*/ - -#ifndef qhDEFqhulla -#define qhDEFqhulla - -#include <stdio.h> -#include <stdlib.h> -#include <setjmp.h> -#include <string.h> -#include <math.h> -#include <float.h> /* some compilers will not need float.h */ -#include <limits.h> -#include <time.h> -#include <ctype.h> -/*** uncomment here and qset.c - if string.h does not define memcpy() -#include <memory.h> -*/ -#include "qhull.h" -#include "mem.h" -#include "qset.h" -#include "geom.h" -#include "merge.h" -#include "poly.h" -#include "io.h" -#include "stat.h" - -#if qh_CLOCKtype == 2 /* defined in user.h from qhull.h */ -#include <sys/types.h> -#include <sys/times.h> -#include <unistd.h> -#endif - -#ifdef _MSC_VER /* Microsoft Visual C++ */ -#pragma warning( disable : 4056) /* float constant expression. Looks like a compiler bug */ -#pragma warning( disable : 4146) /* unary minus applied to unsigned type */ -#pragma warning( disable : 4244) /* conversion from 'unsigned long' to 'real' */ -#pragma warning( disable : 4305) /* conversion from 'const double' to 'float' */ -#endif - -/* ======= -macros- =========== */ - -/*-<a href="qh-qhull.htm#TOC" - >--------------------------------</a><a name="traceN">-</a> - - traceN((fp.ferr, "format\n", vars)); - calls fprintf if qh.IStracing >= N - - notes: - removing tracing reduces code size but doesn't change execution speed -*/ -#ifndef qh_NOtrace -#define trace0(args) {if (qh IStracing) fprintf args;} -#define trace1(args) {if (qh IStracing >= 1) fprintf args;} -#define trace2(args) {if (qh IStracing >= 2) fprintf args;} -#define trace3(args) {if (qh IStracing >= 3) fprintf args;} -#define trace4(args) {if (qh IStracing >= 4) fprintf args;} -#define trace5(args) {if (qh IStracing >= 5) fprintf args;} -#else /* qh_NOtrace */ -#define trace0(args) {} -#define trace1(args) {} -#define trace2(args) {} -#define trace3(args) {} -#define trace4(args) {} -#define trace5(args) {} -#endif /* qh_NOtrace */ - -/***** -qhull.c prototypes (alphabetical after qhull) ********************/ - -void qh_qhull (void); -boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist); -void qh_buildhull(void); -void qh_buildtracing (pointT *furthest, facetT *facet); -void qh_build_withrestart (void); -void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet); -void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon); -pointT *qh_nextfurthest (facetT **visible); -void qh_partitionall(setT *vertices, pointT *points,int npoints); -void qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist); -void qh_partitionpoint (pointT *point, facetT *facet); -void qh_partitionvisible(boolT allpoints, int *numpoints); -void qh_precision (char *reason); -void qh_printsummary(FILE *fp); - -/***** -global.c internal prototypes (alphabetical) ***********************/ - -void qh_appendprint (qh_PRINT format); -void qh_freebuild (boolT allmem); -void qh_freebuffers (void); -void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc); -int qh_strtol (const char *s, char **endp); -double qh_strtod (const char *s, char **endp); - -/***** -stat.c internal prototypes (alphabetical) ***********************/ - -void qh_allstatA (void); -void qh_allstatB (void); -void qh_allstatC (void); -void qh_allstatD (void); -void qh_allstatE (void); -void qh_allstatE2 (void); -void qh_allstatF (void); -void qh_allstatG (void); -void qh_allstatH (void); -void qh_freebuffers (void); -void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc); - -#endif /* qhDEFqhulla */ diff --git a/extern/qhull/include/qhull/qset.h b/extern/qhull/include/qhull/qset.h deleted file mode 100644 index 6c0ff758de4..00000000000 --- a/extern/qhull/include/qhull/qset.h +++ /dev/null @@ -1,468 +0,0 @@ -/*<html><pre> -<a href="qh-set.htm" - >-------------------------------</a><a name="TOP">-</a> - - qset.h - header file for qset.c that implements set - - see qh-set.htm and qset.c - - only uses mem.c, malloc/free - - for error handling, writes message and calls - qh_errexit (qhmem_ERRqhull, NULL, NULL); - - set operations satisfy the following properties: - - sets have a max size, the actual size (if different) is stored at the end - - every set is NULL terminated - - sets may be sorted or unsorted, the caller must distinguish this - - copyright (c) 1993-2002, The Geometry Center -*/ - -#ifndef qhDEFset -#define qhDEFset 1 - -/*================= -structures- ===============*/ - -#ifndef DEFsetT -#define DEFsetT 1 -typedef struct setT setT; /* a set is a sorted or unsorted array of pointers */ -#endif - -/*-<a href="qh-set.htm#TOC" ->----------------------------------------</a><a name="setT">-</a> - -setT - a set or list of pointers with maximum size and actual size. - -variations: - unsorted, unique -- a list of unique pointers with NULL terminator - user guarantees uniqueness - sorted -- a sorted list of unique pointers with NULL terminator - qset.c guarantees uniqueness - unsorted -- a list of pointers terminated with NULL - indexed -- an array of pointers with NULL elements - -structure for set of n elements: - - -------------- - | maxsize - -------------- - | e[0] - a pointer, may be NULL for indexed sets - -------------- - | e[1] - - -------------- - | ... - -------------- - | e[n-1] - -------------- - | e[n] = NULL - -------------- - | ... - -------------- - | e[maxsize] - n+1 or NULL (determines actual size of set) - -------------- - -*/ - -/*-- setelemT -- internal type to allow both pointers and indices -*/ -typedef union setelemT setelemT; -union setelemT { - void *p; - int i; /* integer used for e[maxSize] */ -}; - -struct setT { - int maxsize; /* maximum number of elements (except NULL) */ - setelemT e[1]; /* array of pointers, tail is NULL */ - /* last slot (unless NULL) is actual size+1 - e[maxsize]==NULL or e[e[maxsize]-1]==NULL */ - /* this may generate a warning since e[] contains - maxsize elements */ -}; - -/*=========== -constants- =========================*/ - -/*-<a href="qh-set.htm#TOC" - >-----------------------------------</a><a name="SETelemsize">-</a> - - SETelemsize - size of a set element in bytes -*/ -#define SETelemsize sizeof(setelemT) - - -/*=========== -macros- =========================*/ - -/*-<a href="qh-set.htm#TOC" - >-----------------------------------</a><a name="FOREACHsetelement_">-</a> - - FOREACHsetelement_(type, set, variable) - define FOREACH iterator - - declare: - assumes *variable and **variablep are declared - no space in "variable)" [DEC Alpha cc compiler] - - each iteration: - variable is set element - variablep is one beyond variable. - - to repeat an element: - variablep--; / *repeat* / - - at exit: - variable is NULL at end of loop - - example: - #define FOREACHfacet_( facets ) FOREACHsetelement_( facetT, facets, facet ) - - notes: - use FOREACHsetelement_i_() if need index or include NULLs - - WARNING: - nested loops can't use the same variable (define another FOREACH) - - needs braces if nested inside another FOREACH - this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} ) -*/ -#define FOREACHsetelement_(type, set, variable) \ - if (((variable= NULL), set)) for(\ - variable##p= (type **)&((set)->e[0].p); \ - (variable= *variable##p++);) - -/*-<a href="qh-set.htm#TOC" - >----------------------------------------</a><a name="FOREACHsetelement_i_">-</a> - - FOREACHsetelement_i_(type, set, variable) - define indexed FOREACH iterator - - declare: - type *variable, variable_n, variable_i; - - each iteration: - variable is set element, may be NULL - variable_i is index, variable_n is qh_setsize() - - to repeat an element: - variable_i--; variable_n-- repeats for deleted element - - at exit: - variable==NULL and variable_i==variable_n - - example: - #define FOREACHfacet_i_( facets ) FOREACHsetelement_i_( facetT, facets, facet ) - - WARNING: - nested loops can't use the same variable (define another FOREACH) - - needs braces if nested inside another FOREACH - this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} ) -*/ -#define FOREACHsetelement_i_(type, set, variable) \ - if (((variable= NULL), set)) for (\ - variable##_i= 0, variable= (type *)((set)->e[0].p), \ - variable##_n= qh_setsize(set);\ - variable##_i < variable##_n;\ - variable= (type *)((set)->e[++variable##_i].p) ) - -/*-<a href="qh-set.htm#TOC" - >--------------------------------------</a><a name="FOREACHsetelementreverse_">-</a> - - FOREACHsetelementreverse_(type, set, variable)- - define FOREACH iterator in reverse order - - declare: - assumes *variable and **variablep are declared - also declare 'int variabletemp' - - each iteration: - variable is set element - - to repeat an element: - variabletemp++; / *repeat* / - - at exit: - variable is NULL - - example: - #define FOREACHvertexreverse_( vertices ) FOREACHsetelementreverse_( vertexT, vertices, vertex ) - - notes: - use FOREACHsetelementreverse12_() to reverse first two elements - WARNING: needs braces if nested inside another FOREACH -*/ -#define FOREACHsetelementreverse_(type, set, variable) \ - if (((variable= NULL), set)) for(\ - variable##temp= qh_setsize(set)-1, variable= qh_setlast(set);\ - variable; variable= \ - ((--variable##temp >= 0) ? SETelemt_(set, variable##temp, type) : NULL)) - -/*-<a href="qh-set.htm#TOC" - >-----------------------------------</a><a name="FOREACHsetelementreverse12_">-</a> - - FOREACHsetelementreverse12_(type, set, variable)- - define FOREACH iterator with e[1] and e[0] reversed - - declare: - assumes *variable and **variablep are declared - - each iteration: - variable is set element - variablep is one after variable. - - to repeat an element: - variablep--; / *repeat* / - - at exit: - variable is NULL at end of loop - - example - #define FOREACHvertexreverse12_( vertices ) FOREACHsetelementreverse12_( vertexT, vertices, vertex ) - - notes: - WARNING: needs braces if nested inside another FOREACH -*/ -#define FOREACHsetelementreverse12_(type, set, variable) \ - if (((variable= NULL), set)) for(\ - variable##p= (type **)&((set)->e[1].p); \ - (variable= *variable##p); \ - variable##p == ((type **)&((set)->e[0].p))?variable##p += 2: \ - (variable##p == ((type **)&((set)->e[1].p))?variable##p--:variable##p++)) - -/*-<a href="qh-set.htm#TOC" - >-----------------------------------</a><a name="FOREACHelem_">-</a> - - FOREACHelem_( set )- - iterate elements in a set - - declare: - void *elem, *elemp; - - each iteration: - elem is set element - elemp is one beyond - - to repeat an element: - elemp--; / *repeat* / - - at exit: - elem == NULL at end of loop - - example: - FOREACHelem_(set) { - - notes: - WARNING: needs braces if nested inside another FOREACH -*/ -#define FOREACHelem_(set) FOREACHsetelement_(void, set, elem) - -/*-<a href="qh-set.htm#TOC" - >-----------------------------------</a><a name="FOREACHset_">-</a> - - FOREACHset_( set )- - iterate a set of sets - - declare: - setT *set, **setp; - - each iteration: - set is set element - setp is one beyond - - to repeat an element: - setp--; / *repeat* / - - at exit: - set == NULL at end of loop - - example - FOREACHset_(sets) { - - notes: - WARNING: needs braces if nested inside another FOREACH -*/ -#define FOREACHset_(sets) FOREACHsetelement_(setT, sets, set) - -/*-<a href="qh-set.htm#TOC" - >-----------------------------------------</a><a name="SETindex_">-</a> - - SETindex_( set, elem ) - return index of elem in set - - notes: - for use with FOREACH iteration - - example: - i= SETindex_(ridges, ridge) -*/ -#define SETindex_(set, elem) ((void **)elem##p - (void **)&(set)->e[1].p) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETref_">-</a> - - SETref_( elem ) - l.h.s. for modifying the current element in a FOREACH iteration - - example: - SETref_(ridge)= anotherridge; -*/ -#define SETref_(elem) (elem##p[-1]) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETelem_">-</a> - - SETelem_(set, n) - return the n'th element of set - - notes: - assumes that n is valid [0..size] and that set is defined - use SETelemt_() for type cast -*/ -#define SETelem_(set, n) ((set)->e[n].p) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETelemt_">-</a> - - SETelemt_(set, n, type) - return the n'th element of set as a type - - notes: - assumes that n is valid [0..size] and that set is defined -*/ -#define SETelemt_(set, n, type) ((type*)((set)->e[n].p)) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETelemaddr_">-</a> - - SETelemaddr_(set, n, type) - return address of the n'th element of a set - - notes: - assumes that n is valid [0..size] and set is defined -*/ -#define SETelemaddr_(set, n, type) ((type **)(&((set)->e[n].p))) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETfirst_">-</a> - - SETfirst_(set) - return first element of set - -*/ -#define SETfirst_(set) ((set)->e[0].p) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETfirstt_">-</a> - - SETfirstt_(set, type) - return first element of set as a type - -*/ -#define SETfirstt_(set, type) ((type*)((set)->e[0].p)) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETsecond_">-</a> - - SETsecond_(set) - return second element of set - -*/ -#define SETsecond_(set) ((set)->e[1].p) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETsecondt_">-</a> - - SETsecondt_(set, type) - return second element of set as a type -*/ -#define SETsecondt_(set, type) ((type*)((set)->e[1].p)) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETaddr_">-</a> - - SETaddr_(set, type) - return address of set's elements -*/ -#define SETaddr_(set,type) ((type **)(&((set)->e[0].p))) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETreturnsize_">-</a> - - SETreturnsize_(set, size) - return size of a set - - notes: - set must be defined - use qh_setsize(set) unless speed is critical -*/ -#define SETreturnsize_(set, size) (((size)= ((set)->e[(set)->maxsize].i))?(--(size)):((size)= (set)->maxsize)) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETempty_">-</a> - - SETempty_(set) - return true (1) if set is empty - - notes: - set may be NULL -*/ -#define SETempty_(set) (!set || (SETfirst_(set) ? 0:1)) - -/*-<a href="qh-set.htm#TOC" - >---------------------------------------</a><a name="SETtruncate_">-</a> - - SETtruncate_(set) - return first element of set - - see: - qh_settruncate() - -*/ -#define SETtruncate_(set, size) {set->e[set->maxsize].i= size+1; /* maybe overwritten */ \ - set->e[size].p= NULL;} - -/*======= prototypes in alphabetical order ============*/ - -void qh_setaddsorted(setT **setp, void *elem); -void qh_setaddnth(setT **setp, int nth, void *newelem); -void qh_setappend(setT **setp, void *elem); -void qh_setappend_set(setT **setp, setT *setA); -void qh_setappend2ndlast(setT **setp, void *elem); -void qh_setcheck(setT *set, char *tname, int id); -void qh_setcompact(setT *set); -setT *qh_setcopy(setT *set, int extra); -void *qh_setdel(setT *set, void *elem); -void *qh_setdellast(setT *set); -void *qh_setdelnth(setT *set, int nth); -void *qh_setdelnthsorted(setT *set, int nth); -void *qh_setdelsorted(setT *set, void *newelem); -setT *qh_setduplicate( setT *set, int elemsize); -int qh_setequal(setT *setA, setT *setB); -int qh_setequal_except (setT *setA, void *skipelemA, setT *setB, void *skipelemB); -int qh_setequal_skip (setT *setA, int skipA, setT *setB, int skipB); -void qh_setfree(setT **set); -void qh_setfree2( setT **setp, int elemsize); -void qh_setfreelong(setT **set); -int qh_setin(setT *set, void *setelem); -int qh_setindex(setT *set, void *setelem); -void qh_setlarger(setT **setp); -void *qh_setlast(setT *set); -setT *qh_setnew(int size); -setT *qh_setnew_delnthsorted(setT *set, int size, int nth, int prepend); -void qh_setprint(FILE *fp, char* string, setT *set); -void qh_setreplace(setT *set, void *oldelem, void *newelem); -int qh_setsize(setT *set); -setT *qh_settemp(int setsize); -void qh_settempfree(setT **set); -void qh_settempfree_all(void); -setT *qh_settemppop(void); -void qh_settemppush(setT *set); -void qh_settruncate (setT *set, int size); -int qh_setunique (setT **set, void *elem); -void qh_setzero (setT *set, int index, int size); - - -#endif /* qhDEFset */ diff --git a/extern/qhull/include/qhull/stat.h b/extern/qhull/include/qhull/stat.h deleted file mode 100644 index 1dae54ed21d..00000000000 --- a/extern/qhull/include/qhull/stat.h +++ /dev/null @@ -1,520 +0,0 @@ - /*<html><pre> -<a href="qh-stat.htm" - >-------------------------------</a><a name="TOP">-</a> - - stat.h - contains all statistics that are collected for qhull - - see qh-stat.htm and stat.c - - copyright (c) 1993-2002, The Geometry Center - - recompile qhull if you change this file - - Integer statistics are Z* while real statistics are W*. - - define maydebugx to call a routine at every statistic event - -*/ - -#ifndef qhDEFstat -#define qhDEFstat 1 - - -/*-<a href="qh-stat.htm#TOC" - >-------------------------------</a><a name="KEEPstatistics">-</a> - - qh_KEEPstatistics - 0 turns off statistic gathering (except zzdef/zzinc/zzadd/zzval/wwval) -*/ -#ifndef qh_KEEPstatistics -#define qh_KEEPstatistics 1 -#endif - -/*-<a href="qh-stat.htm#TOC" - >-------------------------------</a><a name="statistics">-</a> - - Zxxx for integers, Wxxx for reals - - notes: - be sure that all statistics are defined in stat.c - otherwise initialization may core dump - can pick up all statistics by: - grep '[zw].*_[(][ZW]' *.c >z.x - remove trailers with query">-</a> - remove leaders with query-replace-regexp [ ^I]+ ( -*/ -#if qh_KEEPstatistics -enum statistics { /* alphabetical after Z/W */ - Zacoplanar, - Wacoplanarmax, - Wacoplanartot, - Zangle, - Wangle, - Wanglemax, - Wanglemin, - Zangletests, - Wareatot, - Wareamax, - Wareamin, - Zavoidold, - Wavoidoldmax, - Wavoidoldtot, - Zback0, - Zbestcentrum, - Zbestdist, - Zcentrumtests, - Zcheckpart, - Zcomputefurthest, - Zconcave, - Wconcavemax, - Wconcavetot, - Zconcaveridges, - Zconcaveridge, - Zcoplanar, - Wcoplanarmax, - Wcoplanartot, - Zcoplanarangle, - Zcoplanarcentrum, - Zcoplanarhorizon, - Zcoplanarinside, - Zcoplanarpart, - Zcoplanarridges, - Wcpu, - Zcyclefacetmax, - Zcyclefacettot, - Zcyclehorizon, - Zcyclevertex, - Zdegen, - Wdegenmax, - Wdegentot, - Zdegenvertex, - Zdelfacetdup, - Zdelridge, - Zdelvertextot, - Zdelvertexmax, - Zdetsimplex, - Zdistcheck, - Zdistconvex, - Zdistgood, - Zdistio, - Zdistplane, - Zdiststat, - Zdistvertex, - Zdistzero, - Zdoc1, - Zdoc2, - Zdoc3, - Zdoc4, - Zdoc5, - Zdoc6, - Zdoc7, - Zdoc8, - Zdoc9, - Zdoc10, - Zdoc11, - Zdoc12, - Zdropdegen, - Zdropneighbor, - Zdupflip, - Zduplicate, - Wduplicatemax, - Wduplicatetot, - Zdupridge, - Zdupsame, - Zflipped, - Wflippedmax, - Wflippedtot, - Zflippedfacets, - Zfindbest, - Zfindbestmax, - Zfindbesttot, - Zfindcoplanar, - Zfindfail, - Zfindhorizon, - Zfindhorizonmax, - Zfindhorizontot, - Zfindjump, - Zfindnew, - Zfindnewmax, - Zfindnewtot, - Zfindnewjump, - Zfindnewsharp, - Zgauss0, - Zgoodfacet, - Zhashlookup, - Zhashridge, - Zhashridgetest, - Zhashtests, - Zinsidevisible, - Zintersect, - Zintersectfail, - Zintersectmax, - Zintersectnum, - Zintersecttot, - Zmaxneighbors, - Wmaxout, - Wmaxoutside, - Zmaxridges, - Zmaxvertex, - Zmaxvertices, - Zmaxvneighbors, - Zmemfacets, - Zmempoints, - Zmemridges, - Zmemvertices, - Zmergeflipdup, - Zmergehorizon, - Zmergeinittot, - Zmergeinitmax, - Zmergeinittot2, - Zmergeintohorizon, - Zmergenew, - Zmergesettot, - Zmergesetmax, - Zmergesettot2, - Zmergesimplex, - Zmergevertex, - Wmindenom, - Wminvertex, - Zminnorm, - Zmultiridge, - Znearlysingular, - Zneighbor, - Wnewbalance, - Wnewbalance2, - Znewfacettot, - Znewfacetmax, - Znewvertex, - Wnewvertex, - Wnewvertexmax, - Znoarea, - Znonsimplicial, - Znowsimplicial, - Znotgood, - Znotgoodnew, - Znotmax, - Znumfacets, - Znummergemax, - Znummergetot, - Znumneighbors, - Znumridges, - Znumvertices, - Znumvisibility, - Znumvneighbors, - Zonehorizon, - Zpartangle, - Zpartcoplanar, - Zpartflip, - Zparthorizon, - Zpartinside, - Zpartition, - Zpartitionall, - Zpartnear, - Zpbalance, - Wpbalance, - Wpbalance2, - Zpostfacets, - Zpremergetot, - Zprocessed, - Zremvertex, - Zremvertexdel, - Zrenameall, - Zrenamepinch, - Zrenameshare, - Zretry, - Wretrymax, - Zridge, - Wridge, - Wridgemax, - Zridge0, - Wridge0, - Wridge0max, - Zridgemid, - Wridgemid, - Wridgemidmax, - Zridgeok, - Wridgeok, - Wridgeokmax, - Zsearchpoints, - Zsetplane, - Ztestvneighbor, - Ztotcheck, - Ztothorizon, - Ztotmerge, - Ztotpartcoplanar, - Ztotpartition, - Ztotridges, - Ztotvertices, - Ztotvisible, - Ztricoplanar, - Ztricoplanarmax, - Ztricoplanartot, - Ztridegen, - Ztrimirror, - Ztrinull, - Wvertexmax, - Wvertexmin, - Zvertexridge, - Zvertexridgetot, - Zvertexridgemax, - Zvertices, - Zvisfacettot, - Zvisfacetmax, - Zvisvertextot, - Zvisvertexmax, - Zwidefacet, - Zwidevertices, - ZEND}; - -/*-<a href="qh-stat.htm#TOC" - >-------------------------------</a><a name="ZZstat">-</a> - - Zxxx/Wxxx statistics that remain defined if qh_KEEPstatistics=0 - - notes: - be sure to use zzdef, zzinc, etc. with these statistics (no double checking!) -*/ -#else -enum statistics { /* for zzdef etc. macros */ - Zback0, - Zbestdist, - Zcentrumtests, - Zcheckpart, - Zconcaveridges, - Zcoplanarhorizon, - Zcoplanarpart, - Zcoplanarridges, - Zcyclefacettot, - Zcyclehorizon, - Zdelvertextot, - Zdistcheck, - Zdistconvex, - Zdistzero, - Zdoc1, - Zdoc2, - Zdoc3, - Zdoc11, - Zflippedfacets, - Zgauss0, - Zminnorm, - Zmultiridge, - Znearlysingular, - Wnewvertexmax, - Znumvisibility, - Zpartcoplanar, - Zpartition, - Zpartitionall, - Zprocessed, - Zretry, - Zridge, - Wridge, - Wridgemax, - Zridge0, - Wridge0, - Wridge0max, - Zridgemid, - Wridgemid, - Wridgemidmax, - Zridgeok, - Wridgeok, - Wridgeokmax, - Zsetplane, - Ztotmerge, - ZEND}; -#endif - -/*-<a href="qh-stat.htm#TOC" - >-------------------------------</a><a name="ztype">-</a> - - ztype - the type of a statistic sets its initial value. - - notes: - The type should be the same as the macro for collecting the statistic -*/ -enum ztypes {zdoc,zinc,zadd,zmax,zmin,ZTYPEreal,wadd,wmax,wmin,ZTYPEend}; - -/*========== macros and constants =============*/ - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="MAYdebugx">-</a> - - MAYdebugx - define as maydebug() to be called frequently for error trapping -*/ -#define MAYdebugx - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="zdef_">-</a> - - zzdef_, zdef_( type, name, doc, -1) - define a statistic (assumes 'qhstat.next= 0;') - - zdef_( type, name, doc, count) - define an averaged statistic - printed as name/count -*/ -#define zzdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \ - qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype -#if qh_KEEPstatistics -#define zdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \ - qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype -#else -#define zdef_(type,name,doc,count) -#endif - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="zinc_">-</a> - - zzinc_( name ), zinc_( name) - increment an integer statistic -*/ -#define zzinc_(id) {MAYdebugx; qhstat stats[id].i++;} -#if qh_KEEPstatistics -#define zinc_(id) {MAYdebugx; qhstat stats[id].i++;} -#else -#define zinc_(id) {} -#endif - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="zadd_">-</a> - - zzadd_( name, value ), zadd_( name, value ), wadd_( name, value ) - add value to an integer or real statistic -*/ -#define zzadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);} -#define wwadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);} -#if qh_KEEPstatistics -#define zadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);} -#define wadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);} -#else -#define zadd_(id, val) {} -#define wadd_(id, val) {} -#endif - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="zval_">-</a> - - zzval_( name ), zval_( name ), wwval_( name ) - set or return value of a statistic -*/ -#define zzval_(id) ((qhstat stats[id]).i) -#define wwval_(id) ((qhstat stats[id]).r) -#if qh_KEEPstatistics -#define zval_(id) ((qhstat stats[id]).i) -#define wval_(id) ((qhstat stats[id]).r) -#else -#define zval_(id) qhstat tempi -#define wval_(id) qhstat tempr -#endif - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="zmax_">-</a> - - zmax_( id, val ), wmax_( id, value ) - maximize id with val -*/ -#define wwmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));} -#if qh_KEEPstatistics -#define zmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].i,(val));} -#define wmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));} -#else -#define zmax_(id, val) {} -#define wmax_(id, val) {} -#endif - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="zmin_">-</a> - - zmin_( id, val ), wmin_( id, value ) - minimize id with val -*/ -#if qh_KEEPstatistics -#define zmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].i,(val));} -#define wmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].r,(val));} -#else -#define zmin_(id, val) {} -#define wmin_(id, val) {} -#endif - -/*================== stat.h types ==============*/ - - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="intrealT">-</a> - - intrealT - union of integer and real, used for statistics -*/ -typedef union intrealT intrealT; /* union of int and realT */ -union intrealT { - int i; - realT r; -}; - -/*-<a href="qh-stat.htm#TOC" - >--------------------------------</a><a name="qhstat">-</a> - - qhstat - global data structure for statistics - - notes: - access to qh_qhstat is via the "qhstat" macro. There are two choices - qh_QHpointer = 1 access globals via a pointer - enables qh_saveqhull() and qh_restoreqhull() - = 0 qh_qhstat is a static data structure - only one instance of qhull() can be active at a time - default value - qh_QHpointer is defined in qhull.h - - allocated in stat.c -*/ -typedef struct qhstatT qhstatT; -#if qh_QHpointer -#define qhstat qh_qhstat-> -extern qhstatT *qh_qhstat; -#else -#define qhstat qh_qhstat. -extern qhstatT qh_qhstat; -#endif -struct qhstatT { - intrealT stats[ZEND]; /* integer and real statistics */ - unsigned char id[ZEND+10]; /* id's in print order */ - char *doc[ZEND]; /* array of documentation strings */ - short int count[ZEND]; /* -1 if none, else index of count to use */ - char type[ZEND]; /* type, see ztypes above */ - char printed[ZEND]; /* true, if statistic has been printed */ - intrealT init[ZTYPEend]; /* initial values by types, set initstatistics */ - - int next; /* next index for zdef_ */ - int precision; /* index for precision problems */ - int vridges; /* index for Voronoi ridges */ - int tempi; - realT tempr; -}; - -/*========== function prototypes ===========*/ - -void qh_allstatA(void); -void qh_allstatB(void); -void qh_allstatC(void); -void qh_allstatD(void); -void qh_allstatE(void); -void qh_allstatE2(void); -void qh_allstatF(void); -void qh_allstatG(void); -void qh_allstatH(void); -void qh_allstatI(void); -void qh_allstatistics (void); -void qh_collectstatistics (void); -void qh_freestatistics (void); -void qh_initstatistics (void); -boolT qh_newstats (int index, int *nextindex); -boolT qh_nostatistic (int i); -void qh_printallstatistics (FILE *fp, char *string); -void qh_printstatistics (FILE *fp, char *string); -void qh_printstatlevel (FILE *fp, int id, int start); -void qh_printstats (FILE *fp, int index, int *nextindex); -realT qh_stddev (int num, realT tot, realT tot2, realT *ave); - -#endif /* qhDEFstat */ diff --git a/extern/qhull/include/qhull/user.h b/extern/qhull/include/qhull/user.h deleted file mode 100644 index 79558967a52..00000000000 --- a/extern/qhull/include/qhull/user.h +++ /dev/null @@ -1,762 +0,0 @@ -/*<html><pre> -<a href="qh-user.htm" - >-------------------------------</a><a name="TOP">-</a> - - user.h - user redefinable constants - - see qh-user.htm. see COPYING for copyright information. - - before reading any code, review qhull.h for data structure definitions and - the "qh" macro. -*/ - -#ifndef qhDEFuser -#define qhDEFuser 1 - -/*============= data types and configuration macros ==========*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="realT">-</a> - - realT - set the size of floating point numbers - - qh_REALdigits - maximimum number of significant digits - - qh_REAL_1, qh_REAL_2n, qh_REAL_3n - format strings for printf - - qh_REALmax, qh_REALmin - maximum and minimum (near zero) values - - qh_REALepsilon - machine roundoff. Maximum roundoff error for addition and multiplication. - - notes: - Select whether to store floating point numbers in single precision (float) - or double precision (double). - - Use 'float' to save about 8% in time and 25% in space. This is particularly - help if high-d where convex hulls are space limited. Using 'float' also - reduces the printed size of Qhull's output since numbers have 8 digits of - precision. - - Use 'double' when greater arithmetic precision is needed. This is needed - for Delaunay triangulations and Voronoi diagrams when you are not merging - facets. - - If 'double' gives insufficient precision, your data probably includes - degeneracies. If so you should use facet merging (done by default) - or exact arithmetic (see imprecision section of manual, qh-impre.htm). - You may also use option 'Po' to force output despite precision errors. - - You may use 'long double', but many format statements need to be changed - and you may need a 'long double' square root routine. S. Grundmann - (sg@eeiwzb.et.tu-dresden.de) has done this. He reports that the code runs - much slower with little gain in precision. - - WARNING: on some machines, int f(){realT a= REALmax;return (a == REALmax);} - returns False. Use (a > REALmax/2) instead of (a == REALmax). - - REALfloat = 1 all numbers are 'float' type - = 0 all numbers are 'double' type -*/ -#define REALfloat 0 - -#if (REALfloat == 1) -#define realT float -#define REALmax FLT_MAX -#define REALmin FLT_MIN -#define REALepsilon FLT_EPSILON -#define qh_REALdigits 8 /* maximum number of significant digits */ -#define qh_REAL_1 "%6.8g " -#define qh_REAL_2n "%6.8g %6.8g\n" -#define qh_REAL_3n "%6.8g %6.8g %6.8g\n" - -#elif (REALfloat == 0) -#define realT double -#define REALmax DBL_MAX -#define REALmin DBL_MIN -#define REALepsilon DBL_EPSILON -#define qh_REALdigits 16 /* maximum number of significant digits */ -#define qh_REAL_1 "%6.16g " -#define qh_REAL_2n "%6.16g %6.16g\n" -#define qh_REAL_3n "%6.16g %6.16g %6.16g\n" - -#else -#error unknown float option -#endif - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="CPUclock">-</a> - - qh_CPUclock - define the clock() function for reporting the total time spent by Qhull - returns CPU ticks as a 'long int' - qh_CPUclock is only used for reporting the total time spent by Qhull - - qh_SECticks - the number of clock ticks per second - - notes: - looks for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or assumes microseconds - to define a custom clock, set qh_CLOCKtype to 0 - - if your system does not use clock() to return CPU ticks, replace - qh_CPUclock with the corresponding function. It is converted - to unsigned long to prevent wrap-around during long runs. - - - Set qh_CLOCKtype to - - 1 for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or microsecond - Note: may fail if more than 1 hour elapsed time - - 2 use qh_clock() with POSIX times() (see global.c) -*/ -#define qh_CLOCKtype 1 /* change to the desired number */ - -#if (qh_CLOCKtype == 1) - -#if defined (CLOCKS_PER_SECOND) -#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */ -#define qh_SECticks CLOCKS_PER_SECOND - -#elif defined (CLOCKS_PER_SEC) -#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */ -#define qh_SECticks CLOCKS_PER_SEC - -#elif defined (CLK_TCK) -#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */ -#define qh_SECticks CLK_TCK - -#else -#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */ -#define qh_SECticks 1E6 -#endif - -#elif (qh_CLOCKtype == 2) -#define qh_CPUclock qh_clock() /* return CPU clock */ -#define qh_SECticks 100 - -#else /* qh_CLOCKtype == ? */ -#error unknown clock option -#endif - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="RANDOM">-</a> - - qh_RANDOMtype, qh_RANDOMmax, qh_RANDOMseed - define random number generator - - qh_RANDOMint generates a random integer between 0 and qh_RANDOMmax. - qh_RANDOMseed sets the random number seed for qh_RANDOMint - - Set qh_RANDOMtype (default 5) to: - 1 for random() with 31 bits (UCB) - 2 for rand() with RAND_MAX or 15 bits (system 5) - 3 for rand() with 31 bits (Sun) - 4 for lrand48() with 31 bits (Solaris) - 5 for qh_rand() with 31 bits (included with Qhull) - - notes: - Random numbers are used by rbox to generate point sets. Random - numbers are used by Qhull to rotate the input ('QRn' option), - simulate a randomized algorithm ('Qr' option), and to simulate - roundoff errors ('Rn' option). - - Random number generators differ between systems. Most systems provide - rand() but the period varies. The period of rand() is not critical - since qhull does not normally use random numbers. - - The default generator is Park & Miller's minimal standard random - number generator [CACM 31:1195 '88]. It is included with Qhull. - - If qh_RANDOMmax is wrong, qhull will report a warning and Geomview - output will likely be invisible. -*/ -#define qh_RANDOMtype 5 /* *** change to the desired number *** */ - -#if (qh_RANDOMtype == 1) -#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, random()/MAX */ -#define qh_RANDOMint random() -#define qh_RANDOMseed_(seed) srandom(seed); - -#elif (qh_RANDOMtype == 2) -#ifdef RAND_MAX -#define qh_RANDOMmax ((realT)RAND_MAX) -#else -#define qh_RANDOMmax ((realT)32767) /* 15 bits (System 5) */ -#endif -#define qh_RANDOMint rand() -#define qh_RANDOMseed_(seed) srand((unsigned)seed); - -#elif (qh_RANDOMtype == 3) -#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, Sun */ -#define qh_RANDOMint rand() -#define qh_RANDOMseed_(seed) srand((unsigned)seed); - -#elif (qh_RANDOMtype == 4) -#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, lrand38()/MAX */ -#define qh_RANDOMint lrand48() -#define qh_RANDOMseed_(seed) srand48(seed); - -#elif (qh_RANDOMtype == 5) -#define qh_RANDOMmax ((realT)2147483646UL) /* 31 bits, qh_rand/MAX */ -#define qh_RANDOMint qh_rand() -#define qh_RANDOMseed_(seed) qh_srand(seed); -/* unlike rand(), never returns 0 */ - -#else -#error: unknown random option -#endif - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="ORIENTclock">-</a> - - qh_ORIENTclock - 0 for inward pointing normals by Geomview convention -*/ -#define qh_ORIENTclock 0 - - -/*========= performance related constants =========*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="HASHfactor">-</a> - - qh_HASHfactor - total hash slots / used hash slots. Must be at least 1.1. - - notes: - =2 for at worst 50% occupancy for qh hash_table and normally 25% occupancy -*/ -#define qh_HASHfactor 2 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="VERIFYdirect">-</a> - - qh_VERIFYdirect - with 'Tv' verify all points against all facets if op count is smaller - - notes: - if greater, calls qh_check_bestdist() instead -*/ -#define qh_VERIFYdirect 1000000 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="INITIALsearch">-</a> - - qh_INITIALsearch - if qh_INITIALmax, search points up to this dimension -*/ -#define qh_INITIALsearch 6 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="INITIALmax">-</a> - - qh_INITIALmax - if dim >= qh_INITIALmax, use min/max coordinate points for initial simplex - - notes: - from points with non-zero determinants - use option 'Qs' to override (much slower) -*/ -#define qh_INITIALmax 8 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="JOGGLEdefault">-</a> - - qh_JOGGLEdefault - default qh.JOGGLEmax is qh.DISTround * qh_JOGGLEdefault - - notes: - rbox s r 100 | qhull QJ1e-15 QR0 generates 90% faults at distround 7e-16 - rbox s r 100 | qhull QJ1e-14 QR0 generates 70% faults - rbox s r 100 | qhull QJ1e-13 QR0 generates 35% faults - rbox s r 100 | qhull QJ1e-12 QR0 generates 8% faults - rbox s r 100 | qhull QJ1e-11 QR0 generates 1% faults - rbox s r 100 | qhull QJ1e-10 QR0 generates 0% faults - rbox 1000 W0 | qhull QJ1e-12 QR0 generates 86% faults - rbox 1000 W0 | qhull QJ1e-11 QR0 generates 20% faults - rbox 1000 W0 | qhull QJ1e-10 QR0 generates 2% faults - the later have about 20 points per facet, each of which may interfere - - pick a value large enough to avoid retries on most inputs -*/ -#define qh_JOGGLEdefault 30000.0 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="JOGGLEincrease">-</a> - - qh_JOGGLEincrease - factor to increase qh.JOGGLEmax on qh_JOGGLEretry or qh_JOGGLEagain -*/ -#define qh_JOGGLEincrease 10.0 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="JOGGLEretry">-</a> - - qh_JOGGLEretry - if ZZretry = qh_JOGGLEretry, increase qh.JOGGLEmax - - notes: - try twice at the original value in case of bad luck the first time -*/ -#define qh_JOGGLEretry 2 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="JOGGLEagain">-</a> - - qh_JOGGLEagain - every following qh_JOGGLEagain, increase qh.JOGGLEmax - - notes: - 1 is OK since it's already failed qh_JOGGLEretry times -*/ -#define qh_JOGGLEagain 1 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="JOGGLEmaxincrease">-</a> - - qh_JOGGLEmaxincrease - maximum qh.JOGGLEmax due to qh_JOGGLEincrease - relative to qh.MAXwidth - - notes: - qh.joggleinput will retry at this value until qh_JOGGLEmaxretry -*/ -#define qh_JOGGLEmaxincrease 1e-2 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="JOGGLEmaxretry">-</a> - - qh_JOGGLEmaxretry - stop after qh_JOGGLEmaxretry attempts -*/ -#define qh_JOGGLEmaxretry 100 - -/*========= memory constants =========*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="MEMalign">-</a> - - qh_MEMalign - memory alignment for qh_meminitbuffers() in global.c - - notes: - to avoid bus errors, memory allocation must consider alignment requirements. - malloc() automatically takes care of alignment. Since mem.c manages - its own memory, we need to explicitly specify alignment in - qh_meminitbuffers(). - - A safe choice is sizeof(double). sizeof(float) may be used if doubles - do not occur in data structures and pointers are the same size. Be careful - of machines (e.g., DEC Alpha) with large pointers. - - If using gcc, best alignment is - #define qh_MEMalign fmax_(__alignof__(realT),__alignof__(void *)) -*/ -#define qh_MEMalign fmax_(sizeof(realT), sizeof(void *)) - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="MEMbufsize">-</a> - - qh_MEMbufsize - size of additional memory buffers - - notes: - used for qh_meminitbuffers() in global.c -*/ -#define qh_MEMbufsize 0x10000 /* allocate 64K memory buffers */ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="MEMinitbuf">-</a> - - qh_MEMinitbuf - size of initial memory buffer - - notes: - use for qh_meminitbuffers() in global.c -*/ -#define qh_MEMinitbuf 0x20000 /* initially allocate 128K buffer */ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="INFINITE">-</a> - - qh_INFINITE - on output, indicates Voronoi center at infinity -*/ -#define qh_INFINITE -10.101 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="DEFAULTbox">-</a> - - qh_DEFAULTbox - default box size (Geomview expects 0.5) -*/ -#define qh_DEFAULTbox 0.5 - -/*======= conditional compilation ============================*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="compiler">-</a> - - __cplusplus - defined by C++ compilers - - __MSC_VER - defined by Microsoft Visual C++ - - __MWERKS__ && __POWERPC__ - defined by Metrowerks when compiling for the Power Macintosh - - __STDC__ - defined for strict ANSI C -*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="COMPUTEfurthest">-</a> - - qh_COMPUTEfurthest - compute furthest distance to an outside point instead of storing it with the facet - =1 to compute furthest - - notes: - computing furthest saves memory but costs time - about 40% more distance tests for partitioning - removes facet->furthestdist -*/ -#define qh_COMPUTEfurthest 0 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="KEEPstatistics">-</a> - - qh_KEEPstatistics - =0 removes most of statistic gathering and reporting - - notes: - if 0, code size is reduced by about 4%. -*/ -#define qh_KEEPstatistics 1 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="MAXoutside">-</a> - - qh_MAXoutside - record outer plane for each facet - =1 to record facet->maxoutside - - notes: - this takes a realT per facet and slightly slows down qhull - it produces better outer planes for geomview output -*/ -#define qh_MAXoutside 1 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="NOmerge">-</a> - - qh_NOmerge - disables facet merging if defined - - notes: - This saves about 10% space. - - Unless 'Q0' - qh_NOmerge sets 'QJ' to avoid precision errors - - #define qh_NOmerge - - see: - <a href="mem.h#NOmem">qh_NOmem</a> in mem.c - - see user.c/user_eg.c for removing io.o -*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="NOtrace">-</a> - - qh_NOtrace - no tracing if defined - - notes: - This saves about 5% space. - - #define qh_NOtrace -*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="QHpointer">-</a> - - qh_QHpointer - access global data with pointer or static structure - - qh_QHpointer = 1 access globals via a pointer to allocated memory - enables qh_saveqhull() and qh_restoreqhull() - costs about 8% in time and 2% in space - - = 0 qh_qh and qh_qhstat are static data structures - only one instance of qhull() can be active at a time - default value - - notes: - all global variables for qhull are in qh, qhmem, and qhstat - qh is defined in qhull.h - qhmem is defined in mem.h - qhstat is defined in stat.h - - see: - user_eg.c for an example -*/ -#define qh_QHpointer 0 -#if 0 /* sample code */ - qhT *oldqhA, *oldqhB; - - exitcode= qh_new_qhull (dim, numpoints, points, ismalloc, - flags, outfile, errfile); - /* use results from first call to qh_new_qhull */ - oldqhA= qh_save_qhull(); - exitcode= qh_new_qhull (dimB, numpointsB, pointsB, ismalloc, - flags, outfile, errfile); - /* use results from second call to qh_new_qhull */ - oldqhB= qh_save_qhull(); - qh_restore_qhull (&oldqhA); - /* use results from first call to qh_new_qhull */ - qh_freeqhull (qh_ALL); /* frees all memory used by first call */ - qh_restore_qhull (&oldqhB); - /* use results from second call to qh_new_qhull */ - qh_freeqhull (!qh_ALL); /* frees long memory used by second call */ - qh_memfreeshort (&curlong, &totlong); /* frees short memory and memory allocator */ -#endif - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="QUICKhelp">-</a> - - qh_QUICKhelp - =1 to use abbreviated help messages, e.g., for degenerate inputs -*/ -#define qh_QUICKhelp 0 - -/* ============ -merge constants- ==================== - - These constants effect facet merging. You probably will not need - to modify these. They effect the performance of facet merging. -*/ - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="DIMmergeVertex">-</a> - - qh_DIMmergeVertex - max dimension for vertex merging (it is not effective in high-d) -*/ -#define qh_DIMmergeVertex 6 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="DIMreduceBuild">-</a> - - qh_DIMreduceBuild - max dimension for vertex reduction during build (slow in high-d) -*/ -#define qh_DIMreduceBuild 5 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="BESTcentrum">-</a> - - qh_BESTcentrum - if > 2*dim+n vertices, qh_findbestneighbor() tests centrums (faster) - else, qh_findbestneighbor() tests all vertices (much better merges) - - qh_BESTcentrum2 - if qh_BESTcentrum2 * DIM3 + BESTcentrum < #vertices tests centrums -*/ -#define qh_BESTcentrum 20 -#define qh_BESTcentrum2 2 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="BESTnonconvex">-</a> - - qh_BESTnonconvex - if > dim+n neighbors, qh_findbestneighbor() tests nonconvex ridges. - - notes: - It is needed because qh_findbestneighbor is slow for large facets -*/ -#define qh_BESTnonconvex 15 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="MAXnewmerges">-</a> - - qh_MAXnewmerges - if >n newmerges, qh_merge_nonconvex() calls qh_reducevertices_centrums. - - notes: - It is needed because postmerge can merge many facets at once -*/ -#define qh_MAXnewmerges 2 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="MAXnewcentrum">-</a> - - qh_MAXnewcentrum - if <= dim+n vertices (n approximates the number of merges), - reset the centrum in qh_updatetested() and qh_mergecycle_facets() - - notes: - needed to reduce cost and because centrums may move too much if - many vertices in high-d -*/ -#define qh_MAXnewcentrum 5 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="COPLANARratio">-</a> - - qh_COPLANARratio - for 3-d+ merging, qh.MINvisible is n*premerge_centrum - - notes: - for non-merging, it's DISTround -*/ -#define qh_COPLANARratio 3 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="DISToutside">-</a> - - qh_DISToutside - When is a point clearly outside of a facet? - Stops search in qh_findbestnew or qh_partitionall - qh_findbest uses qh.MINoutside since since it is only called if no merges. - - notes: - 'Qf' always searches for best facet - if !qh.MERGING, same as qh.MINoutside. - if qh_USEfindbestnew, increase value since neighboring facets may be ill-behaved - [Note: Zdelvertextot occurs normally with interior points] - RBOX 1000 s Z1 G1e-13 t1001188774 | QHULL Tv - When there is a sharp edge, need to move points to a - clearly good facet; otherwise may be lost in another partitioning. - if too big then O(n^2) behavior for partitioning in cone - if very small then important points not processed - Needed in qh_partitionall for - RBOX 1000 s Z1 G1e-13 t1001032651 | QHULL Tv - Needed in qh_findbestnew for many instances of - RBOX 1000 s Z1 G1e-13 t | QHULL Tv - - See: - qh_DISToutside -- when is a point clearly outside of a facet - qh_SEARCHdist -- when is facet coplanar with the best facet? - qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint() -*/ -#define qh_DISToutside ((qh_USEfindbestnew ? 2 : 1) * \ - fmax_((qh MERGING ? 2 : 1)*qh MINoutside, qh max_outside)) - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="RATIOnearinside">-</a> - - qh_RATIOnearinside - ratio of qh.NEARinside to qh.ONEmerge for retaining inside points for - qh_check_maxout(). - - notes: - This is overkill since do not know the correct value. - It effects whether 'Qc' reports all coplanar points - Not used for 'd' since non-extreme points are coplanar -*/ -#define qh_RATIOnearinside 5 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="SEARCHdist">-</a> - - qh_SEARCHdist - When is a facet coplanar with the best facet? - qh_findbesthorizon: all coplanar facets of the best facet need to be searched. - - See: - qh_DISToutside -- when is a point clearly outside of a facet - qh_SEARCHdist -- when is facet coplanar with the best facet? - qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint() -*/ -#define qh_SEARCHdist ((qh_USEfindbestnew ? 2 : 1) * \ - (qh max_outside + 2 * qh DISTround + fmax_( qh MINvisible, qh MAXcoplanar))); - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="USEfindbestnew">-</a> - - qh_USEfindbestnew - Always use qh_findbestnew for qh_partitionpoint, otherwise use - qh_findbestnew if merged new facet or sharpnewfacets. - - See: - qh_DISToutside -- when is a point clearly outside of a facet - qh_SEARCHdist -- when is facet coplanar with the best facet? - qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint() -*/ -#define qh_USEfindbestnew (zzval_(Ztotmerge) > 50) - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="WIDEcoplanar">-</a> - - qh_WIDEcoplanar - n*MAXcoplanar or n*MINvisible for a WIDEfacet - - if vertex is further than qh.WIDEfacet from the hyperplane - then its ridges are not counted in computing the area, and - the facet's centrum is frozen. - - notes: - qh.WIDEfacet= max(qh.MAXoutside,qh_WIDEcoplanar*qh.MAXcoplanar, - qh_WIDEcoplanar * qh.MINvisible); -*/ -#define qh_WIDEcoplanar 6 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="MAXnarrow">-</a> - - qh_MAXnarrow - max. cosine in initial hull that sets qh.NARROWhull - - notes: - If qh.NARROWhull, the initial partition does not make - coplanar points. If narrow, a coplanar point can be - coplanar to two facets of opposite orientations and - distant from the exact convex hull. - - Conservative estimate. Don't actually see problems until it is -1.0 -*/ -#define qh_MAXnarrow -0.99999999 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="WARNnarrow">-</a> - - qh_WARNnarrow - max. cosine in initial hull to warn about qh.NARROWhull - - notes: - this is a conservative estimate. - Don't actually see problems until it is -1.0. See qh-impre.htm -*/ -#define qh_WARNnarrow -0.999999999999999 - -/*-<a href="qh-user.htm#TOC" - >--------------------------------</a><a name="ZEROdelaunay">-</a> - - qh_ZEROdelaunay - a zero Delaunay facet occurs for input sites coplanar with their convex hull - the last normal coefficient of a zero Delaunay facet is within - qh_ZEROdelaunay * qh.ANGLEround of 0 - - notes: - qh_ZEROdelaunay does not allow for joggled input ('QJ'). - - You can avoid zero Delaunay facets by surrounding the input with a box. - - Use option 'PDk:-n' to explicitly define zero Delaunay facets - k= dimension of input sites (e.g., 3 for 3-d Delaunay triangulation) - n= the cutoff for zero Delaunay facets (e.g., 'PD3:-1e-12') -*/ -#define qh_ZEROdelaunay 2 - -#endif /* qh_DEFuser */ - - - |