17#ifndef __surface_utils_h__
18#define __surface_utils_h__
34 return (two - one).cross (three - two).normalized();
38 return normal (mesh.vert(tri[0]), mesh.vert(tri[1]), mesh.vert(tri[2]));
43 return (
normal (one, two, three) +
normal (one, three, four)).normalized();
48 return normal (mesh.vert(quad[0]), mesh.vert(quad[1]), mesh.vert(quad[2]), mesh.vert(quad[3]));
55 return 0.5 * ((two - one).cross (three - two).norm());
60 return area (mesh.vert(tri[0]), mesh.vert(tri[1]), mesh.vert(tri[2]));
65 return area (one, two, three) +
area (one, three, four);
70 return area (mesh.vert(quad[0]), mesh.vert(quad[1]), mesh.vert(quad[2]), mesh.vert(quad[3]));
Vertex normal(const Vertex &one, const Vertex &two, const Vertex &three)
default_type area(const Vertex &one, const Vertex &two, const Vertex &three)
double default_type
the default type used throughout MRtrix