27 #define fabs_( a ) ((( a ) < 0 ) ? -( a ):( a )) 35 #define fmax_( a,b ) ( ( a ) < ( b ) ? ( b ) : ( a ) ) 43 #define fmin_( a,b ) ( ( a ) > ( b ) ? ( b ) : ( a ) ) 51 #define maximize_( maxval, val ) { if (( maxval ) < ( val )) ( maxval )= ( val ); } 59 #define minimize_( minval, val ) { if (( minval ) > ( val )) ( minval )= ( val ); } 69 #define det2_( a1,a2,b1,b2 ) (( a1 )*( b2 ) - ( a2 )*( b1 )) 80 #define det3_( a1,a2,a3,b1,b2,b3,c1,c2,c3 ) ( ( a1 )*det2_( b2,b3,c2,c3 ) \ 81 - ( b1 )*det2_( a2,a3,c2,c3 ) + ( c1 )*det2_( a2,a3,b2,b3 ) ) 94 #define dX( p1,p2 ) ( *( rows[p1] ) - *( rows[p2] )) 95 #define dY( p1,p2 ) ( *( rows[p1]+1 ) - *( rows[p2]+1 )) 96 #define dZ( p1,p2 ) ( *( rows[p1]+2 ) - *( rows[p2]+2 )) 97 #define dW( p1,p2 ) ( *( rows[p1]+3 ) - *( rows[p2]+3 )) 109 boolT bestoutside,
boolT *isoutside,
int *numpart);
160 int numpoints,
int dim,
realT *newpoints,
int newdim);
void qh_sethyperplane_gauss(int dim, coordT **rows, pointT *point0, boolT toporient, coordT *normal, coordT *offset, boolT *nearzero)
realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist)
void qh_setfacetplane(facetT *newfacets)
coordT * qh_copypoints(coordT *points, int numpoints, int dimension)
boolT qh_gram_schmidt(int dim, realT **rows)
void qh_joggleinput(void)
void qh_scalepoints(pointT *points, int numpoints, int dim, realT *newlows, realT *newhighs)
coordT * qh_sethalfspace_all(int dim, int count, coordT *halfspaces, pointT *feasible)
facetT * qh_findbestnew(pointT *point, facetT *startfacet, realT *dist, boolT bestoutside, boolT *isoutside, int *numpart)
realT qh_distnorm(int dim, pointT *point, pointT *normal, realT *offsetp)
pointT * qh_getcenter(setT *vertices)
void qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero)
boolT qh_sethalfspace(int dim, coordT *coords, coordT **nextp, coordT *normal, coordT *offset, coordT *feasible)
boolT qh_inthresholds(coordT *normal, realT *angle)
realT qh_facetarea(facetT *facet)
facetT * qh_findgooddist(pointT *point, facetT *facetA, realT *distp, facetT **facetlist)
void qh_normalize(coordT *normal, int dim, boolT toporient)
boolT qh_sharpnewfacets(void)
facetT * qh_findbesthorizon(boolT ischeckmax, pointT *point, facetT *startfacet, boolT noupper, realT *bestdist, int *numpart)
void qh_printpoints(FILE *fp, const char *string, setT *points)
facetT * qh_findbest(pointT *point, facetT *startfacet, boolT bestoutside, boolT isnewfacets, boolT noupper, realT *dist, boolT *isoutside, int *numpart)
pointT * qh_projectpoint(pointT *point, facetT *facet, realT dist)
realT qh_facetarea_simplex(int dim, coordT *apex, setT *vertices, vertexT *notvertex, boolT toporient, coordT *normal, realT *offset)
realT qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero)
int qh_mindiff(realT *vecA, realT *vecB, int dim)
void qh_printmatrix(FILE *fp, const char *string, realT **rows, int numrow, int numcol)
boolT qh_orientoutside(facetT *facet)
coordT qh_pointdist(pointT *point1, pointT *point2, int dim)
pointT * qh_voronoi_center(int dim, setT *points)
pointT * qh_getcentrum(facetT *facet)
void qh_sethyperplane_det(int dim, coordT **rows, coordT *point0, boolT toporient, coordT *normal, realT *offset, boolT *nearzero)
void qh_projectinput(void)
void qh_outerinner(facetT *facet, realT *outerplane, realT *innerplane)
realT qh_detjoggle(pointT *points, int numpoints, int dimension)
void qh_scalelast(coordT *points, int numpoints, int dim, coordT low, coordT high, coordT newhigh)
realT qh_getangle(pointT *vect1, pointT *vect2)
void qh_rotateinput(realT **rows)
void qh_rotatepoints(realT *points, int numpoints, int dim, realT **rows)
realT * qh_maxabsval(realT *normal, int dim)
realT qh_divzero(realT numer, realT denom, realT mindenom1, boolT *zerodiv)
realT qh_determinant(realT **rows, int dim, boolT *nearzero)
void qh_distplane(pointT *point, facetT *facet, realT *dist)
void qh_getarea(facetT *facetlist)
setT * qh_maxmin(pointT *points, int numpoints, int dimension)
void qh_backnormal(realT **rows, int numrow, int numcol, boolT sign, coordT *normal, boolT *nearzero)
void qh_detroundoff(void)
void qh_projectpoints(signed char *project, int n, realT *points, int numpoints, int dim, realT *newpoints, int newdim)
void qh_crossproduct(int dim, realT vecA[3], realT vecB[3], realT vecC[3])
void qh_normalize2(coordT *normal, int dim, boolT toporient, realT *minnorm, boolT *ismin)
realT qh_minabsval(realT *normal, int dim)
void qh_maxsimplex(int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex)
realT qh_distround(int dimension, realT maxabs, realT maxsumabs)
pointT * qh_facetcenter(setT *vertices)