13 #include <boost/graph/graph_traits.hpp>
14 #include <boost/graph/properties.hpp>
43 template<
typename FaceGraph,
46 typename boost::property_traits< PointMap >::value_type
51 const typename GeometryTraits::Scalar smoothing_factor,
52 const GeometryTraits >)
54 typedef typename boost::property_traits< PointMap >::value_type
58 typedef typename GeometryTraits::Scalar Scalar;
62 Operators::extract_1_ring_not_including_v< FaceGraph, GeometryTraits >(v, g, qv);
64 Point geom_laplacian(0, 0, 0);
68 typename std::vector<
typename boost::graph_traits<
71 for(; it != ite; ++it, ++cpt)
74 Scalar len = gt.length(center, tmp);
78 geom_laplacian =
Point(gt.get_x(tmp)/len + gt.get_x(geom_laplacian),
79 gt.get_y(tmp)/len + gt.get_y(geom_laplacian),
80 gt.get_z(tmp)/len + gt.get_z(geom_laplacian));
85 return gt.add_pv(center,
86 gt.scalar_mult(gt.sub_p(
Point(gt.get_x(geom_laplacian) / sum,
87 gt.get_y(geom_laplacian) / sum,
88 gt.get_z(geom_laplacian) / sum),