Replace the tparam Transformation by any Functor with an operator()(Point_3) and use that operator instead of .transform() in the impl.

This commit is contained in:
Maxime Gimeno 2018-05-03 11:44:23 +02:00
parent 66e1b27100
commit 3ca3d11512
1 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,9 @@ namespace Polygon_mesh_processing{
* \ingroup PkgPolygonMeshProcessing * \ingroup PkgPolygonMeshProcessing
* applies a transformation to every vertex of a `Mesh`. * applies a transformation to every vertex of a `Mesh`.
* *
* @tparam Transformation inherits from `CGAL::Aff_transformation_3` * @tparam Transformation a functor that has an `operator()(Point_3)`, with `Point_3`
* the `value_type` of `vertex_point_map` (see below). Such a dunctor can be a
* `CGAL::Aff_transformation_3`.
* @tparam Mesh a model of `VertexListGraph` * @tparam Mesh a model of `VertexListGraph`
* @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" * @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters"
* *
@ -57,7 +59,7 @@ void transform(const Transformation& transformation,
BOOST_FOREACH(typename boost::graph_traits<Mesh>::vertex_descriptor vd, vertices(mesh)) BOOST_FOREACH(typename boost::graph_traits<Mesh>::vertex_descriptor vd, vertices(mesh))
{ {
put(vpm, vd, transformation.transform(get(vpm, vd))); put(vpm, vd, transformation(get(vpm, vd)));
} }
} }
} }