- 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

@@ -87,11 +87,21 @@ public:
ModNormalFlippingT( MeshT &_mesh) : Base(_mesh, true)
{
set_max_normal_deviation( 90.0f );
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();
}
}
~ModNormalFlippingT()
{ }
{
Base::mesh().release_face_normals();
}
public: