Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Sort primitives in AABB tree

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Sort primitives in AABB tree


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Sort primitives in AABB tree
  • Date: Tue, 3 Aug 2010 19:21:11 +0200 (MEST)
  • Importance: Normal

Hi Stéphane,
thank you for your prompt reply!

I'm not sure to really understand what you want to do.
Why don't you store a container of std::pair<Point,Iterator> (instead of a
Point container) ? Object_and_primitive_id contains the intersection
Object (oid.first) and also the identifier of the intersected primitive
(type Iterator in your code).

The problem was that I altered the order of the tree sorting the list of
the intersection points. In fact I need to follow the ray, that is to
control consecutive intersections in the volume starting from the sphere
surface where I set initial conditions. So, is your suggestion to store
and compare directly pairs intersection/Datum in order to set the sort
order?
Thanks again!
C.


You could also use a different kind of AABB_primitive, such as Datum is
Triangle_3 and Id is Tr::Facet_finite_iterator (or Tr::Facet). Thus, you
can get back the triangulation facet from the intersected
Object_and_primitive_id. See attached file (I didn't test it, it's just to
give you an hint).

Hope this helps,
Stéphane.





Archive powered by MHonArc 2.6.16.

Top of Page