2 * Progressive Mesh type Polygon Reduction Algorithm
3 * by Stan Melax (c) 1998
5 * The function ProgressiveMesh() takes a model in an "indexed face
6 * set" sort of way. i.e. list of vertices and list of triangles.
7 * The function then does the polygon reduction algorithm
8 * internally and reduces the model all the way down to 0
9 * vertices and then returns the order in which the
10 * vertices are collapsed and to which neighbor each vertex
11 * is collapsed to. More specifically the returned "permutation"
12 * indicates how to reorder your vertices so you can render
13 * an object by using the first n vertices (for the n
14 * vertex version). After permuting your vertices, the
15 * map list indicates to which vertex each vertex is collapsed to.
18 #ifndef PROGRESSIVE_MESH_H
19 #define PROGRESSIVE_MESH_H
26 int v
[3]; // indices to vertex list
27 // texture and vertex normal info removed for this demo
30 void ProgressiveMesh(List
<Vector
> &vert
, List
<tridata
> &tri
,
31 List
<int> &map
, List
<int> &permutation
);