Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:44:14

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