Qhull functions, macros, and data structures

Up: Home page for Qhull
Up: Qhull manual: Table of Contents
Up: Programs • Options • Output • Formats • Geomview • Print • Qhull • Precision • Trace • Functions
Up: Qhull code
To: Qhull files
To: Geom • Global • Io • Mem • Merge • Poly • Qhull • Set • Stat • User

# Qhull functions, macros, and data structures

> The following sections provide an overview and index to Qhull's functions, macros, and data structures. Each section starts with an introduction. See also Calling Qhull from C programs and Calling Qhull from C++ programs.

> Qhull uses the following conventions:

> > - in code, global variables start with "qh "
> > - in documentation, global variables start with 'qh.'
> > - constants start with an upper case word
> > - important globals include an '_'
> > - functions, macros, and constants start with "qh_"
> > - data types end in "T"
> > - macros with arguments end in "_"
> > - iterators are macros that use local variables
> > - iterators for sets start with "FOREACH"
> > - iterators for lists start with "FORALL"
> > - qhull options are in single quotes (e.g., 'Pdn')
> > - lists are sorted alphabetically
> > - preprocessor directives on left margin for older compilers

> When reading the code, please note that the global data structure, 'qh', is a macro. It either expands to "qh_qh." or to "qh_qh->". The later is used for applications which run concurrent calls to qh_qhull().

> When reading code with an editor, a search for '"function' will locate the header of qh_function. A search for '* function' will locate the tail of qh_function.

> A useful starting point is libqhull.h. It defines most of Qhull data structures and top-level functions. Search for 'PFn' to determine the corresponding constant in Qhull. Search for 'Fp' to determine the corresponding qh_PRINT... constant. Search io.c to learn how the print function is implemented.

> If your web browser is configured for .c and .h files, the function, macro, and data type links go to the corresponding source location. To configure your web browser for .c and .h files.

> - In the Download Preferences or Options panel, add file extensions 'c' and 'h' to mime type 'text/html'.
> - Opera 12.10
>   1. In Tools > Preferences > Advanced > Downloads
>   2. Uncheck 'Hide file types opened with Opera'
>   3. Quick find 'html'
>   4. Select 'text/html' > Edit
>   5. Add File extensions 'c,h,'
>   6. Click 'OK'
> - Internet Explorer -- Mime types are not available from 'Internet Options'. Is there a registry key for these settings?
> - Firefox -- Mime types are not available from 'Preferences'. Is there an add-on to change the file extensions for a mime type?
> - Chrome -- Can Chrome be configured?

> Please report documentation and link errors to qhull-bug@qhull.org.

Copyright © 1997-2015 C.B. Barber

## » Qhull files

> This sections lists the .c and .h files for Qhull. Please refer to these files for detailed information.

> > Makefile, CMakeLists.txt
> >   `Makefile` is preconfigured for gcc. `CMakeLists.txt` supports multiple platforms with CMake. Qhull includes project files for Visual Studio and Qt.
> > libqhull.h
> >   Include file for the Qhull library (`libqhull.so`, `qhull.dll`, `libqhullstatic.a`). Data structures are documented under Poly. Global variables are documented under Global. Other data structures and variables are documented under Qhull or Geom.
> > Geom, geom.h, geom.c, geom2.c, random.c, random.h
> >   Geometric routines. These routines implement mathematical functions such as Gaussian elimination and geometric routines needed for Qhull. Frequently used routines are in `geom.c` while infrequent ones are in `geom2.c`.
> > Global, global.c, libqhull.h
> >   Global routines. Qhull uses a global data structure, `qh`, to store globally defined constants, lists, sets, and variables. `global.c` initializes and frees these structures.
> > Io, io.h, io.c
> >   Input and output routines. Qhull provides a wide range of input and output options.
> > Mem, mem.h, mem.c
> >   Memory routines. Qhull provides memory allocation and deallocation. It uses quick-fit allocation.
> > Merge, merge.h, merge.c
> >   Merge routines. Qhull handles precision problems by merged facets or joggled input. These routines merge simplicial facets, merge non-simplicial facets, merge cycles of facets, and rename redundant vertices.
> > Poly, poly.h, poly.c, poly2.c, libqhull.h
> >   Polyhedral routines. Qhull produces a polyhedron as a list of facets with vertices, neighbors, ridges, and geometric information. `libqhull.h` defines the main data structures. Frequently used routines are in `poly.c` while infrequent ones are in `poly2.c`.
> > Qhull, libqhull.c, libqhull.h, qhull_a.h, unix.c , qconvex.c , qdelaun.c , qhalf.c , qvoronoi.c
> >   Top-level routines. The Quickhull algorithm is implemented by `libqhull.c`. `qhull_a.h` includes all header files.
> > Set, qset.h, qset.c
> >   Set routines. Qhull implements its data structures as sets. A set is an array of pointers that is expanded as needed. This is a separate package that may be used in other applications.
> > Stat, stat.h, stat.c
> >   Statistical routines. Qhull maintains statistics about its implementation.
> > User, user.h, user.c, user_eg.c, user_eg2.c,
> >   User-defined routines. Qhull allows the user to configure the code with defined constants and specialized routines.

Up: Home page for Qhull
Up: Qhull manual: Table of Contents
Up: Programs • Options • Output • Formats • Geomview • Print • Qhull • Precision • Trace • Functions
Up: Qhull code: Table of Contents
To: Qhull files
To: Geom • Global • Io • Mem • Merge • Poly • Qhull • Set • Stat • User

The Geometry Center Home Page

Comments to: qhull@qhull.org
Created: May 2, 1997 --- Last modified: see top