Graphics Reference
In-Depth Information
sorted vertices, a vertex V i is welded by comparing it against the immediately following
vertices V j , i
<
j , for as long as
x j + y j + z j |
x i | + y i + |
z i |
3
ε
,
where
is the weld epsilon. Although simple to implement, this is an off-line rather
than on-line method, and thus all vertices must be welded in one go. It also has
degenerate behavior when vertices are aligned to a regular grid, as all vertices on the
diagonal lines
ε
y i + |
k (for all k ) map to the same sum.
If nontriangulated geometry is welded, it is important to remember that the result-
ing geometry will likely contain nonplanar or nonconvex faces as well as collinear
vertices. Nonconforming faces can be triangulated and made convex in a subsequent
pass using the methods described in Section 12.5.
In general, after a pass of vertex welding no two vertices should be closer to each
other than the distance used as the welding tolerance. This serves as a practical test
for debugging a vertex welding system.
|
x i
| +
z i
| =
12.2 Computing Adjacency Information
For cleaning up model geometry — including the elimination of cracks and the merg-
ing of co-planar faces — it is important to have adjacency information describing
how the faces, edges, and vertices of the model connect. Such adjacency information
may not be available. Worst case, the data is just a polygon soup of individual faces.
In this case, the adjacency information has to be computed.
A common geometry representation is the face table representation in which a table
of faces (usually triangles, but sometimes quads) indexes into a table of vertices. Figure
12.5 presents a small example of a face table. The face/vertex table representation is
fairly compact and allows any mesh to be represented.
V3
V5
Vertex
V1
V2
V3
V4
V5
V6
Coordinates
(x1,y1,z1)
(x2,y2,z2)
(x3,y3,z3)
(x4,y4,z4)
(x5,y5,z5)
(x6,y6,z6)
F3
Face
F1
F2
F3
F4
Vertices (ccw)
(V1,V2,V3)
(V2,V4,V3)
(V3,V4,V5)
(V4,V2,V6)
F1
F2
V1
V4
F4
V2
V6
Figure 12.5 The face and vertex tables for a simple mesh.
Search WWH ::




Custom Search