Kstars

sweep.h
1/*
2** Author: Eric Veach, July 1994.
3**
4*/
5
6#ifndef __sweep_h_
7#define __sweep_h_
8
9#include "mesh.h"
10
11/* __gl_computeInterior( tess ) computes the planar arrangement specified
12 * by the given contours, and further subdivides this arrangement
13 * into regions. Each region is marked "inside" if it belongs
14 * to the polygon, according to the rule given by tess->windingRule.
15 * Each interior region is guaranteed be monotone.
16 */
17int __gl_computeInterior(GLUtesselator *tess);
18
19/* The following is here *only* for access by debugging routines */
20
21#include "dict.h"
22
23/* For each pair of adjacent edges crossing the sweep line, there is
24 * an ActiveRegion to represent the region between them. The active
25 * regions are kept in sorted order in a dynamic dictionary. As the
26 * sweep line crosses each vertex, we update the affected regions.
27 */
28
29struct ActiveRegion
30{
31 GLUhalfEdge *eUp; /* upper edge, directed right to left */
32 DictNode *nodeUp; /* dictionary node corresponding to eUp */
33 int windingNumber; /* used to determine which regions are
34 * inside the polygon */
35 GLboolean inside; /* is this region inside the polygon? */
36 GLboolean sentinel; /* marks fake edges at t = +/-infinity */
37 GLboolean dirty; /* marks regions where the upper or lower
38 * edge has changed, but we haven't checked
39 * whether they intersect yet */
40 GLboolean fixUpperEdge; /* marks temporary edges introduced when
41 * we process a "right vertex" (one without
42 * any edges leaving to the right) */
43};
44
45#define RegionBelow(r) ((ActiveRegion *)dictKey(dictPred((r)->nodeUp)))
46#define RegionAbove(r) ((ActiveRegion *)dictKey(dictSucc((r)->nodeUp)))
47
48#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.