diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/Concepts/ErrorMetricProxy.h b/Surface_mesh_approximation/doc/Surface_mesh_approximation/Concepts/ErrorMetricProxy.h index 96508e14e87..b78f7465e96 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/Concepts/ErrorMetricProxy.h +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/Concepts/ErrorMetricProxy.h @@ -29,11 +29,11 @@ public: FT compute_error(const TriangleMesh &tm, const face_descriptor &f, const Proxy &proxy) const; /// Computes and returns fitted proxy from a range of faces. - /// @tparam FaceRange range of - /// `boost::graph_traits::%face_descriptor`, model of `Range`. - /// Its iterator type is `InputIterator`. + /// @tparam FaceRange a range of + /// `boost::graph_traits::%face_descriptor` model of `ConstRange` + /// with iterator type being model of `InputIterator`. template - Proxy fit_proxy(const TriangleMesh &tm, const FaceRange &faces) const; + Proxy fit_proxy(const FaceRange &faces, const TriangleMesh &tm) const; /// } diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp index b6bacd90828..af2d1448ff8 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp @@ -43,7 +43,7 @@ struct Compact_metric_point_proxy // template functor to compute a best-fit // proxy from a range of faces template - Proxy fit_proxy(const Polyhedron &tm, const FaceRange &faces) const { + Proxy fit_proxy(const FaceRange &faces, const Polyhedron &tm) const { (void)(tm); // fitting center Vector center = CGAL::NULL_VECTOR; diff --git a/Surface_mesh_approximation/include/CGAL/L21_metric_plane_proxy.h b/Surface_mesh_approximation/include/CGAL/L21_metric_plane_proxy.h index 222976a0685..71c1a6ac8e4 100644 --- a/Surface_mesh_approximation/include/CGAL/L21_metric_plane_proxy.h +++ b/Surface_mesh_approximation/include/CGAL/L21_metric_plane_proxy.h @@ -94,12 +94,12 @@ public: /*! * @brief Fits a proxy to a range of faces. * @tparam FaceRange range of face descriptors, model of Range. - * @param tm input triangle mesh * @param faces the range of faces to be fitted + * @param tm input triangle mesh * @return fitted proxy */ template - Proxy fit_proxy(const TriangleMesh &tm, const FaceRange &faces) const { + Proxy fit_proxy(const FaceRange &faces, const TriangleMesh &tm) const { (void)(tm); CGAL_assertion(!faces.empty()); diff --git a/Surface_mesh_approximation/include/CGAL/L2_metric_plane_proxy.h b/Surface_mesh_approximation/include/CGAL/L2_metric_plane_proxy.h index e2bab1f67f5..1174a8f521f 100644 --- a/Surface_mesh_approximation/include/CGAL/L2_metric_plane_proxy.h +++ b/Surface_mesh_approximation/include/CGAL/L2_metric_plane_proxy.h @@ -100,12 +100,12 @@ public: * through the center of mass and is defined by the two principal * components of the integral covariance matrix. * @tparam FaceRange range of face descriptors, model of Range. - * @param tm input triangle mesh * @param faces the range of faces to be fitted + * @param tm input triangle mesh * @return fitted proxy */ template - Proxy fit_proxy(const TriangleMesh &tm, const FaceRange &faces) const { + Proxy fit_proxy(const FaceRange &faces, const TriangleMesh &tm) const { (void)(tm); CGAL_assertion(!faces.empty()); diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 93cda8b62b5..3c786bb95d2 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -1334,7 +1334,7 @@ private: CGAL_assertion(!px_patch.empty()); // use Proxy_fitting functor to fit proxy parameters - const Proxy px = m_metric->fit_proxy(*m_ptm, px_patch); + const Proxy px = m_metric->fit_proxy(px_patch, *m_ptm); // find proxy seed and sum error face_descriptor seed = *px_patch.begin(); @@ -1374,7 +1374,7 @@ private: Proxy_wrapper fit_proxy_from_facet(const face_descriptor f, const std::size_t px_idx) { // fit proxy parameters std::vector fvec(1, f); - const Proxy px = m_metric->fit_proxy(*m_ptm, fvec); + const Proxy px = m_metric->fit_proxy(fvec, *m_ptm); const FT err = m_metric->compute_error(*m_ptm, f, px); // original proxy map should always be falid diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp index dff47dab454..8393cdafc41 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp @@ -43,7 +43,7 @@ struct Compact_metric_point_proxy { // template functor to compute a best-fit // proxy from a range of facets template - Proxy fit_proxy(const Polyhedron &tm, const FaceRange &faces) const { + Proxy fit_proxy(const FaceRange &faces, const Polyhedron &tm) const { (void)(tm); // fitting center Vector center = CGAL::NULL_VECTOR;