OpenMesh를 사용하여 메쉬를 데시 메이트하려고합니다. 나는이 문서에 언급되는 바로 그 예를 다음 :OpenMesh Decimater가 정점 번호를 줄이지 않습니다.
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 방법이 올바르게 종료하거나 축소해야 꼭지점의 수는 56,000을 반환합니다.
그러나 메쉬의 정점 번호가 변경되지 않았다는 것을 로그를 통해 알 수 있습니다. 어떻게 가능합니까?
내 하루를 보냈습니다. 감사. 공식 문서에서이 동작을 언급 한 부분에 대한 포인터가 있습니까? ^^ – Lake
@Lake [형상 요소 삭제]에 대한 일반적인 설명이 있습니다 (http://www.openmesh.org/media/Documentations/OpenMesh-6.2- 문서/a00060.html). 불행히도,'decimate_to'가 가비지 콜렉션을 트리거하지 않는다는 사실은'DecimaterT.cpp' 구현시 소스 코드 주석에 의해서만 문서화 된 것 같습니다. – jsb
@Lake OpenMesh 6.3부터 문서가 그에 따라 업데이트되었습니다. – jsb