add intersection of two AABB_tree#9501
Conversation
…nto AABB-add_paralllellization
…ntersection of meshes
…ersecting_primtives
|
/build:v0 |
|
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9501/v0/Manual/index.html |
|
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9501/v0/Manual/index.html |
|
/force-build:v0 |
|
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9501/v0/Manual/index.html |
afabri
left a comment
There was a problem hiding this comment.
Do you plan to add a documented function in PMP?
|
|
||
| bool do_intersect(const Query& query, const Node& node) const | ||
| { | ||
| #if 1 |
Not in this PR |
|
Successfully tested in CGAL-6.3-Ic-31 |
sloriot
left a comment
There was a problem hiding this comment.
You imported code from PMP but you left the code duplicated in PMP. Any reason why PMP shall not use the new code?
| #if 1 | ||
| return m_traits.do_intersect_object()(query, compute_transformed_bbox(node.bbox())); | ||
| #else | ||
| return Convex_hull_3::do_intersect(query, node.bbox(), parameters::transformation(Aff_transformation_3<Kernel>(m_transfo))) |
There was a problem hiding this comment.
what's the conclusion on this one?
There was a problem hiding this comment.
do_overlap(compute_ntransformed_bbox) is about 5× faster than do_intersect(bb1, bb2, transform), but both are still two orders of magnitude slower than do_overlap without a transformation.
The best solution would probably be to implement a specialized do_intersect function for a bounding box and an OBB.
| m_p_search_tree = std::make_unique<const Search_tree>(first, beyond); | ||
| std::unique_ptr<Search_tree> p_search_tree = std::make_unique<Search_tree>(first, beyond); | ||
| p_search_tree->template build<ConcurrencyTag>(); | ||
| m_p_search_tree = std::move(p_search_tree); |
There was a problem hiding this comment.
why do you need a temporary variable?
There was a problem hiding this comment.
because m_p_search_tree points a const and build() is not a const method.
There was a problem hiding this comment.
sounds strange that you cannot call a function but can override it.
There was a problem hiding this comment.
I don't override it.
p_search_tree is not const, so I can call build() without any issue. Once it's moved to m_p_search_tree, however, it becomes const.
Previously, build() was called from the constructor, but that doesn't allow me to pass the ConcurrencyTag. That's why I separated the build() call from the constructor.
| return zmax() - zmin(); | ||
| } | ||
|
|
||
| inline double Bbox_3::squared_diagonal_length() const { |
There was a problem hiding this comment.
I think there is a similar function used in the demo
There was a problem hiding this comment.
If it is in the demo, it can be replaced as soon as the convenience function is added to Bbox_3.
|
This pull-request was previously marked with the label |
Summary of Changes
Add a parallellization of
AABB_tree::build()(without any mutex) to improve running time.Add
PMP::AABB_self_intersections(), a variant ofPMP::self_intersections()that used anAABB_treeinstead ofCGAL::box_intersection_d.Todo
Release Management