- decimater (incremental & mc) doesn't require normals anymore

- mod normalFlipping & normalDeviation computes normals, if mesh hasn't normals
- add 2 decimater unittest (decimating with normalFlipping and initialize all modules)

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1049 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Matthias Möller
2014-05-09 08:12:17 +00:00
parent 3bc356b2dd
commit cd3587d21e
5 changed files with 60 additions and 23 deletions

View File

@@ -108,12 +108,22 @@ public:
{
set_normal_deviation(_max_dev);
mesh_.add_property(normal_cones_);
const bool mesh_has_normals = _mesh.has_face_normals();
_mesh.request_face_normals();
if (!mesh_has_normals)
{
std::cerr << "Mesh has no face normals. Compute them automatically." << std::endl;
_mesh.update_face_normals();
}
}
/// Destructor
~ModNormalDeviationT() {
mesh_.remove_property(normal_cones_);
mesh_.release_face_normals();
}