Up: Home page for Qhull (local)
Up: Qhull manual: contents
Up: Programs
Options
Output
Formats
Geomview
Print
Qhull
Precision
Trace
Functions (local)
Up: Qhull code
To: Geom Global
Io Mem
Merge Poly
Qhull Set
Stat User
Qhull's data structures are constructed from sets. The functions and macros in qset_r.c construct, iterate, and modify these sets. They are the most frequently called functions in Qhull. For this reason, efficiency is the primary concern.
In Qhull, a set is represented by an unordered array of pointers with a maximum size and a NULL terminator (setT). Most sets correspond to mathematical sets (i.e., the pointers are unique). Some sets are sorted to enforce uniqueness. Some sets are ordered. For example, the order of vertices in a ridge determine the ridge's orientation. If you reverse the order of adjacent vertices, the orientation reverses. Some sets are not mathematical sets. They may be indexed as an array and they may include NULL pointers.
The most common operation on a set is to iterate its members. This is done with a 'FOREACH...' macro. Each set has a custom macro. For example, 'FOREACHvertex_' iterates over a set of vertices. Each vertex is assigned to the variable 'vertex' from the pointer 'vertexp'.
Most sets are constructed by appending elements to the set. The last element of a set is either NULL or the index of the terminating NULL for a partially full set. If a set is full, appending an element copies the set to a larger array.
Copyright © 1995-2020 C.B. Barber
» Geom Global Io Mem Merge Poly Qhull Set Stat User
Up:
Home page for
Qhull (local)
Up: Qhull manual: contents
Up: Programs
Options
Output
Formats
Geomview
Print
Qhull
Precision
Trace
Functions (local)
Up: Qhull code
To: Geom
Global Io
Mem Merge
Poly Qhull
Set Stat
User
Comments to: qhull@qhull.org
Created: May 2, 1997 --- Last modified: see top