1 |
/*<html><pre> -<a href="qh-qhull.htm" |
2 |
>-------------------------------</a><a name="TOP">-</a> |
3 |
|
4 |
qhull_a.h |
5 |
all header files for compiling qhull |
6 |
|
7 |
see qh-qhull.htm |
8 |
|
9 |
see qhull.h for user-level definitions |
10 |
|
11 |
see user.h for user-defineable constants |
12 |
|
13 |
defines internal functions for qhull.c global.c |
14 |
|
15 |
copyright (c) 1993-2003, The Geometry Center |
16 |
|
17 |
Notes: grep for ((" and (" to catch fprintf("lkasdjf"); |
18 |
full parens around (x?y:z), use |
19 |
'#include qhull/qhull_a.h' to avoid name clashes |
20 |
*/ |
21 |
|
22 |
#ifndef qhDEFqhulla |
23 |
#define qhDEFqhulla |
24 |
|
25 |
#include <stdio.h> |
26 |
#include <stdlib.h> |
27 |
#include <setjmp.h> |
28 |
#include <string.h> |
29 |
#include <math.h> |
30 |
/* some compilers will not need float.h */ |
31 |
#include <float.h> |
32 |
#include <limits.h> |
33 |
#include <time.h> |
34 |
#include <ctype.h> |
35 |
/*** uncomment here and qset.c if string.h does not define memcpy() */ |
36 |
/* #include <memory.h> */ |
37 |
#include "config.h" |
38 |
#include "QuickHull/qhull.h" |
39 |
#include "QuickHull/mem.h" |
40 |
#include "QuickHull/qset.h" |
41 |
#include "QuickHull/geom.h" |
42 |
#include "QuickHull/merge.h" |
43 |
#include "QuickHull/poly.h" |
44 |
#include "QuickHull/io.h" |
45 |
#include "QuickHull/stat.h" |
46 |
|
47 |
#if qh_CLOCKtype == 2 |
48 |
/* defined in user.h from qhull.h */ |
49 |
#include <sys/types.h> |
50 |
#include <sys/times.h> |
51 |
#include <unistd.h> |
52 |
#endif |
53 |
|
54 |
#ifdef _MSC_VER |
55 |
/* Microsoft Visual C++ */ |
56 |
#pragma warning( disable : 4056) /* float constant expression. Looks like a compiler bug */ |
57 |
#pragma warning( disable : 4146) /* unary minus applied to unsigned type */ |
58 |
#pragma warning( disable : 4244) /* conversion from 'unsigned long' to 'real' */ |
59 |
#pragma warning( disable : 4305) /* conversion from 'const double' to 'float' */ |
60 |
#endif |
61 |
|
62 |
/* ======= -macros- =========== */ |
63 |
|
64 |
/*-<a href="qh-qhull.htm#TOC" |
65 |
>--------------------------------</a><a name="traceN">-</a> |
66 |
|
67 |
traceN((fp.ferr, "format\n", vars)); |
68 |
calls fprintf if qh.IStracing >= N |
69 |
|
70 |
notes: |
71 |
removing tracing reduces code size but doesn't change execution speed |
72 |
*/ |
73 |
#ifndef qh_NOtrace |
74 |
#define trace0(args) {if (qh IStracing) fprintf args;} |
75 |
#define trace1(args) {if (qh IStracing >= 1) fprintf args;} |
76 |
#define trace2(args) {if (qh IStracing >= 2) fprintf args;} |
77 |
#define trace3(args) {if (qh IStracing >= 3) fprintf args;} |
78 |
#define trace4(args) {if (qh IStracing >= 4) fprintf args;} |
79 |
#define trace5(args) {if (qh IStracing >= 5) fprintf args;} |
80 |
#else |
81 |
#define trace0(args) {} |
82 |
#define trace1(args) {} |
83 |
#define trace2(args) {} |
84 |
#define trace3(args) {} |
85 |
#define trace4(args) {} |
86 |
#define trace5(args) {} |
87 |
#endif |
88 |
|
89 |
/***** -qhull.c prototypes (alphabetical after qhull) ********************/ |
90 |
|
91 |
void qh_qhull (void); |
92 |
boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist); |
93 |
void qh_buildhull(void); |
94 |
void qh_buildtracing (pointT *furthest, facetT *facet); |
95 |
void qh_build_withrestart (void); |
96 |
void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet); |
97 |
void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon); |
98 |
pointT *qh_nextfurthest (facetT **visible); |
99 |
void qh_partitionall(setT *vertices, pointT *points,int npoints); |
100 |
void qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist); |
101 |
void qh_partitionpoint (pointT *point, facetT *facet); |
102 |
void qh_partitionvisible(boolT allpoints, int *numpoints); |
103 |
void qh_precision (char *reason); |
104 |
void qh_printsummary(FILE *fp); |
105 |
|
106 |
/***** -global.c internal prototypes (alphabetical) ***********************/ |
107 |
|
108 |
void qh_appendprint (qh_PRINT format); |
109 |
void qh_freebuild (boolT allmem); |
110 |
void qh_freebuffers (void); |
111 |
void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc); |
112 |
int qh_strtol (const char *s, char **endp); |
113 |
double qh_strtod (const char *s, char **endp); |
114 |
|
115 |
/***** -stat.c internal prototypes (alphabetical) ***********************/ |
116 |
|
117 |
void qh_allstatA (void); |
118 |
void qh_allstatB (void); |
119 |
void qh_allstatC (void); |
120 |
void qh_allstatD (void); |
121 |
void qh_allstatE (void); |
122 |
void qh_allstatE2 (void); |
123 |
void qh_allstatF (void); |
124 |
void qh_allstatG (void); |
125 |
void qh_allstatH (void); |
126 |
void qh_freebuffers (void); |
127 |
void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc); |
128 |
|
129 |
#endif |