Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] AABB trees with faces from several surface meshes

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] AABB trees with faces from several surface meshes


Chronological Thread 
  • From: Lucio Santi <>
  • To:
  • Subject: Re: [cgal-discuss] AABB trees with faces from several surface meshes
  • Date: Wed, 19 Dec 2018 10:25:47 -0300
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:gXl8LBH5+X4UOGUODRakz51GYnF86YWxBRYc798ds5kLTJ78pMSwAkXT6L1XgUPTWs2DsrQY07qQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDmwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KODE38G7VisJ+gqFVrg+/qRNj2IPbep2ZOeBkc6/BYd8XR2xMVdtRWSxbBYO8apMCAewcPelEron9oEYFowakCgmqGOPvyyJDi3jy3a0hyeshFx3G3A07Et0TrHvYtsj1O7wIXuyv1qbI1yzOYvVL0jnz74jIdwouofCKXb9obcXRxlMgFwffglWXs4zlMDWY3fkOvWiD9+dsSOKihmw9pwx1vDSj3MkhhpfTio4IxF3I6T11zJgpKdC8UkJ2Yt6pHIFOuy2HOIZ6WN4uTmN1tCs817YIo4S0fDIQx5Qi3xPfa+KIc4yP4h/7UeaRPS13iG5/dL2hiBe961SvyvHmWcmvylpKszFKncPWun8XzRzf8smHSv1j8Ue9wTuDygDe5+NeLU0wi6bXMZAszqAqmpYOv0nPAjf6mEDsg6+XckUk9PKo6+PiYrj+op+cLJV7igfiMqQvgcGwHPg3PhITX2eA4+uwzqfs/VfhTLVQkvI2irXZsIzdJckDuqG5DBVa0oI65xmiDjemy8gXnWQcLFJeYx+HlIjoO1TWIP/iF/u/glKskC1qx//cJLHhDI/NfTD/l+Lqcr95rkJd0wEu1st35pROC7hHLuigdFX2sYn8ExQ4NESPyuD7CZ0p0pgXX36OKqOSdr7YuBmB/LR8cKG3eIYJtWOleLAe7Pn0gCphwA5PTeySxZISLUuAMLFjKkSdb2Drh45YQ2sB+Bc0Rarjkg/bCGIBVzOJR6s5owoDJse+F46aH9Khi/qc1i79F4cEPjkbWGDJKm/hcsC/Y9lJaC+WJZU4wDkYXODnRp8o3g2nr0nnwbMhJ/CGoiA=

Thank you, Andreas.

I've already read that page and in fact my code is using OneFaceGraphPerTree set to CGAL::Tag_false. However, the primitive ID is still a plain face index. The class CGAL::SM_Face_index does not seem to have a way of referencing the surface mesh where that face comes from. Am I missing something?

Hello,

Please have a look at

https://doc.cgal.org/latest/AABB_tree/classCGAL_1_1AABB__face__graph__triangle__primitive.html

OneFaceGraphPerTreeis either CGAL::Tag_true or CGAL::Tag_false. In the former case, we guarantee that all the primitives will be from a common FaceGraph and some data will be factorized so that the size of the primitive is reduced. In the latter case, the primitives can be from different graphs and extra storage is required in the primitives. The default is CGAL::Tag_true.


Best,

Andreas

On 12/19/2018 2:00 PM, Lucio Santi wrote:
Hello,

I have an AABB tree storing triangular faces coming from different surface mesh instances. I'm using that data structure to compute intersections with rays, but currently the primitive ID that I obtain for each intersection query is just a face index (i.e., an instance of CGAL::Surface_mesh<Point_3>::Face_index). I would like to know which surface mesh this face belongs to. Is there a clean way to do this? I was thinking of providing my own AABB primitive somehow, but I'm not sure if this is the proper way to do it (and in fact I'm not even sure how this can be done).

Thanks in advance for your help,

Lucio
-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri



Archive powered by MHonArc 2.6.18.

Top of Page