- 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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user