13 #include <boost/graph/graph_traits.hpp>
14 #include <boost/graph/properties.hpp>
36 template<
typename GeometryTraits >
42 const GeometryTraits >)
46 return Point((a[0] + b[0] + c[0] + d[0]) / 4,
47 (a[1] + b[1] + c[1] + d[1]) / 4,
48 (a[2] + b[2] + c[2] + d[2]) / 4);
61 template<
typename GeometryTraits >
67 const GeometryTraits >)
71 Vector ab(b - a), bc(c - b), cd(d - c), da(a - d);
73 return (gt.length(ab) + gt.length(bc) + gt.length(cd)) + gt.length(da));
88 template<
typename GeometryTraits >
94 const GeometryTraits >)
98 Vector n1 = triangle_normal_unnormalized< GeometryTraits >(a, b, c, gt);
99 Vector n2 = triangle_normal_unnormalized< GeometryTraits >(c, d, a, gt);
100 return (gt.length(n1) + gt.length(n2)) * 0.5;