Skip to content
Open
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
3076b28
Combine two orientation tests in one with only the third point being …
afabri May 7, 2026
613c369
fix and timer
afabri May 7, 2026
34e8912
Deal correctly with underflow/overflow
afabri May 10, 2026
01c0d1b
Add #include
afabri May 12, 2026
4680634
Add operator to Homogeneous
afabri May 12, 2026
5e6ff98
Add operator to Homogeneous
afabri May 12, 2026
94aa198
Fix determinants()
afabri May 12, 2026
2dafa20
Add documentation
afabri May 20, 2026
1167c30
Naive parallellization of corefine
LeoValque May 27, 2026
02656bf
Merge remote-tracking branch 'afabri/Kernel-combine_orientation-GF' i…
LeoValque May 27, 2026
c6f560e
Parallellized build of AABB_tree
LeoValque May 28, 2026
5fadfb6
alternative version of PMP::self_intersections using AABB
LeoValque May 28, 2026
abca24c
Merge remote-tracking branch 'afabri/Kernel-combine_orientation-GF' i…
LeoValque May 28, 2026
a1fafcf
add example and benchmark of AABB_self_intersections
LeoValque May 28, 2026
11100ee
add AABB_meshes_intersections of two different meshes
LeoValque May 29, 2026
13b741f
Add two tree traversal intersection detection
LeoValque Jun 2, 2026
9274515
Two tree intersection of meshes and mixed AABB box_intersection for i…
LeoValque Jun 4, 2026
572bb8e
Benchmark meshes intersection
LeoValque Jun 4, 2026
d570a86
Improvement of AABB two tree traversals
LeoValque Jun 4, 2026
0e175fb
Solved fusion conflict
LeoValque Jun 4, 2026
9dbe1ae
Make intersection_callback more generic
LeoValque Jun 8, 2026
2bbe6b5
Create a intersection meshes fonction using a callback instead of an …
LeoValque Jun 8, 2026
a560f0e
Merge branch 'AABB-add_parallellization' into PMP-boolops_enhancement
LeoValque Jun 8, 2026
68af801
Reorganize two_tree_traversal and AABB_two_tree_traversal_traits
LeoValque Jun 9, 2026
2cebb83
Make API and Documentation of intersection of two AABB trees
LeoValque Jun 11, 2026
233d5d3
Change traversal strategy to traverse biggest bbox first
LeoValque Jun 11, 2026
6d958a3
Doc update
LeoValque Jun 11, 2026
1fa9eb5
Add benchmark code in PMP
LeoValque Jun 11, 2026
c9e7a5a
remove benchmark code of two tree traversal in AABB_tree
LeoValque Jun 11, 2026
65a76ee
Add test for AABB_trees::do_intersect and AABB_trees::all_pair_of_int…
LeoValque Jun 11, 2026
bb309c6
Merge branch 'AABB-add_parallellization' into PMP-boolops_enhancement
LeoValque Jun 15, 2026
13a1d3d
Replace box_d by AABB_tree and collect all edge-face intersection thr…
LeoValque Jun 15, 2026
2a71ce4
clean unused comment code
LeoValque Jun 15, 2026
e89dcc7
Rewrite construction of the output of boolean operations, write a spe…
LeoValque Jun 24, 2026
0389251
Parallelisation of fill_new_triangle_mesh
LeoValque Jun 25, 2026
91d2bb3
Add corefinement_mesh_union_bench
LeoValque Jun 25, 2026
827401b
Tree construction benchmarks
LeoValque Jul 1, 2026
17aaeb3
Parallelization of kd-tree construction in AABB-tree
LeoValque Jul 1, 2026
38b4eb9
Update performance in the user manual and apply first patch of sugges…
LeoValque Jul 2, 2026
6c8a889
Second patch of suggestion from the review
LeoValque Jul 2, 2026
d4a984e
Solve a unused warning when not link with TBB
LeoValque Jul 2, 2026
b533687
Update documentation
LeoValque Jul 3, 2026
c1cec3c
Add figure of documentation
LeoValque Jul 3, 2026
7349667
Add transformation parameter to CGALL::AABB_trees::do_intersect()
LeoValque Jul 6, 2026
6021eba
Various cleanup
LeoValque Jul 7, 2026
ca78bf8
aabb_two_trees_intersection.cpp
LeoValque Jul 7, 2026
9ed3515
Solve check headers error
LeoValque Jul 7, 2026
a8f5d08
<CGAL/Bbox_3.h> in Primive_helper.h
LeoValque Jul 7, 2026
7e992cb
Use Aff_transformation_repC3 instead of Aff_transformation_3 in CGAL:…
LeoValque Jul 8, 2026
91af779
Apply suggestions from the review
LeoValque Jul 8, 2026
2e7ada2
Merge remote-tracking branch 'origin/main' into AABB-add_parallelliza…
LeoValque Jul 8, 2026
89b449b
Solved aabb_two_trees_intersection error
LeoValque Jul 8, 2026
ec68ced
Solved warnings and errors in the testsuite
LeoValque Jul 9, 2026
13618f2
Add primitives for AABB tree on a triangkle soup
LeoValque Jul 9, 2026
66db995
Solved unused warning in the testsuite
LeoValque Jul 10, 2026
5159e56
Add AABB_tree_build_helper
LeoValque Jul 10, 2026
b9bdd23
parallel_call of connected components
LeoValque Jul 10, 2026
72cb79b
Apply suggestions from the review
LeoValque Jul 16, 2026
ebdaa83
Clean Aff_transformation in intersection of AABB trees
LeoValque Jul 20, 2026
2fef643
Add squared_diagonal_length to Bbox_2
LeoValque Jul 20, 2026
e1a8132
Correct compilation error when using AABB_segment_primitive_2 with Po…
LeoValque Jul 20, 2026
036de9c
Remove aabb_tree_with_join
LeoValque Jul 20, 2026
d0d280f
Correct compilation error when using AABB_segment_primitive_2 with Po…
LeoValque Jul 20, 2026
7aeca73
Merge branch 'AABB-add_parallellization' of github.com:LeoValque/cgal…
LeoValque Jul 23, 2026
b5ad15a
Remove unwanted modification of cmakelist
LeoValque Jul 23, 2026
530e06f
Add rounding mode protection to traversal with transformation
LeoValque Jul 23, 2026
b6b2b49
Merge branch 'AABB-add_parallellization' into PMP-boolops_enhancement
LeoValque Jul 23, 2026
18e497d
Merge branch 'Minkowski2-replace_AABB_tree_with_join' into AABB-add_p…
LeoValque Jul 23, 2026
5144b77
Remove outdating asserts
LeoValque Jul 23, 2026
6a9a7f8
Solved a compile bug with Protect_FPU_rounding
LeoValque Jul 23, 2026
f6222ed
Correct result error in a test
LeoValque Jul 23, 2026
1d4dc30
Remove Protect_FPU_rounding and simply used interval_nt<true>
LeoValque Jul 24, 2026
8b1d4f4
Solved a memory issue when gettint the transformation from the parameter
LeoValque Jul 27, 2026
188e642
add missing dep
sloriot Jul 27, 2026
7fecb19
Merge branch 'AABB-add_parallellization' into PMP-boolops_enhancement
LeoValque Jul 28, 2026
257cb5c
Solved a mismatch bug between a defined type and the type return by t…
LeoValque Jul 28, 2026
60e351a
Merge branch 'AABB-add_parallellization' of github.com:LeoValque/cgal…
LeoValque Jul 28, 2026
75c8a56
Revert unwanted local change in test_minkoswki_sum
LeoValque Jul 28, 2026
acfbe78
Solved a compilation error with not default constructible PointMap
LeoValque Jul 28, 2026
41019f9
Add test that produces VC warning
afabri Jul 29, 2026
83cef1e
untabify
afabri Jul 29, 2026
8fe54d2
assign to a reference and output
afabri Jul 29, 2026
6b14899
Solved a bug of a dereference a temporary after construct_source_2
LeoValque Jul 29, 2026
13e46fd
Merge branch 'AABB-add_parallellization' of github.com:LeoValque/cgal…
LeoValque Jul 29, 2026
068035a
Add missing const in AABB_segment_primitive_2 and add a test on vecto…
LeoValque Jul 29, 2026
3bbd97c
Avoid unused warnings
LeoValque Jul 29, 2026
0926ddf
Solved a bug when using AABB_trees::do_intersect() with primitive tha…
LeoValque Jul 30, 2026
97e6580
Merge branch 'AABB-add_parallellization' into PMP-boolops_enhancement
LeoValque Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AABB_tree/benchmark/AABB_tree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ if(benchmark_FOUND)
target_link_libraries(tree_creation PRIVATE benchmark::benchmark)
else()
message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.")
endif()
endif()
4 changes: 4 additions & 0 deletions AABB_tree/doc/AABB_tree/PackageDescription.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@
- `CGAL::AABB_primitive<Id,ObjectPropertyMap,PointPropertyMap,ExternalPropertyMaps,CacheDatum>`
- `CGAL::AABB_halfedge_graph_segment_primitive<HalfedgeGraph,Vpm,OneHalfedgeGraphPerTree,CacheDatum>`
- `CGAL::AABB_face_graph_triangle_primitive<FaceGraph,Vpm,OneFaceGraphPerTree,CacheDatum>`

\cgalCRPSection{Functions}
- `CGAL::AABB_trees::do_intersect()`
- `CGAL::AABB_trees::all_pairs_of_intersecting_primitives()`
*/
21 changes: 18 additions & 3 deletions AABB_tree/doc/AABB_tree/aabb_tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ triangles, or plane objects (planes, triangles) against sets of
segments. An example of a distance query consists of finding the
closest point from a point query to a set of triangles.

Note that this component is not suited to the problem of finding all
intersecting pairs of objects. We refer to the component
This component solves the problem of finding all
intersecting pairs of objects and achieves better perfomance than
\ref chapterBoxIntersection "Intersecting Sequences of dD Iso-oriented Boxes"
which can find all intersecting pairs of iso-oriented boxes.
when using parallell execution.
Comment thread
LeoValque marked this conversation as resolved.
Outdated

The AABB tree data structure takes as input an iterator range of
geometric data, which is then converted into primitives. From these
Expand Down Expand Up @@ -109,6 +109,13 @@ For example if one is using `CGAL::AABB_traits` with a Kernel from \cgal,
having degenerate triangles or segments in the AABB-tree will result in an undefined
behavior or a crash.

\section two_aabb_tree_interface Operation between two trees

Given two AABB trees, the functions `CGAL::AABB_trees::do_intersect()` and
`CGAL::AABB_trees::all_pairs_of_intersecting_primitives()` can be used to compute,
respectively, whether the two sets intersect and the list of all
intersecting object pairs.

\section aabb_tree_examples Examples

\subsection aabb_tree_examples_1 Tree of Triangles, for Intersection and Distance Queries
Expand Down Expand Up @@ -206,6 +213,14 @@ triangle set stored through two arrays: one array of points and one
array of indices which refer to the point array. Here also the
primitive internally uses a `boost::iterator_adaptor`.

\subsection aabb_tree_examples_9 Intersections of two trees

In the following example, we compute all the intersections between two tetrahedron. The tetrahedron
Comment thread
LeoValque marked this conversation as resolved.
Outdated
are stored as a vector of `Triangle_3`. We first compute if the tetrahedron do intersect and then we
Comment thread
LeoValque marked this conversation as resolved.
Outdated
draw the indices of the intersecting triangle.
Comment thread
LeoValque marked this conversation as resolved.
Outdated
Comment thread
LeoValque marked this conversation as resolved.
Outdated

\cgalExample{AABB_tree/AABB_intersection_example.cpp}

\section aabb_tree_perf Performances

We provide some performance numbers for the case where the AABB tree
Expand Down
1 change: 1 addition & 0 deletions AABB_tree/doc/AABB_tree/examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
\example AABB_tree/AABB_triangle_3_example.cpp
\example AABB_tree/AABB_halfedge_graph_edge_example.cpp
\example AABB_tree/AABB_face_graph_triangle_example.cpp
\example AABB_tree/AABB_intersection_example.cpp
*/
59 changes: 59 additions & 0 deletions AABB_tree/examples/AABB_tree/AABB_intersection_example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <CGAL/AABB_tree.h>
#include <CGAL/AABB_traits_3.h>
#include <CGAL/AABB_triangle_primitive_3.h>
#include <CGAL/AABB_trees/intersection.h>

#include <iostream>
#include <fstream>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

typedef K::Point_3 Point;
typedef K::Triangle_3 Triangle;

typedef std::vector<Triangle>::iterator Iterator;
typedef CGAL::AABB_triangle_primitive_3<K, Iterator> Primitive;
typedef CGAL::AABB_traits_3<K, Primitive> AABB_triangle_traits;
typedef CGAL::AABB_tree<AABB_triangle_traits> Tree;

int main()
{
Point a(1.0, 0.0, 0.0);
Point b(0.0, 1.0, 0.0);
Point c(0.0, 0.0, 1.0);
Point d(0.0, 0.0, 0.0);

Point e(1.2, 0.2, 0.2);
Point f(0.2, 1.2, 0.2);
Point g(0.2, 0.2, 1.2);
Point h(0.2, 0.2, 0.2);

std::vector<Triangle> tetra1;
tetra1.push_back(Triangle(a,b,c));
tetra1.push_back(Triangle(a,b,d));
tetra1.push_back(Triangle(a,d,c));
tetra1.push_back(Triangle(b,c,d));

std::vector<Triangle> tetra2;
tetra2.push_back(Triangle(e,f,g));
tetra2.push_back(Triangle(e,f,h));
tetra2.push_back(Triangle(e,h,g));
tetra2.push_back(Triangle(f,g,h));

// constructs AABB tree
Tree tree1(tetra1.begin(),tetra1.end());
Tree tree2(tetra2.begin(),tetra2.end());

// do intersect
std::cout << "Tetrahedrons do intersect: " << CGAL::AABB_trees::do_intersect(tree1, tree2) << std::endl;

std::vector< std::pair<Iterator, Iterator> > intersections;
CGAL::AABB_trees::all_pairs_of_intersecting_primitives(tree1, tree2, std::back_inserter(intersections));

for(auto [id1, id2]: intersections)
std::cout << "ids: " << std::distance(tetra1.begin(), id1) << " " << std::distance(tetra2.begin(), id2) << std::endl;

return EXIT_SUCCESS;
}
Loading
Loading