Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:19:26

0001 /*<html><pre>  -<a                             href="qh-io_r.htm"
0002   >-------------------------------</a><a name="TOP">-</a>
0003 
0004    io_r.h
0005    declarations of Input/Output functions
0006 
0007    see README, libqhull_r.h and io_r.c
0008 
0009    Copyright (c) 1993-2020 The Geometry Center.
0010    $Id: //main/2019/qhull/src/libqhull_r/io_r.h#3 $$Change: 2953 $
0011    $DateTime: 2020/05/21 22:05:32 $$Author: bbarber $
0012 */
0013 
0014 #ifndef qhDEFio
0015 #define qhDEFio 1
0016 
0017 #include "libqhull_r.h"
0018 
0019 /*============ constants and flags ==================*/
0020 
0021 /*-<a                             href="qh-io_r.htm#TOC"
0022   >--------------------------------</a><a name="qh_MAXfirst">-</a>
0023 
0024   qh_MAXfirst
0025     maximum length of first two lines of stdin
0026 */
0027 #define qh_MAXfirst  200
0028 
0029 /*-<a                             href="qh-io_r.htm#TOC"
0030   >--------------------------------</a><a name="qh_MINradius">-</a>
0031 
0032   qh_MINradius
0033     min radius for Gp and Gv, fraction of maxcoord
0034 */
0035 #define qh_MINradius 0.02
0036 
0037 /*-<a                             href="qh-io_r.htm#TOC"
0038   >--------------------------------</a><a name="qh_GEOMepsilon">-</a>
0039 
0040   qh_GEOMepsilon
0041     adjust outer planes for 'lines closer' and geomview roundoff.
0042     This prevents bleed through.
0043 */
0044 #define qh_GEOMepsilon 2e-3
0045 
0046 /*-<a                             href="qh-io_r.htm#TOC"
0047   >--------------------------------</a><a name="qh_WHITESPACE">-</a>
0048 
0049   qh_WHITESPACE
0050     possible values of white space
0051 */
0052 #define qh_WHITESPACE " \n\t\v\r\f"
0053 
0054 
0055 /*-<a                             href="qh-io_r.htm#TOC"
0056   >--------------------------------</a><a name="RIDGE">-</a>
0057 
0058   qh_RIDGE
0059     to select which ridges to print in qh_eachvoronoi
0060 */
0061 typedef enum
0062 {
0063     qh_RIDGEall= 0, qh_RIDGEinner, qh_RIDGEouter
0064 }
0065 qh_RIDGE;
0066 
0067 /*-<a                             href="qh-io_r.htm#TOC"
0068   >--------------------------------</a><a name="printvridgeT">-</a>
0069 
0070   printvridgeT
0071     prints results of qh_printvdiagram
0072 
0073   see:
0074     <a href="io_r.c#printvridge">qh_printvridge</a> for an example
0075 */
0076 typedef void (*printvridgeT)(qhT *qh, FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
0077 
0078 /*============== -prototypes in alphabetical order =========*/
0079 
0080 #ifdef __cplusplus
0081 extern "C" {
0082 #endif
0083 
0084 void    qh_dfacet(qhT *qh, unsigned int id);
0085 void    qh_dvertex(qhT *qh, unsigned int id);
0086 int     qh_compare_facetarea(const void *p1, const void *p2);
0087 int     qh_compare_facetvisit(const void *p1, const void *p2);
0088 int     qh_compare_nummerge(const void *p1, const void *p2);
0089 void    qh_copyfilename(qhT *qh, char *filename, int size, const char* source, int length);
0090 void    qh_countfacets(qhT *qh, facetT *facetlist, setT *facets, boolT printall,
0091               int *numfacetsp, int *numsimplicialp, int *totneighborsp,
0092               int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
0093 pointT *qh_detvnorm(qhT *qh, vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
0094 setT   *qh_detvridge(qhT *qh, vertexT *vertex);
0095 setT   *qh_detvridge3(qhT *qh, vertexT *atvertex, vertexT *vertex);
0096 int     qh_eachvoronoi(qhT *qh, FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
0097 int     qh_eachvoronoi_all(qhT *qh, FILE *fp, printvridgeT printvridge, boolT isUpper, qh_RIDGE innerouter, boolT inorder);
0098 void    qh_facet2point(qhT *qh, facetT *facet, pointT **point0, pointT **point1, realT *mindist);
0099 setT   *qh_facetvertices(qhT *qh, facetT *facetlist, setT *facets, boolT allfacets);
0100 void    qh_geomplanes(qhT *qh, facetT *facet, realT *outerplane, realT *innerplane);
0101 void    qh_markkeep(qhT *qh, facetT *facetlist);
0102 setT   *qh_markvoronoi(qhT *qh, facetT *facetlist, setT *facets, boolT printall, boolT *isLowerp, int *numcentersp);
0103 void    qh_order_vertexneighbors(qhT *qh, vertexT *vertex);
0104 void    qh_prepare_output(qhT *qh);
0105 void    qh_printafacet(qhT *qh, FILE *fp, qh_PRINT format, facetT *facet, boolT printall);
0106 void    qh_printbegin(qhT *qh, FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
0107 void    qh_printcenter(qhT *qh, FILE *fp, qh_PRINT format, const char *string, facetT *facet);
0108 void    qh_printcentrum(qhT *qh, FILE *fp, facetT *facet, realT radius);
0109 void    qh_printend(qhT *qh, FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
0110 void    qh_printend4geom(qhT *qh, FILE *fp, facetT *facet, int *num, boolT printall);
0111 void    qh_printextremes(qhT *qh, FILE *fp, facetT *facetlist, setT *facets, boolT printall);
0112 void    qh_printextremes_2d(qhT *qh, FILE *fp, facetT *facetlist, setT *facets, boolT printall);
0113 void    qh_printextremes_d(qhT *qh, FILE *fp, facetT *facetlist, setT *facets, boolT printall);
0114 void    qh_printfacet(qhT *qh, FILE *fp, facetT *facet);
0115 void    qh_printfacet2math(qhT *qh, FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
0116 void    qh_printfacet2geom(qhT *qh, FILE *fp, facetT *facet, realT color[3]);
0117 void    qh_printfacet2geom_points(qhT *qh, FILE *fp, pointT *point1, pointT *point2,
0118                                facetT *facet, realT offset, realT color[3]);
0119 void    qh_printfacet3math(qhT *qh, FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
0120 void    qh_printfacet3geom_nonsimplicial(qhT *qh, FILE *fp, facetT *facet, realT color[3]);
0121 void    qh_printfacet3geom_points(qhT *qh, FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
0122 void    qh_printfacet3geom_simplicial(qhT *qh, FILE *fp, facetT *facet, realT color[3]);
0123 void    qh_printfacet3vertex(qhT *qh, FILE *fp, facetT *facet, qh_PRINT format);
0124 void    qh_printfacet4geom_nonsimplicial(qhT *qh, FILE *fp, facetT *facet, realT color[3]);
0125 void    qh_printfacet4geom_simplicial(qhT *qh, FILE *fp, facetT *facet, realT color[3]);
0126 void    qh_printfacetNvertex_nonsimplicial(qhT *qh, FILE *fp, facetT *facet, int id, qh_PRINT format);
0127 void    qh_printfacetNvertex_simplicial(qhT *qh, FILE *fp, facetT *facet, qh_PRINT format);
0128 void    qh_printfacetheader(qhT *qh, FILE *fp, facetT *facet);
0129 void    qh_printfacetridges(qhT *qh, FILE *fp, facetT *facet);
0130 void    qh_printfacets(qhT *qh, FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
0131 void    qh_printhyperplaneintersection(qhT *qh, FILE *fp, facetT *facet1, facetT *facet2,
0132                    setT *vertices, realT color[3]);
0133 void    qh_printline3geom(qhT *qh, FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
0134 void    qh_printneighborhood(qhT *qh, FILE *fp, qh_PRINT format, facetT *facetA, facetT *facetB, boolT printall);
0135 void    qh_printpoint(qhT *qh, FILE *fp, const char *string, pointT *point);
0136 void    qh_printpointid(qhT *qh, FILE *fp, const char *string, int dim, pointT *point, int id);
0137 void    qh_printpoint3(qhT *qh, FILE *fp, pointT *point);
0138 void    qh_printpoints_out(qhT *qh, FILE *fp, facetT *facetlist, setT *facets, boolT printall);
0139 void    qh_printpointvect(qhT *qh, FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
0140 void    qh_printpointvect2(qhT *qh, FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
0141 void    qh_printridge(qhT *qh, FILE *fp, ridgeT *ridge);
0142 void    qh_printspheres(qhT *qh, FILE *fp, setT *vertices, realT radius);
0143 void    qh_printvdiagram(qhT *qh, FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
0144 int     qh_printvdiagram2(qhT *qh, FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
0145 void    qh_printvertex(qhT *qh, FILE *fp, vertexT *vertex);
0146 void    qh_printvertexlist(qhT *qh, FILE *fp, const char* string, facetT *facetlist,
0147                          setT *facets, boolT printall);
0148 void    qh_printvertices(qhT *qh, FILE *fp, const char* string, setT *vertices);
0149 void    qh_printvneighbors(qhT *qh, FILE *fp, facetT* facetlist, setT *facets, boolT printall);
0150 void    qh_printvoronoi(qhT *qh, FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
0151 void    qh_printvnorm(qhT *qh, FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
0152 void    qh_printvridge(qhT *qh, FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
0153 void    qh_produce_output(qhT *qh);
0154 void    qh_produce_output2(qhT *qh);
0155 void    qh_projectdim3(qhT *qh, pointT *source, pointT *destination);
0156 int     qh_readfeasible(qhT *qh, int dim, const char *curline);
0157 coordT *qh_readpoints(qhT *qh, int *numpoints, int *dimension, boolT *ismalloc);
0158 void    qh_setfeasible(qhT *qh, int dim);
0159 boolT   qh_skipfacet(qhT *qh, facetT *facet);
0160 char   *qh_skipfilename(qhT *qh, char *filename);
0161 
0162 #ifdef __cplusplus
0163 } /* extern "C" */
0164 #endif
0165 
0166 #endif /* qhDEFio */