mirror of https://github.com/CGAL/cgal
Fixed not using the VertexPointPMap passed in parameter when building AABB trees
This commit is contained in:
parent
24eaf3bf27
commit
dbae01e10b
|
|
@ -2612,10 +2612,11 @@ public:
|
||||||
/// \cond
|
/// \cond
|
||||||
|
|
||||||
template <class AABBTraits>
|
template <class AABBTraits>
|
||||||
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<AABBTraits> tree;
|
AABB_tree<AABBTraits> tree;
|
||||||
build_aabb_tree(tm, tree);
|
build_aabb_tree(tm, tree, vertexPointMap);
|
||||||
return locate(location, tree, tm, vertexPointMap, traits);
|
return locate(location, tree, tm, vertexPointMap, traits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2676,10 +2677,11 @@ public:
|
||||||
/// \cond
|
/// \cond
|
||||||
|
|
||||||
template <class AABBTraits>
|
template <class AABBTraits>
|
||||||
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<AABBTraits> tree;
|
AABB_tree<AABBTraits> tree;
|
||||||
build_aabb_tree(tm, tree);
|
build_aabb_tree(tm, tree, vertexPointMap);
|
||||||
return locate(ray, tree, tm, vertexPointMap, traits);
|
return locate(ray, tree, tm, vertexPointMap, traits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2771,19 +2773,20 @@ public:
|
||||||
\param outTree Output parameter to store the computed `AABB_tree`
|
\param outTree Output parameter to store the computed `AABB_tree`
|
||||||
*/
|
*/
|
||||||
template <class AABBTraits>
|
template <class AABBTraits>
|
||||||
void build_aabb_tree(AABB_tree<AABBTraits>& outTree) const
|
void build_aabb_tree(AABB_tree<AABBTraits>& outTree, Vertex_point_map vertexPointMap) const
|
||||||
{
|
{
|
||||||
build_aabb_tree(m_graph, outTree);
|
build_aabb_tree(m_graph, outTree, vertexPointMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond
|
/// \cond
|
||||||
|
|
||||||
template <class AABBTraits>
|
template <class AABBTraits>
|
||||||
static void build_aabb_tree(const Triangle_mesh& tm, AABB_tree<AABBTraits>& outTree)
|
static void build_aabb_tree(const Triangle_mesh& tm, AABB_tree<AABBTraits>& outTree,
|
||||||
|
Vertex_point_map vertexPointMap)
|
||||||
{
|
{
|
||||||
face_iterator facesStart, facesEnd;
|
face_iterator facesStart, facesEnd;
|
||||||
boost::tie(facesStart, facesEnd) = faces(tm);
|
boost::tie(facesStart, facesEnd) = faces(tm);
|
||||||
outTree.rebuild(facesStart, facesEnd, tm);
|
outTree.rebuild(facesStart, facesEnd, tm, vertexPointMap);
|
||||||
outTree.build();
|
outTree.build();
|
||||||
}
|
}
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue