Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] AABB Trees and Polyhedrons

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] AABB Trees and Polyhedrons


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] AABB Trees and Polyhedrons
  • Date: Fri, 10 Dec 2010 15:27:18 +0100
  • Organization: GeometryFactory

On Friday 10 December 2010 15:21:08 Arun Ramasamy wrote:
> Hi,
> I'm using the AABB tree data structure to query if a polyhedron intersects
> with planes/line segments. I'm also altering the polyhedron mesh using
> Euler operators based on the results from the query. Is it possible to
> adjust the AABB tree to the changed polyhedron, without initializing it
> completely from scratch. So in the steps below:
>
> 1. Polyhedron ph;
> 2. AABB_Tree tree(ph.facets_begin(), ph.facets_end());
> 3. result = tree.all_intersections(plane_query);
> 4. ph.euler_operation(result); //eg ph.split_edge();
>
> After altering the polyhedron like this, can I query the AABB_Tree again
> like
>
> 5. resultnew = tree.all_intersections(plane_query_new); //tree is not
> adjusted
>
> If not, is there an alternative through which I can make the tree adjust
> based only on the changed part of the polyhedron.

No. The construction of the AABB tree is static. All what you can do is
rebuild the tree, with:

tree.rebuild(ph.facets_begin(), ph.facets_end());

after the operation #4, but that will cost the construction of a new tree.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page