Commit bedf24b6 authored by Mike Kremer's avatar Mike Kremer

Corrected weighting.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@19217 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3f05f347
......@@ -112,7 +112,7 @@ private:
const typename MeshT::Normal e = mesh_.point(mesh_.to_vertex_handle(_heh)) -
mesh_.point(mesh_.from_vertex_handle(_heh));
return 1.0/8.0 * mesh_.property(cotan_weights_, mesh_.edge_handle(_heh)) * (e | e);
return (1.0/8.0) * mesh_.property(cotan_weights_, mesh_.edge_handle(_heh)) * (e | e);
}
void tag_obtuse_triangles() const {
......@@ -139,8 +139,8 @@ private:
for(typename MeshT::ConstEdgeIter e_it = mesh_.edges_begin(),
e_end = mesh_.edges_end(); e_it != e_end; ++e_it) {
const typename MeshT::Scalar w = 0.5 * (cotan_weight(mesh_.halfedge_handle(*e_it, 0)) +
cotan_weight(mesh_.halfedge_handle(*e_it, 1)));
const typename MeshT::Scalar w = cotan_weight(mesh_.halfedge_handle(*e_it, 0)) +
cotan_weight(mesh_.halfedge_handle(*e_it, 1));
const_cast<MeshT&>(mesh_).property(cotan_weights_, *e_it) = w;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment