Your software does a nice job of reducing the triangle count. However, it does not retain the triangle winding. This is revealed with viewers that use this information to determine front and back face. To see this issue, run your program
./main.exe ./dragon.obj ./sim.obj 0.25
and then open the result in MeshLab. Notice that the surface appears wrong. You can fix the problem with MeshLab's Filters/Normals.../ReorientAllFacesCoherently (potentially followed by Filters/Normals../InvertFaceOrientation.

It would be great if your software could retain triangle winding - it really is a nic project.
Your software does a nice job of reducing the triangle count. However, it does not retain the triangle winding. This is revealed with viewers that use this information to determine front and back face. To see this issue, run your program
./main.exe ./dragon.obj ./sim.obj 0.25
and then open the result in MeshLab. Notice that the surface appears wrong. You can fix the problem with MeshLab's Filters/Normals.../ReorientAllFacesCoherently (potentially followed by Filters/Normals../InvertFaceOrientation.
It would be great if your software could retain triangle winding - it really is a nic project.