00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef qhDEFio
00015 #define qhDEFio 1
00016
00017 #include "libqhull.h"
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #define qh_MAXfirst 200
00028
00029
00030
00031
00032
00033
00034
00035 #define qh_MINradius 0.02
00036
00037
00038
00039
00040
00041
00042
00043
00044 #define qh_GEOMepsilon 2e-3
00045
00046
00047
00048
00049
00050
00051
00052 #define qh_WHITESPACE " \n\t\v\r\f"
00053
00054
00055
00056
00057
00058
00059
00060
00061 typedef enum
00062 {
00063 qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter
00064 }
00065 qh_RIDGE;
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
00077
00078
00079
00080 void dfacet(unsigned id);
00081 void dvertex(unsigned id);
00082 int qh_compare_facetarea(const void *p1, const void *p2);
00083 int qh_compare_facetmerge(const void *p1, const void *p2);
00084 int qh_compare_facetvisit(const void *p1, const void *p2);
00085 int qh_compare_vertexpoint(const void *p1, const void *p2);
00086 void qh_copyfilename(char *filename, int size, const char* source, int length);
00087 void qh_countfacets(facetT *facetlist, setT *facets, boolT printall,
00088 int *numfacetsp, int *numsimplicialp, int *totneighborsp,
00089 int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
00090 pointT *qh_detvnorm(vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
00091 setT *qh_detvridge(vertexT *vertex);
00092 setT *qh_detvridge3 (vertexT *atvertex, vertexT *vertex);
00093 int qh_eachvoronoi(FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
00094 int qh_eachvoronoi_all(FILE *fp, printvridgeT printvridge, boolT isUpper, qh_RIDGE innerouter, boolT inorder);
00095 void qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist);
00096 setT *qh_facetvertices(facetT *facetlist, setT *facets, boolT allfacets);
00097 void qh_geomplanes(facetT *facet, realT *outerplane, realT *innerplane);
00098 void qh_markkeep(facetT *facetlist);
00099 setT *qh_markvoronoi(facetT *facetlist, setT *facets, boolT printall, boolT *isLowerp, int *numcentersp);
00100 void qh_order_vertexneighbors(vertexT *vertex);
00101 void qh_prepare_output(void);
00102 void qh_printafacet(FILE *fp, qh_PRINT format, facetT *facet, boolT printall);
00103 void qh_printbegin(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
00104 void qh_printcenter(FILE *fp, qh_PRINT format, const char *string, facetT *facet);
00105 void qh_printcentrum(FILE *fp, facetT *facet, realT radius);
00106 void qh_printend(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
00107 void qh_printend4geom(FILE *fp, facetT *facet, int *num, boolT printall);
00108 void qh_printextremes(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
00109 void qh_printextremes_2d(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
00110 void qh_printextremes_d(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
00111 void qh_printfacet(FILE *fp, facetT *facet);
00112 void qh_printfacet2math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
00113 void qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]);
00114 void qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
00115 facetT *facet, realT offset, realT color[3]);
00116 void qh_printfacet3math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
00117 void qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
00118 void qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
00119 void qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
00120 void qh_printfacet3vertex(FILE *fp, facetT *facet, qh_PRINT format);
00121 void qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
00122 void qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
00123 void qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, qh_PRINT format);
00124 void qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, qh_PRINT format);
00125 void qh_printfacetheader(FILE *fp, facetT *facet);
00126 void qh_printfacetridges(FILE *fp, facetT *facet);
00127 void qh_printfacets(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
00128 void qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
00129 setT *vertices, realT color[3]);
00130 void qh_printneighborhood(FILE *fp, qh_PRINT format, facetT *facetA, facetT *facetB, boolT printall);
00131 void qh_printline3geom(FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
00132 void qh_printpoint(FILE *fp, const char *string, pointT *point);
00133 void qh_printpointid(FILE *fp, const char *string, int dim, pointT *point, int id);
00134 void qh_printpoint3 (FILE *fp, pointT *point);
00135 void qh_printpoints_out(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
00136 void qh_printpointvect(FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
00137 void qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
00138 void qh_printridge(FILE *fp, ridgeT *ridge);
00139 void qh_printspheres(FILE *fp, setT *vertices, realT radius);
00140 void qh_printvdiagram(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
00141 int qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
00142 void qh_printvertex(FILE *fp, vertexT *vertex);
00143 void qh_printvertexlist(FILE *fp, const char* string, facetT *facetlist,
00144 setT *facets, boolT printall);
00145 void qh_printvertices(FILE *fp, const char* string, setT *vertices);
00146 void qh_printvneighbors(FILE *fp, facetT* facetlist, setT *facets, boolT printall);
00147 void qh_printvoronoi(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
00148 void qh_printvnorm(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
00149 void qh_printvridge(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
00150 void qh_produce_output(void);
00151 void qh_produce_output2(void);
00152 void qh_projectdim3 (pointT *source, pointT *destination);
00153 int qh_readfeasible(int dim, const char *curline);
00154 coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
00155 void qh_setfeasible(int dim);
00156 boolT qh_skipfacet(facetT *facet);
00157 char *qh_skipfilename(char *filename);
00158
00159 #endif