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