diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Concepts/BorderParameterizer_3.h b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Concepts/BorderParameterizer_3.h index b6ed68bbb93..268e31fb274 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Concepts/BorderParameterizer_3.h +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Concepts/BorderParameterizer_3.h @@ -52,7 +52,7 @@ Error_code parameterize_border(const TriangleMesh& mesh); Indicate if the shape is convex. */ -bool is_border_convex(); +bool is_border_convex() const; /// @} diff --git a/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h index ab09d5d1595..e8ba50c6597 100644 --- a/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h @@ -123,7 +123,7 @@ protected: /// Compute w_ij = (i,j), coefficient of matrix A for j neighbor vertex of i. virtual NT compute_w_ij(const TriangleMesh& /* mesh */, vertex_descriptor /* main_vertex_v_i */, - vertex_around_target_circulator /* neighbor_vertex_v_j */ ) + vertex_around_target_circulator /* neighbor_vertex_v_j */ ) const { /// In the Tutte Barycentric Mapping algorithm, we have w_ij = 1, /// for j neighbor vertex of i. diff --git a/Surface_mesh_parameterization/include/CGAL/Circular_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Circular_border_parameterizer_3.h index 9657a10c2ed..403075b2c6e 100644 --- a/Surface_mesh_parameterization/include/CGAL/Circular_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Circular_border_parameterizer_3.h @@ -83,12 +83,13 @@ private: protected: virtual double compute_edge_length(const TriangleMesh& mesh, vertex_descriptor source, - vertex_descriptor target) = 0; + vertex_descriptor target) const = 0; // Private operations private: /// Compute the total length of the border - double compute_border_length(const TriangleMesh& mesh, halfedge_descriptor bhd) + double compute_border_length(const TriangleMesh& mesh, + halfedge_descriptor bhd) const { double len = 0.0; BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(bhd, mesh)) { @@ -140,7 +141,7 @@ public: } /// Indicate if border's shape is convex. - bool is_border_convex() { return true; } + bool is_border_convex() const { return true; } }; // @@ -180,7 +181,7 @@ protected: /// Compute the length of an edge. virtual double compute_edge_length(const TriangleMesh& /* mesh */, vertex_descriptor /* source */, - vertex_descriptor /* target */) + vertex_descriptor /* target */) const { /// Uniform border parameterization: points are equally spaced. return 1.; @@ -230,7 +231,7 @@ protected: /// Compute the length of an edge. virtual double compute_edge_length(const TriangleMesh& mesh, vertex_descriptor source, - vertex_descriptor target) + vertex_descriptor target) const { VPM ppmap = get(vertex_point, mesh); diff --git a/Surface_mesh_parameterization/include/CGAL/Discrete_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Discrete_authalic_parameterizer_3.h index 0852f8a684d..c7342474dc9 100644 --- a/Surface_mesh_parameterization/include/CGAL/Discrete_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Discrete_authalic_parameterizer_3.h @@ -135,7 +135,7 @@ protected: /// \param neighbor_vertex_v_j the vertex of `mesh` with index `j` virtual NT compute_w_ij(const TriangleMesh& mesh, vertex_descriptor main_vertex_v_i, - vertex_around_target_circulator neighbor_vertex_v_j) + vertex_around_target_circulator neighbor_vertex_v_j) const { typedef typename Parameterizer_traits_3::VPM PPmap; PPmap ppmap = get(vertex_point, mesh); diff --git a/Surface_mesh_parameterization/include/CGAL/Discrete_conformal_map_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Discrete_conformal_map_parameterizer_3.h index 18eb40c72af..1bd178daa0f 100644 --- a/Surface_mesh_parameterization/include/CGAL/Discrete_conformal_map_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Discrete_conformal_map_parameterizer_3.h @@ -133,7 +133,7 @@ protected: /// \param neighbor_vertex_v_j the vertex of `mesh` with index `j` virtual NT compute_w_ij(const TriangleMesh& mesh, vertex_descriptor main_vertex_v_i, - vertex_around_target_circulator neighbor_vertex_v_j) // its target is main_vertex_v_i + vertex_around_target_circulator neighbor_vertex_v_j) const // its target is main_vertex_v_i { typedef typename Parameterizer_traits_3::VPM PPmap; PPmap ppmap = get(vertex_point, mesh); diff --git a/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h index 501f2dfc343..6f88d59737c 100644 --- a/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h @@ -201,7 +201,7 @@ protected: const TriangleMesh& mesh, halfedge_descriptor bhd, VertexUVmap uvmap, - VertexIndexMap vimap) + VertexIndexMap vimap) const { BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(bhd, mesh)){ // Get vertex index in sparse linear system @@ -224,7 +224,7 @@ protected: /// \param neighbor_vertex_v_j the vertex of `mesh` with index `j` virtual NT compute_w_ij(const TriangleMesh& mesh, vertex_descriptor main_vertex_v_i, - vertex_around_target_circulator neighbor_vertex_v_j) + vertex_around_target_circulator neighbor_vertex_v_j) const = 0; /// Compute the line i of matrix A for i inner vertex: @@ -242,7 +242,7 @@ protected: Vector&, const TriangleMesh& mesh, vertex_descriptor vertex, - VertexIndexMap vimap) + VertexIndexMap vimap) const { int i = get(vimap,vertex); diff --git a/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h index e03470ce06c..92c38baf632 100644 --- a/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h @@ -251,7 +251,7 @@ private: const TriangleMesh& mesh, UVmap uvmap, VertexIndexMap vimap, - VertexParameterizedMap vpmap) + VertexParameterizedMap vpmap) const { BOOST_FOREACH(vertex_descriptor v, vertices(mesh)){ // Get vertex index in sparse linear system @@ -278,7 +278,7 @@ private: /// Computes the coordinates of the vertices of a triangle /// in a local 2D orthonormal basis of the triangle's plane. void project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2, // in - Point_2& z0, Point_2& z1, Point_2& z2); // out + Point_2& z0, Point_2& z1, Point_2& z2) const; // out /// Create two lines in the linear system per triangle (one for u, one for v). /// @@ -287,7 +287,7 @@ private: Error_code setup_triangle_relations(LeastSquaresSolver& solver, const TriangleMesh& mesh, face_descriptor facet, - VertexIndexMap vimap); + VertexIndexMap vimap) const; // Private accessors private: @@ -314,7 +314,7 @@ inline void LSCM_parameterizer_3:: project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2, // in - Point_2& z0, Point_2& z1, Point_2& z2) // out + Point_2& z0, Point_2& z1, Point_2& z2) const // out { Vector_3 X = p1 - p0; NT X_norm = std::sqrt(X * X); @@ -359,7 +359,7 @@ LSCM_parameterizer_3:: setup_triangle_relations(LeastSquaresSolver& solver, const TriangleMesh& mesh, face_descriptor facet, - VertexIndexMap vimap) + VertexIndexMap vimap) const { typedef typename boost::property_map::const_type PPmap; PPmap ppmap = get(vertex_point, mesh); diff --git a/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h index 52ffa6d2ffa..f9e78fac610 100644 --- a/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h @@ -138,7 +138,7 @@ protected: /// \param neighbor_vertex_v_j the vertex of `mesh` with index `j` virtual NT compute_w_ij(const TriangleMesh& mesh, vertex_descriptor main_vertex_v_i, - vertex_around_target_circulator neighbor_vertex_v_j) + vertex_around_target_circulator neighbor_vertex_v_j) const { typedef typename Parameterizer_traits_3::VPM PPmap; diff --git a/Surface_mesh_parameterization/include/CGAL/Square_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Square_border_parameterizer_3.h index 1a0be731b4f..a016ada5a10 100644 --- a/Surface_mesh_parameterization/include/CGAL/Square_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Square_border_parameterizer_3.h @@ -99,12 +99,13 @@ private: protected: virtual double compute_edge_length(const TriangleMesh& mesh, vertex_descriptor source, - vertex_descriptor target) = 0; + vertex_descriptor target) const = 0; // Private operations private: /// Compute the total length of the border. - double compute_border_length(const TriangleMesh& mesh, halfedge_descriptor bhd) + double compute_border_length(const TriangleMesh& mesh, + halfedge_descriptor bhd) const { double len = 0.0; BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(bhd, mesh)) { @@ -118,7 +119,7 @@ private: halfedge_around_face_iterator closest_iterator(const TriangleMesh& mesh, halfedge_descriptor bhd, Offset_map& offset, - double value) + double value) const { halfedge_around_face_iterator b, e, best; double min = DBL_MAX; // distance for 'best' @@ -145,7 +146,7 @@ private: Error_code set_default_corners(const TriangleMesh& mesh, halfedge_descriptor bhd, VertexParameterizedMap vpmap, - Offset_map& offset) + Offset_map& offset) const { // map to [0,4[ double len = 0.0; // current position on square in [0, total_len[ @@ -197,7 +198,7 @@ private: halfedge_descriptor bhd, VertexParameterizedMap vpmap, const char* filename, - Offset_map& offset) + Offset_map& offset) const { assert(offset.empty()); @@ -352,7 +353,7 @@ public: } /// Indicate if the border's shape is convex. - bool is_border_convex() { return true; } + bool is_border_convex() const { return true; } }; // @@ -392,7 +393,7 @@ protected: /// Compute the length of an edge. virtual double compute_edge_length(const TriangleMesh& /* mesh */, vertex_descriptor /* source */, - vertex_descriptor /* target */) + vertex_descriptor /* target */) const { /// Uniform border parameterization: points are equally spaced. return 1; @@ -440,7 +441,7 @@ protected: /// Compute the length of an edge. virtual double compute_edge_length(const TriangleMesh& mesh, vertex_descriptor source, - vertex_descriptor target) + vertex_descriptor target) const { VPM ppmap = get(vertex_point, mesh); diff --git a/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h index aae1053cd7f..5838f965552 100644 --- a/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h @@ -258,7 +258,7 @@ public: /// Indicate if the border's shape is convex. /// Meaningless for free border parameterization algorithms. - bool is_border_convex() { return false; } + bool is_border_convex() const { return false; } }; } // namespace CGAL