Skip to content

Instantly share code, notes, and snippets.

@stephanmg
Created June 11, 2018 15:32
Show Gist options
  • Save stephanmg/3865bd46874081950805f8ff1d27569f to your computer and use it in GitHub Desktop.
Save stephanmg/3865bd46874081950805f8ff1d27569f to your computer and use it in GitHub Desktop.
// Collapse edges
size_t beginningOfQuads = 2;
for (size_t i = 0; i < numQuads; i++) {
size_t numEdges = sh.num<Edge>(beginningOfQuads+i);
while (numEdges > 4) {
Edge* e = *sh.begin<Edge>(beginningOfQuads+i);
CollapseEdge(g, e, e->vertex(0));
numEdges--;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment