Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:53

0001 /*<html><pre>  -<a                             href="qh-qhull.htm"
0002   >-------------------------------</a><a name="TOP">-</a>
0003 
0004    qhull_a.h
0005    all header files for compiling qhull with non-reentrant code
0006 
0007    see qh-qhull.htm
0008 
0009    see libqhull.h for user-level definitions
0010 
0011    see user.h for user-definable constants
0012 
0013    defines internal functions for libqhull.c global.c
0014 
0015    Copyright (c) 1993-2020 The Geometry Center.
0016    $Id: //main/2019/qhull/src/libqhull/qhull_a.h#2 $$Change: 2953 $
0017    $DateTime: 2020/05/21 22:05:32 $$Author: bbarber $
0018 
0019    Notes:  grep for ((" and (" to catch fprintf("lkasdjf");
0020            full parens around (x?y:z)
0021            use '#include "libqhull/qhull_a.h"' to avoid name clashes
0022 */
0023 
0024 #ifndef qhDEFqhulla
0025 #define qhDEFqhulla 1
0026 
0027 #include "libqhull.h"  /* Includes user.h and data types */
0028 
0029 #include "stat.h"
0030 #include "random.h"
0031 #include "mem.h"
0032 #include "qset.h"
0033 #include "geom.h"
0034 #include "merge.h"
0035 #include "poly.h"
0036 #include "io.h"
0037 
0038 #include <setjmp.h>
0039 #include <string.h>
0040 #include <math.h>
0041 #include <float.h>    /* some compilers will not need float.h */
0042 #include <limits.h>
0043 #include <time.h>
0044 #include <ctype.h>
0045 #include <stdio.h>
0046 #include <stdlib.h>
0047 /*** uncomment here and qset.c
0048      if string.h does not define memcpy()
0049 #include <memory.h>
0050 */
0051 
0052 #if qh_CLOCKtype == 2  /* defined in user.h from libqhull.h */
0053 #include <sys/types.h>
0054 #include <sys/times.h>
0055 #include <unistd.h>
0056 #endif
0057 
0058 #ifdef _MSC_VER  /* Microsoft Visual C++ -- warning level 4 */
0059 #pragma warning( disable : 4100)  /* unreferenced formal parameter */
0060 #pragma warning( disable : 4127)  /* conditional expression is constant */
0061 #pragma warning( disable : 4706)  /* assignment within conditional function */
0062 #pragma warning( disable : 4996)  /* function was declared deprecated(strcpy, localtime, etc.) */
0063 #endif
0064 
0065 /* ======= -macros- =========== */
0066 
0067 /*-<a                             href="qh-qhull.htm#TOC"
0068   >--------------------------------</a><a name="traceN">-</a>
0069 
0070   traceN((qh ferr, 0Nnnn, "format\n", vars));
0071     calls qh_fprintf if qh.IStracing >= N
0072 
0073     Add debugging traps to the end of qh_fprintf
0074 
0075   notes:
0076     removing tracing reduces code size but doesn't change execution speed
0077 */
0078 #ifndef qh_NOtrace
0079 #define trace0(args) {if (qh IStracing) qh_fprintf args;}
0080 #define trace1(args) {if (qh IStracing >= 1) qh_fprintf args;}
0081 #define trace2(args) {if (qh IStracing >= 2) qh_fprintf args;}
0082 #define trace3(args) {if (qh IStracing >= 3) qh_fprintf args;}
0083 #define trace4(args) {if (qh IStracing >= 4) qh_fprintf args;}
0084 #define trace5(args) {if (qh IStracing >= 5) qh_fprintf args;}
0085 #else /* qh_NOtrace */
0086 #define trace0(args) {}
0087 #define trace1(args) {}
0088 #define trace2(args) {}
0089 #define trace3(args) {}
0090 #define trace4(args) {}
0091 #define trace5(args) {}
0092 #endif /* qh_NOtrace */
0093 
0094 /*-<a                             href="qh-qhull.htm#TOC"
0095   >--------------------------------</a><a name="QHULL_UNUSED">-</a>
0096 
0097   Define an unused variable to avoid compiler warnings
0098 
0099   Derived from Qt's corelib/global/qglobal.h
0100 
0101 */
0102 
0103 #if defined(__cplusplus) && defined(__INTEL_COMPILER) && !defined(QHULL_OS_WIN)
0104 template <typename T>
0105 inline void qhullUnused(T &x) { (void)x; }
0106 #  define QHULL_UNUSED(x) qhullUnused(x);
0107 #else
0108 #  define QHULL_UNUSED(x) (void)x;
0109 #endif
0110 
0111 /***** -libqhull.c prototypes (alphabetical after qhull) ********************/
0112 
0113 void    qh_qhull(void);
0114 boolT   qh_addpoint(pointT *furthest, facetT *facet, boolT checkdist);
0115 void    qh_build_withrestart(void);
0116 vertexT *qh_buildcone(pointT *furthest, facetT *facet, int goodhorizon, facetT **retryfacet);
0117 boolT   qh_buildcone_mergepinched(vertexT *apex, facetT *facet, facetT **retryfacet);
0118 boolT   qh_buildcone_onlygood(vertexT *apex, int goodhorizon);
0119 void    qh_buildhull(void);
0120 void    qh_buildtracing(pointT *furthest, facetT *facet);
0121 void    qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet);
0122 void    qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon);
0123 pointT *qh_nextfurthest(facetT **visible);
0124 void    qh_partitionall(setT *vertices, pointT *points,int npoints);
0125 void    qh_partitioncoplanar(pointT *point, facetT *facet, realT *dist, boolT allnew);
0126 void    qh_partitionpoint(pointT *point, facetT *facet);
0127 void    qh_partitionvisible(boolT allpoints, int *numpoints);
0128 void    qh_joggle_restart(const char *reason);
0129 void    qh_printsummary(FILE *fp);
0130 
0131 /***** -global.c internal prototypes (alphabetical) ***********************/
0132 
0133 void    qh_appendprint(qh_PRINT format);
0134 void    qh_freebuild(boolT allmem);
0135 void    qh_freebuffers(void);
0136 void    qh_initbuffers(coordT *points, int numpoints, int dim, boolT ismalloc);
0137 
0138 /***** -stat.c internal prototypes (alphabetical) ***********************/
0139 
0140 void    qh_allstatA(void);
0141 void    qh_allstatB(void);
0142 void    qh_allstatC(void);
0143 void    qh_allstatD(void);
0144 void    qh_allstatE(void);
0145 void    qh_allstatE2(void);
0146 void    qh_allstatF(void);
0147 void    qh_allstatG(void);
0148 void    qh_allstatH(void);
0149 void    qh_freebuffers(void);
0150 void    qh_initbuffers(coordT *points, int numpoints, int dim, boolT ismalloc);
0151 
0152 #endif /* qhDEFqhulla */