00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef qhDEFqhulla
00022 #define qhDEFqhulla
00023
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <setjmp.h>
00027 #include <string.h>
00028 #include <math.h>
00029 #include <float.h>
00030 #include <limits.h>
00031 #include <time.h>
00032 #include <ctype.h>
00033
00034
00035
00036
00037
00038 #include "qhull.h"
00039 #include "mem.h"
00040 #include "set.h"
00041 #include "geom.h"
00042 #include "merge.h"
00043 #include "poly.h"
00044 #include "io.h"
00045 #include "stat.h"
00046
00047 #ifdef _MSC_VER
00048 #pragma warning( disable : 4056)
00049 #pragma warning( disable : 4146)
00050 #pragma warning( disable : 4244)
00051 #pragma warning( disable : 4305)
00052 #endif
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #ifndef qh_NOtrace
00066 #define trace0(args) {if (qh IStracing) fprintf args;}
00067 #define trace1(args) {if (qh IStracing >= 1) fprintf args;}
00068 #define trace2(args) {if (qh IStracing >= 2) fprintf args;}
00069 #define trace3(args) {if (qh IStracing >= 3) fprintf args;}
00070 #define trace4(args) {if (qh IStracing >= 4) fprintf args;}
00071 #define trace5(args) {if (qh IStracing >= 5) fprintf args;}
00072 #else
00073 #define trace0(args) {}
00074 #define trace1(args) {}
00075 #define trace2(args) {}
00076 #define trace3(args) {}
00077 #define trace4(args) {}
00078 #define trace5(args) {}
00079 #endif
00080
00081
00082
00083 void qh_qhull (void);
00084 boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
00085 void qh_buildhull(void);
00086 void qh_buildtracing (pointT *furthest, facetT *facet);
00087 void qh_build_withrestart (void);
00088 void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet);
00089 void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon);
00090 pointT *qh_nextfurthest (facetT **visible);
00091 void qh_partitionall(setT *vertices, pointT *points,int npoints);
00092 void qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist);
00093 void qh_partitionpoint (pointT *point, facetT *facet);
00094 void qh_partitionvisible(boolT allpoints, int *numpoints);
00095 void qh_precision (char *reason);
00096 void qh_printsummary(FILE *fp);
00097
00098
00099
00100 void qh_appendprint (qh_PRINT format);
00101 void qh_freebuild (boolT allmem);
00102 void qh_freebuffers (void);
00103 void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
00104 void qh_option (char *option, int *i, realT *r);
00105 int qh_strtol (const char *s, char **endp);
00106 double qh_strtod (const char *s, char **endp);
00107
00108
00109
00110 void qh_allstatA (void);
00111 void qh_allstatB (void);
00112 void qh_allstatC (void);
00113 void qh_allstatD (void);
00114 void qh_allstatE (void);
00115 void qh_allstatF (void);
00116 void qh_freebuffers (void);
00117 void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
00118
00119 #endif