File indexing completed on 2024-05-05 07:43:13
0001 /* 0002 ** Author: Eric Veach, July 1994. 0003 ** 0004 */ 0005 0006 #ifndef __tessmono_h_ 0007 #define __tessmono_h_ 0008 0009 /* __gl_meshTessellateMonoRegion( face ) tessellates a monotone region 0010 * (what else would it do??) The region must consist of a single 0011 * loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this 0012 * case means that any vertical line intersects the interior of the 0013 * region in a single interval. 0014 * 0015 * Tessellation consists of adding interior edges (actually pairs of 0016 * half-edges), to split the region into non-overlapping triangles. 0017 * 0018 * __gl_meshTessellateInterior( mesh ) tessellates each region of 0019 * the mesh which is marked "inside" the polygon. Each such region 0020 * must be monotone. 0021 * 0022 * __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces 0023 * which are not marked "inside" the polygon. Since further mesh operations 0024 * on NULL faces are not allowed, the main purpose is to clean up the 0025 * mesh so that exterior loops are not represented in the data structure. 0026 * 0027 * __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the 0028 * winding numbers on all edges so that regions marked "inside" the 0029 * polygon have a winding number of "value", and regions outside 0030 * have a winding number of 0. 0031 * 0032 * If keepOnlyBoundary is TRUE, it also deletes all edges which do not 0033 * separate an interior region from an exterior one. 0034 */ 0035 0036 int __gl_meshTessellateMonoRegion(GLUface *face); 0037 int __gl_meshTessellateInterior(GLUmesh *mesh); 0038 void __gl_meshDiscardExterior(GLUmesh *mesh); 0039 int __gl_meshSetWindingNumber(GLUmesh *mesh, int value, GLboolean keepOnlyBoundary); 0040 0041 #endif