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