File indexing completed on 2025-01-18 10:01:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef qhDEFmerge
0015 #define qhDEFmerge 1
0016
0017 #include "libqhull.h"
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #define qh_ANGLEnone 2.0
0029
0030
0031
0032
0033
0034
0035
0036
0037 typedef enum {
0038 MRGnone= 0,
0039
0040
0041 MRGcoplanar,
0042 MRGanglecoplanar,
0043 MRGconcave,
0044 MRGconcavecoplanar,
0045 MRGtwisted,
0046
0047 MRGflip,
0048
0049 MRGdupridge,
0050
0051 MRGsubridge,
0052 MRGvertices,
0053
0054 MRGdegen,
0055 MRGredundant,
0056
0057 MRGmirror,
0058
0059
0060 MRGcoplanarhorizon,
0061 ENDmrg
0062 } mergeType;
0063
0064
0065
0066
0067
0068
0069
0070 #define qh_MERGEapex True
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081 typedef struct mergeT mergeT;
0082 struct mergeT {
0083 realT angle;
0084
0085 realT distance;
0086 facetT *facet1;
0087 facetT *facet2;
0088 vertexT *vertex1;
0089 vertexT *vertex2;
0090 ridgeT *ridge1;
0091 ridgeT *ridge2;
0092 mergeType mergetype;
0093 };
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110 #define FOREACHmerge_(merges) FOREACHsetelement_(mergeT, merges, merge)
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122 #define FOREACHmergeA_(merges) FOREACHsetelement_(mergeT, merges, mergeA)
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137 #define FOREACHmerge_i_(mergeset) FOREACHsetelement_i_(mergeT, mergeset, merge)
0138
0139
0140
0141 void qh_premerge(int apexpointid, realT maxcentrum, realT maxangle);
0142 void qh_postmerge(const char *reason, realT maxcentrum, realT maxangle,
0143 boolT vneighbors);
0144 void qh_all_merges(boolT othermerge, boolT vneighbors);
0145 void qh_all_vertexmerges(int apexpointid, facetT *facet, facetT **retryfacet);
0146 void qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, coordT dist, realT angle);
0147 void qh_appendvertexmerge(vertexT *vertex, vertexT *destination, mergeType mergetype, realT distance, ridgeT *ridge1, ridgeT *ridge2);
0148 setT *qh_basevertices(facetT *samecycle);
0149 void qh_check_dupridge(facetT *facet1, realT dist1, facetT *facet2, realT dist2);
0150 void qh_checkconnect(void );
0151 void qh_checkdelfacet(facetT *facet, setT *mergeset);
0152 void qh_checkdelridge(void );
0153 boolT qh_checkzero(boolT testall);
0154 int qh_compare_anglemerge(const void *p1, const void *p2);
0155 int qh_compare_facetmerge(const void *p1, const void *p2);
0156 int qh_comparevisit(const void *p1, const void *p2);
0157 void qh_copynonconvex(ridgeT *atridge);
0158 void qh_degen_redundant_facet(facetT *facet);
0159 void qh_drop_mergevertex(mergeT *merge);
0160 void qh_delridge_merge(ridgeT *ridge);
0161 vertexT *qh_find_newvertex(vertexT *oldvertex, setT *vertices, setT *ridges);
0162 vertexT *qh_findbest_pinchedvertex(mergeT *merge, vertexT *apex, vertexT **pinchedp, realT *distp );
0163 vertexT *qh_findbest_ridgevertex(ridgeT *ridge, vertexT **pinchedp, coordT *distp);
0164 void qh_findbest_test(boolT testcentrum, facetT *facet, facetT *neighbor,
0165 facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp);
0166 facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp);
0167 void qh_flippedmerges(facetT *facetlist, boolT *wasmerge);
0168 void qh_forcedmerges(boolT *wasmerge);
0169 void qh_freemergesets(void);
0170 void qh_getmergeset(facetT *facetlist);
0171 void qh_getmergeset_initial(facetT *facetlist);
0172 boolT qh_getpinchedmerges(vertexT *apex, coordT maxdupdist, boolT *iscoplanar );
0173 boolT qh_hasmerge(setT *mergeset, mergeType type, facetT *facetA, facetT *facetB);
0174 void qh_hashridge(setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex);
0175 ridgeT *qh_hashridge_find(setT *hashtable, int hashsize, ridgeT *ridge,
0176 vertexT *vertex, vertexT *oldvertex, int *hashslot);
0177 void qh_initmergesets(void);
0178 void qh_makeridges(facetT *facet);
0179 void qh_mark_dupridges(facetT *facetlist, boolT allmerges);
0180 void qh_maybe_duplicateridge(ridgeT *ridge);
0181 void qh_maybe_duplicateridges(facetT *facet);
0182 void qh_maydropneighbor(facetT *facet);
0183 int qh_merge_degenredundant(void);
0184 void qh_merge_nonconvex(facetT *facet1, facetT *facet2, mergeType mergetype);
0185 void qh_merge_pinchedvertices(int apexpointid );
0186 void qh_merge_twisted(facetT *facet1, facetT *facet2);
0187 void qh_mergecycle(facetT *samecycle, facetT *newfacet);
0188 void qh_mergecycle_all(facetT *facetlist, boolT *wasmerge);
0189 void qh_mergecycle_facets(facetT *samecycle, facetT *newfacet);
0190 void qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet);
0191 void qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet);
0192 void qh_mergecycle_vneighbors(facetT *samecycle, facetT *newfacet);
0193 void qh_mergefacet(facetT *facet1, facetT *facet2, mergeType mergetype, realT *mindist, realT *maxdist, boolT mergeapex);
0194 void qh_mergefacet2d(facetT *facet1, facetT *facet2);
0195 void qh_mergeneighbors(facetT *facet1, facetT *facet2);
0196 void qh_mergeridges(facetT *facet1, facetT *facet2);
0197 void qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex);
0198 void qh_mergevertex_del(vertexT *vertex, facetT *facet1, facetT *facet2);
0199 void qh_mergevertex_neighbors(facetT *facet1, facetT *facet2);
0200 void qh_mergevertices(setT *vertices1, setT **vertices);
0201 setT *qh_neighbor_intersections(vertexT *vertex);
0202 setT *qh_neighbor_vertices(vertexT *vertex, setT *subridge);
0203 void qh_neighbor_vertices_facet(vertexT *vertexA, facetT *facet, setT **vertices);
0204 void qh_newvertices(setT *vertices);
0205 mergeT *qh_next_vertexmerge(void);
0206 facetT *qh_opposite_horizonfacet(mergeT *merge, vertexT **vertex);
0207 boolT qh_reducevertices(void);
0208 vertexT *qh_redundant_vertex(vertexT *vertex);
0209 boolT qh_remove_extravertices(facetT *facet);
0210 void qh_remove_mergetype(setT *mergeset, mergeType type);
0211 void qh_rename_adjacentvertex(vertexT *oldvertex, vertexT *newvertex, realT dist);
0212 vertexT *qh_rename_sharedvertex(vertexT *vertex, facetT *facet);
0213 boolT qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex);
0214 void qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges,
0215 facetT *oldfacet, facetT *neighborA);
0216 boolT qh_test_appendmerge(facetT *facet, facetT *neighbor, boolT simplicial);
0217 void qh_test_degen_neighbors(facetT *facet);
0218 boolT qh_test_centrum_merge(facetT *facet, facetT *neighbor, realT angle, boolT okangle);
0219 boolT qh_test_nonsimplicial_merge(facetT *facet, facetT *neighbor, realT angle, boolT okangle);
0220 void qh_test_redundant_neighbors(facetT *facet);
0221 boolT qh_test_vneighbors(void );
0222 void qh_tracemerge(facetT *facet1, facetT *facet2, mergeType mergetype);
0223 void qh_tracemerging(void);
0224 void qh_undo_newfacets(void);
0225 void qh_updatetested(facetT *facet1, facetT *facet2);
0226 setT *qh_vertexridges(vertexT *vertex, boolT allneighbors);
0227 void qh_vertexridges_facet(vertexT *vertex, facetT *facet, setT **ridges);
0228 void qh_willdelete(facetT *facet, facetT *replace);
0229
0230 #endif