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 libqhull.h for user-level definitions
|
---|
10 |
|
---|
11 | see user.h for user-defineable constants
|
---|
12 |
|
---|
13 | defines internal functions for libqhull.c global.c
|
---|
14 |
|
---|
15 | Copyright (c) 1993-2012 The Geometry Center.
|
---|
16 | $Id: //main/2011/qhull/src/libqhull/qhull_a.h#3 $$Change: 1464 $
|
---|
17 | $DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
|
---|
18 |
|
---|
19 | Notes: grep for ((" and (" to catch fprintf("lkasdjf");
|
---|
20 | full parens around (x?y:z)
|
---|
21 | use '#include qhull/qhull_a.h' to avoid name clashes
|
---|
22 | */
|
---|
23 |
|
---|
24 | #ifndef qhDEFqhulla
|
---|
25 | #define qhDEFqhulla 1
|
---|
26 |
|
---|
27 | #include "libqhull.h" /* Defines data types */
|
---|
28 |
|
---|
29 | #include "stat.h"
|
---|
30 | #include "random.h"
|
---|
31 | #include "mem.h"
|
---|
32 | #include "qset.h"
|
---|
33 | #include "geom.h"
|
---|
34 | #include "merge.h"
|
---|
35 | #include "poly.h"
|
---|
36 | #include "io.h"
|
---|
37 |
|
---|
38 | #include <setjmp.h>
|
---|
39 | #include <string.h>
|
---|
40 | #include <math.h>
|
---|
41 | #include <float.h> /* some compilers will not need float.h */
|
---|
42 | #include <limits.h>
|
---|
43 | #include <time.h>
|
---|
44 | #include <ctype.h>
|
---|
45 | #include <stdio.h>
|
---|
46 | #include <stdlib.h>
|
---|
47 | /*** uncomment here and qset.c
|
---|
48 | if string.h does not define memcpy()
|
---|
49 | #include <memory.h>
|
---|
50 | */
|
---|
51 |
|
---|
52 | #if qh_CLOCKtype == 2 /* defined in user.h from libqhull.h */
|
---|
53 | #include <sys/types.h>
|
---|
54 | #include <sys/times.h>
|
---|
55 | #include <unistd.h>
|
---|
56 | #endif
|
---|
57 |
|
---|
58 | #ifdef _MSC_VER /* Microsoft Visual C++ -- warning level 4 */
|
---|
59 | #pragma warning( disable : 4100) /* unreferenced formal parameter */
|
---|
60 | #pragma warning( disable : 4127) /* conditional expression is constant */
|
---|
61 | #pragma warning( disable : 4706) /* assignment within conditional function */
|
---|
62 | #pragma warning( disable : 4996) /* function was declared deprecated(strcpy, localtime, etc.) */
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | /* ======= -macros- =========== */
|
---|
66 |
|
---|
67 | /*-<a href="qh-qhull.htm#TOC"
|
---|
68 | >--------------------------------</a><a name="traceN">-</a>
|
---|
69 |
|
---|
70 | traceN((qh ferr, 0Nnnn, "format\n", vars));
|
---|
71 | calls qh_fprintf if qh.IStracing >= N
|
---|
72 |
|
---|
73 | Add debugging traps to the end of qh_fprintf
|
---|
74 |
|
---|
75 | notes:
|
---|
76 | removing tracing reduces code size but doesn't change execution speed
|
---|
77 | */
|
---|
78 | #ifndef qh_NOtrace
|
---|
79 | #define trace0(args) {if (qh IStracing) qh_fprintf args;}
|
---|
80 | #define trace1(args) {if (qh IStracing >= 1) qh_fprintf args;}
|
---|
81 | #define trace2(args) {if (qh IStracing >= 2) qh_fprintf args;}
|
---|
82 | #define trace3(args) {if (qh IStracing >= 3) qh_fprintf args;}
|
---|
83 | #define trace4(args) {if (qh IStracing >= 4) qh_fprintf args;}
|
---|
84 | #define trace5(args) {if (qh IStracing >= 5) qh_fprintf args;}
|
---|
85 | #else /* qh_NOtrace */
|
---|
86 | #define trace0(args) {}
|
---|
87 | #define trace1(args) {}
|
---|
88 | #define trace2(args) {}
|
---|
89 | #define trace3(args) {}
|
---|
90 | #define trace4(args) {}
|
---|
91 | #define trace5(args) {}
|
---|
92 | #endif /* qh_NOtrace */
|
---|
93 |
|
---|
94 | /*-<a href="qh-qhull.htm#TOC"
|
---|
95 | >--------------------------------</a><a name="QHULL_UNUSED">-</a>
|
---|
96 |
|
---|
97 | */
|
---|
98 |
|
---|
99 | /* See Qt's qglobal.h */
|
---|
100 | #if !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
|
---|
101 | # define QHULL_OS_WIN
|
---|
102 | #elif defined(__MWERKS__) && defined(__INTEL__)
|
---|
103 | # define QHULL_OS_WIN
|
---|
104 | #endif
|
---|
105 | #if defined(__INTEL_COMPILER) && !defined(QHULL_OS_WIN)
|
---|
106 | template <typename T>
|
---|
107 | inline void qhullUnused(T &x) { (void)x; }
|
---|
108 | # define QHULL_UNUSED(x) qhullUnused(x);
|
---|
109 | #else
|
---|
110 | # define QHULL_UNUSED(x) (void)x;
|
---|
111 | #endif
|
---|
112 |
|
---|
113 | /***** -libqhull.c prototypes (alphabetical after qhull) ********************/
|
---|
114 |
|
---|
115 | void qh_qhull(void);
|
---|
116 | boolT qh_addpoint(pointT *furthest, facetT *facet, boolT checkdist);
|
---|
117 | void qh_buildhull(void);
|
---|
118 | void qh_buildtracing(pointT *furthest, facetT *facet);
|
---|
119 | void qh_build_withrestart(void);
|
---|
120 | void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet);
|
---|
121 | void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon);
|
---|
122 | pointT *qh_nextfurthest(facetT **visible);
|
---|
123 | void qh_partitionall(setT *vertices, pointT *points,int npoints);
|
---|
124 | void qh_partitioncoplanar(pointT *point, facetT *facet, realT *dist);
|
---|
125 | void qh_partitionpoint(pointT *point, facetT *facet);
|
---|
126 | void qh_partitionvisible(boolT allpoints, int *numpoints);
|
---|
127 | void qh_precision(const char *reason);
|
---|
128 | void qh_printsummary(FILE *fp);
|
---|
129 |
|
---|
130 | /***** -global.c internal prototypes (alphabetical) ***********************/
|
---|
131 |
|
---|
132 | void qh_appendprint(qh_PRINT format);
|
---|
133 | void qh_freebuild(boolT allmem);
|
---|
134 | void qh_freebuffers(void);
|
---|
135 | void qh_initbuffers(coordT *points, int numpoints, int dim, boolT ismalloc);
|
---|
136 |
|
---|
137 | /***** -stat.c internal prototypes (alphabetical) ***********************/
|
---|
138 |
|
---|
139 | void qh_allstatA(void);
|
---|
140 | void qh_allstatB(void);
|
---|
141 | void qh_allstatC(void);
|
---|
142 | void qh_allstatD(void);
|
---|
143 | void qh_allstatE(void);
|
---|
144 | void qh_allstatE2 (void);
|
---|
145 | void qh_allstatF(void);
|
---|
146 | void qh_allstatG(void);
|
---|
147 | void qh_allstatH(void);
|
---|
148 | void qh_freebuffers(void);
|
---|
149 | void qh_initbuffers(coordT *points, int numpoints, int dim, boolT ismalloc);
|
---|
150 |
|
---|
151 | #endif /* qhDEFqhulla */
|
---|