Graphics Reference
In-Depth Information
Here, the function MarkAllNeighbors() is given recursively, for brevity. In practice,
the function should be written to use an explicit stack because the program stack is
unlikely to cope with a recursive routine working on a mesh of several thousand
faces (see Chapter 6 for a description on how to turn recursion into the use of an
explicit stack). An explicit stack would also better facilitate writing the code so as
to not unnecessarily visit the face the code just came from. Additionally, an explicit
stack also provides more options for controlling what and how much data is being
stacked.
12.3 Holes, Cracks, Gaps, and T-junctions
A hole in a mesh is signified by a set of vertices, connected by a closed chain of edges in
which no faces have been defined to connect all of these vertices and edges. Unlike
intentional holes, which tend to be large, unintentional holes are usually narrow
slits between two or more faces that were supposed to be connected (Figure 12.8).
Unintentional holes are often referred to as cracks or seams .
The term crack is also used to refer to narrow wedge-like slots between two partially
connected geometries. Narrow voids between two completely unconnected geome-
tries will be referred to as gaps . Cracks can be found and addressed through local
inspection; gaps can be detected only through global means.
Many cracks of a mesh are caused by duplicated vertices. These cracks are effectively
resolved by welding the vertices of the mesh. Left are the cracks consisting of vertices
that lie on the interior of some opposing edge of the edge-chain forming the crack.
Situations in which an endpoint of one edge lying on the interior of another edge —
the vertex usually displaced off the line by some small amount — are referred to as
a t-junctions or t-joints (so named because the two edges often meet in the form of
a letter T ). The endpoint is called the t-vertex . In other words, a t-vertex is a vertex
belonging to one or more polygons, falling on an edge of a polygon to which it does
not belong. A t-junction may be formed either as part of a crack or a gap, depending
on what the surrounding geometry looks like. Figure 12.9 illustrates all three problem
situations: a (nonhole) crack, a gap, and a t-junction.
(a)
(b)
Figure 12.8 (a) A mesh with an intentional hole. (b) A mesh with an unintentional hole — a
crack (exaggerated).
Search WWH ::




Custom Search