Skip to content

Instantly share code, notes, and snippets.

@harryhaaren
Created March 24, 2015 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harryhaaren/e811022b9fd940fb4ab0 to your computer and use it in GitHub Desktop.
Save harryhaaren/e811022b9fd940fb4ab0 to your computer and use it in GitHub Desktop.
for(int i=0; i < mesh.getNumVertexs() / 2; i++ )
{
// remove all even numbered vertexs: for loop "i" variable goes as follows
// 0+1 = 1 // removes 1st vertex. Note: 1st vertex removed, so 2nd vertex in position of first, 3rd in position of 2nd
// 1+1 = 2 // removes 3rd vertex, as it is now in the 2nd place!!
// and so on...
mesh.removeVertex(i+1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment