Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] traversal of two AABB trees

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] traversal of two AABB trees


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] traversal of two AABB trees
  • Date: Wed, 27 Apr 2011 09:40:01 +0200

Andre Massing wrote:
Den 13.04.11 17.02, skrev Laurent Rineau (GeometryFactory):
Le mercredi 13 avril 2011 17:42:28, Andre Massing a écrit :
Hi!

I have two distinct AABB tree hierarchies and want to traverse them (for
finding all the pairs of intersections) via a depth-first search and
some descent rules (e.g. biggest volume).
Is there any possibility to accomplish that? At a first glance the
interface for the AABB trees seems to provide query member functions,
but not possibility for traversing.
I don't want to use related package for intersecting sequences of dD
Iso-oriented box since I may use the AABB hierarchy for other purposes
as well (Actually the AABB tree is used for a FEM mesh and other queries
like distance or point location might occur).

Any pointers or comments are highly appreciated!

Undocumented. Have a look at the code. The important entry-point is the member
function template named traversal in<CGAL/AABB_tree.h>, and examples of the
traversal policies that can be passed to that function are in
<CGAL/internal/AABB_tree/AABB_traversal_traits.h> (from memory, the precise
path may differ).

Thanks for the pointer! I found the member function

template <class Query, class Traversal_traits>
void traversal(const Query& query, Traversal_traits& traits) const

in the AABB_tree.h header file, but no AABB_traversal_traits or similiar files in the source (I am on CGAL 3.7).
It would be very nice to have an example at hand, are the examples included in the new beta-release of 3.8?

Kind regards,
Andre



As Laurent said, see this file:
include/CGAL/internal/AABB_tree/AABB_traversal_traits.h
and also
include/CGAL/internal/AABB_tree/AABB_node.h to see the
implementation of traversal at the node level (where the traits
is explicitely used).

S.


S.




Archive powered by MHonArc 2.6.16.

Top of Page