13 #include <boost/graph/graph_traits.hpp>
14 #include <boost/graph/properties.hpp>
31 template<
typename HalfedgeGraph,
typename Po
intMap,
typename GeometryTraits >
34 typename boost::graph_traits< HalfedgeGraph >::face_descriptor f,
35 const HalfedgeGraph &g,
37 const GeometryTraits >)
39 typedef boost::graph_traits< HalfedgeGraph > GraphTraits;
40 typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor;
44 halfedge_descriptor edg =
halfedge(f, g);
45 halfedge_descriptor edgb = edg;
59 Vector normal = gt.unit_normal(p1, p2, p0);
62 catch(
const std::exception &e)
73 if(std::string(e.what()).find(
"collinear_3_object") == std::string::npos)
83 Vector normal(std::numeric_limits< double >::quiet_NaN(),
84 std::numeric_limits< double >::quiet_NaN(),
85 std::numeric_limits< double >::quiet_NaN());
98 Vector n(gt.normal(p1, p2, p0));
107 n = gt.add_v(n, gt.normal(p1, p2, p0));
108 }
while(edg != edgb);
110 return gt.normalize(n);