I am trying to decimate a mesh using OpenMesh. I followed the very example that is stated in the doc:
cout << "Vertices: " << mesh->n_vertices() << endl;
DecimaterT<Mesh> decimater(*mesh); // a decimater object, connected to a mesh
ModQuadricT<Mesh>::Handle hModQuadric; // use a quadric module
decimater.add(hModQuadric); // register module at the decimater
decimater.initialize(); // let the decimater initialize the mesh and the
// modules
decimater.decimate_to(15000); // do decimation
cout << "Vertices: " << decimater.mesh().n_vertices() << endl;
decimate_to method correctly terminates and returns 56,000, which is the number of vertices that should have collapsed.
However, I can tell by the log that the vertex number on the mesh did not change. How is this possible?