Up: Home page for Qhull
Up: Qhull manual: Table of Contents
Up: ProgramsOptionsOutputFormatsGeomviewPrintQhullPrecisionTrace
Up: Qhull internals: Table of Contents
To: Qhull functions, macros, and data structures
To: GeomGlobalIoMemMergePolyQhullSetStatUser


qset.c -- set data type and operations

Qhull's data structures are constructed from sets. The functions and macros in qset.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-2002 The Geometry Center, Minneapolis MN


Geom GlobalIoMemMergePolyQhullSetStatUser

Index to qset.c and qset.h

Data types and constants

FOREACH macros

Access and size macros

Internal macros

address macros

Allocation and deallocation functions

Access and predicate functions

Add functions

Check and print functions

Copy, compact, and zero functions

Delete functions

Temporary set functions


Up: Home page for Qhull
Up: Qhull manual: Table of Contents
Up: ProgramsOptionsOutputFormatsGeomviewPrintQhullPrecisionTrace
Up: Qhull internals: Table of Contents
To: Qhull functions, macros, and data structures
To: GeomGlobalIoMemMergePolyQhullSetStatUser


The Geometry Center Home Page

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