00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef qhDEFmerge
00015 #define qhDEFmerge 1
00016
00017 #include "libqhull.h"
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #define qh_ANGLEredundant 6.0
00029
00030
00031
00032
00033
00034
00035
00036 #define qh_ANGLEdegen 5.0
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #define qh_ANGLEconcave 1.5
00049
00050
00051
00052
00053
00054
00055
00056 typedef enum {
00057 MRGnone= 0,
00058 MRGcoplanar,
00059 MRGanglecoplanar,
00060
00061 MRGconcave,
00062 MRGflip,
00063 MRGridge,
00064
00065 MRGdegen,
00066 MRGredundant,
00067
00068 MRGmirror,
00069 ENDmrg
00070 } mergeType;
00071
00072
00073
00074
00075
00076
00077
00078 #define qh_MERGEapex True
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 typedef struct mergeT mergeT;
00090 struct mergeT {
00091 realT angle;
00092 facetT *facet1;
00093 facetT *facet2;
00094 mergeType type;
00095 };
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 #define FOREACHmerge_( merges ) FOREACHsetelement_(mergeT, merges, merge)
00113
00114
00115
00116 void qh_premerge(vertexT *apex, realT maxcentrum, realT maxangle);
00117 void qh_postmerge(const char *reason, realT maxcentrum, realT maxangle,
00118 boolT vneighbors);
00119 void qh_all_merges(boolT othermerge, boolT vneighbors);
00120 void qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle);
00121 setT *qh_basevertices( facetT *samecycle);
00122 void qh_checkconnect(void );
00123 boolT qh_checkzero(boolT testall);
00124 int qh_compareangle(const void *p1, const void *p2);
00125 int qh_comparemerge(const void *p1, const void *p2);
00126 int qh_comparevisit(const void *p1, const void *p2);
00127 void qh_copynonconvex(ridgeT *atridge);
00128 void qh_degen_redundant_facet(facetT *facet);
00129 void qh_degen_redundant_neighbors(facetT *facet, facetT *delfacet);
00130 vertexT *qh_find_newvertex(vertexT *oldvertex, setT *vertices, setT *ridges);
00131 void qh_findbest_test(boolT testcentrum, facetT *facet, facetT *neighbor,
00132 facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp);
00133 facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp);
00134 void qh_flippedmerges(facetT *facetlist, boolT *wasmerge);
00135 void qh_forcedmerges( boolT *wasmerge);
00136 void qh_getmergeset(facetT *facetlist);
00137 void qh_getmergeset_initial(facetT *facetlist);
00138 void qh_hashridge(setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex);
00139 ridgeT *qh_hashridge_find(setT *hashtable, int hashsize, ridgeT *ridge,
00140 vertexT *vertex, vertexT *oldvertex, int *hashslot);
00141 void qh_makeridges(facetT *facet);
00142 void qh_mark_dupridges(facetT *facetlist);
00143 void qh_maydropneighbor(facetT *facet);
00144 int qh_merge_degenredundant(void);
00145 void qh_merge_nonconvex( facetT *facet1, facetT *facet2, mergeType mergetype);
00146 void qh_mergecycle(facetT *samecycle, facetT *newfacet);
00147 void qh_mergecycle_all(facetT *facetlist, boolT *wasmerge);
00148 void qh_mergecycle_facets( facetT *samecycle, facetT *newfacet);
00149 void qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet);
00150 void qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet);
00151 void qh_mergecycle_vneighbors( facetT *samecycle, facetT *newfacet);
00152 void qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex);
00153 void qh_mergefacet2d(facetT *facet1, facetT *facet2);
00154 void qh_mergeneighbors(facetT *facet1, facetT *facet2);
00155 void qh_mergeridges(facetT *facet1, facetT *facet2);
00156 void qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex);
00157 void qh_mergevertex_del(vertexT *vertex, facetT *facet1, facetT *facet2);
00158 void qh_mergevertex_neighbors(facetT *facet1, facetT *facet2);
00159 void qh_mergevertices(setT *vertices1, setT **vertices);
00160 setT *qh_neighbor_intersections(vertexT *vertex);
00161 void qh_newvertices(setT *vertices);
00162 boolT qh_reducevertices(void);
00163 vertexT *qh_redundant_vertex(vertexT *vertex);
00164 boolT qh_remove_extravertices(facetT *facet);
00165 vertexT *qh_rename_sharedvertex(vertexT *vertex, facetT *facet);
00166 void qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex);
00167 void qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges,
00168 facetT *oldfacet, facetT *neighborA);
00169 boolT qh_test_appendmerge(facetT *facet, facetT *neighbor);
00170 boolT qh_test_vneighbors(void );
00171 void qh_tracemerge(facetT *facet1, facetT *facet2);
00172 void qh_tracemerging(void);
00173 void qh_updatetested( facetT *facet1, facetT *facet2);
00174 setT *qh_vertexridges(vertexT *vertex);
00175 void qh_vertexridges_facet(vertexT *vertex, facetT *facet, setT **ridges);
00176 void qh_willdelete(facetT *facet, facetT *replace);
00177
00178 #endif