Commit 26c20f12 authored by Mike Kremer's avatar Mike Kremer

Avoid %-operator in normal calculation such that gcc does not throw a compiler...

Avoid %-operator in normal calculation such that gcc does not throw a compiler error when using vector types of dimension other than three.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@327 fdac6126-5c0c-442c-9429-916003d36597
parent 36877c3d
......@@ -109,14 +109,14 @@ calc_face_normal(FaceHandle _fh) const
for(; fv_it; ++fv_it)
{
p2 = point(fv_it);
n += vector_cast<Normal>((p2-p1)%(p0-p1));
n += vector_cast<Normal>(calc_face_normal(p0, p1, p2));
p0 = p1;
p1 = p2;
}
//two additional steps since we started at vertex 2, not 0
n += vector_cast<Normal>((p0i-p1)%(p0-p1));
n += vector_cast<Normal>((p1i-p0i)%(p1-p0i));
n += vector_cast<Normal>(calc_face_normal(p0i, p0, p1));
n += vector_cast<Normal>(calc_face_normal(p1i, p0i, p1));
typename Normal::value_type norm = n.length();
......
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