Commit 54c5f123 authored by TheNumbat's avatar TheNumbat
Browse files

fix typos

parent 6745aa09
......@@ -23,7 +23,7 @@ Ultimately we want all of our triangles to be about the same size, which means w
#### Edge Flipping
We want to flip an edge any time it reduces the total deviation from regular degree (degree 6). In particular, let _a1_, _a2_ be the degrees of an edge that we're thinking about flipping, and let _b1_, _b2_ be the degrees of the two vertices across from this edge. The total deviation in the initial configuration is `|_a1_-6| + |_a2_-6| + |_b1_-6| + |_b2_-6|`. You should be able to _easily_ compute the deviation after the edge flip **without actually performing the edge flip**; if this number decreases, then the edge flip should be performed. We recommend flipping all edges in a single pass, after the edge collapse step.
We want to flip an edge any time it reduces the total deviation from regular degree (degree 6). In particular, let _a1_, _a2_ be the degrees of an edge that we're thinking about flipping, and let _b1_, _b2_ be the degrees of the two vertices across from this edge. The total deviation in the initial configuration is `|a1-6| + |a2-6| + |b1-6| + |b2-6|`. You should be able to easily compute the deviation after the edge flip **without actually performing the edge flip**; if this number decreases, then the edge flip should be performed. We recommend flipping all edges in a single pass, after the edge collapse step.
#### Vertex Averaging
......
......@@ -113,11 +113,11 @@ The one final thing we want to think about is performance. At each iteration, we
// surface if this edge is collapsed
};
Within ` Halfedge_Mesh::simplify`, you will create a dictionary `vertex_quadrics` (a `std::unordered_map`) mapping vertices (`VertexRef`) to quadric error matrices (`Mat4`). This is a hash map, and its usage is detailed in the [C++ documentation](https://en.cppreference.com/w/cpp/container/unordered_map). To initialize the record for a given edge `e`, you can use this dictionary to write
Within `Halfedge_Mesh::simplify`, you will create a dictionary `vertex_quadrics` mapping vertices to quadric error matrices. We will use a `std::unordered_map` for this purpose, which is the hash map provided by the STL. Its usage is detailed in the [C++ documentation](https://en.cppreference.com/w/cpp/container/unordered_map). To initialize the record for a given edge `e`, you can use this dictionary to write
Edge_Record record(vertex_quadrics, e);
Similarly to how we created a mapping from vertices to quadric matrices, we will also want to associate this record with its edge using the `edge_records` map:
Similarly to how we created a dictionary mapping vertices to quadric matrices, we will also want to associate this record with its edge using the `edge_records` dictionary:
edge_records[e] = record;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment