From dbae01e10be3d84683fd511f5de6bc08afe8c5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 14 Sep 2017 16:10:37 +0200 Subject: [PATCH] Fixed not using the VertexPointPMap passed in parameter when building AABB trees --- .../Surface_mesh_shortest_path.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index 703c983d97b..c5b53f99eb3 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -2612,10 +2612,11 @@ public: /// \cond template - static Face_location locate(const Point_3& location, const Triangle_mesh& tm, Vertex_point_map vertexPointMap, const Traits& traits = Traits()) + static Face_location locate(const Point_3& location, const Triangle_mesh& tm, + Vertex_point_map vertexPointMap, const Traits& traits = Traits()) { AABB_tree tree; - build_aabb_tree(tm, tree); + build_aabb_tree(tm, tree, vertexPointMap); return locate(location, tree, tm, vertexPointMap, traits); } @@ -2676,10 +2677,11 @@ public: /// \cond template - static Face_location locate(const Ray_3& ray, const Triangle_mesh& tm, Vertex_point_map vertexPointMap, const Traits& traits = Traits()) + static Face_location locate(const Ray_3& ray, const Triangle_mesh& tm, + Vertex_point_map vertexPointMap, const Traits& traits = Traits()) { AABB_tree tree; - build_aabb_tree(tm, tree); + build_aabb_tree(tm, tree, vertexPointMap); return locate(ray, tree, tm, vertexPointMap, traits); } @@ -2771,19 +2773,20 @@ public: \param outTree Output parameter to store the computed `AABB_tree` */ template - void build_aabb_tree(AABB_tree& outTree) const + void build_aabb_tree(AABB_tree& outTree, Vertex_point_map vertexPointMap) const { - build_aabb_tree(m_graph, outTree); + build_aabb_tree(m_graph, outTree, vertexPointMap); } /// \cond template - static void build_aabb_tree(const Triangle_mesh& tm, AABB_tree& outTree) + static void build_aabb_tree(const Triangle_mesh& tm, AABB_tree& outTree, + Vertex_point_map vertexPointMap) { face_iterator facesStart, facesEnd; boost::tie(facesStart, facesEnd) = faces(tm); - outTree.rebuild(facesStart, facesEnd, tm); + outTree.rebuild(facesStart, facesEnd, tm, vertexPointMap); outTree.build(); } /// \endcond