Fix using the mesh point when the SotM is built from a tree

This commit is contained in:
Mael Rouxel-Labbé 2024-03-14 11:00:45 +01:00
parent 57a1262117
commit c984e0e08a
1 changed files with 3 additions and 2 deletions

View File

@ -170,6 +170,7 @@ public:
const GeomTraits& gt = GeomTraits()) const GeomTraits& gt = GeomTraits())
: ray_functor(gt.construct_ray_3_object()) : ray_functor(gt.construct_ray_3_object())
, vector_functor(gt.construct_vector_3_object()) , vector_functor(gt.construct_vector_3_object())
, tm_ptr(nullptr)
, own_tree(false) , own_tree(false)
#ifdef CGAL_HAS_THREADS #ifdef CGAL_HAS_THREADS
, atomic_tree_ptr(&tree) , atomic_tree_ptr(&tree)
@ -232,7 +233,7 @@ public:
*/ */
Bounded_side operator()(const Point& point) const Bounded_side operator()(const Point& point) const
{ {
CGAL_assertion(CGAL::is_closed(*tm_ptr)); CGAL_assertion(tm_ptr == nullptr || CGAL::is_closed(*tm_ptr));
if(point.x() < box.xmin() if(point.x() < box.xmin()
|| point.x() > box.xmax() || point.x() > box.xmax()
@ -277,7 +278,7 @@ public:
template <class K2> template <class K2>
Bounded_side operator()(const typename K2::Point_3& point, const K2& k2) const Bounded_side operator()(const typename K2::Point_3& point, const K2& k2) const
{ {
CGAL_assertion(CGAL::is_closed(*tm_ptr)); CGAL_assertion(tm_ptr == nullptr || CGAL::is_closed(*tm_ptr));
if(point.x() < box.xmin() if(point.x() < box.xmin()
|| point.x() > box.xmax() || point.x() > box.xmax()