Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Find all neighbours of a certain primitive

Subject: CGAL users discussion list

List archive

[cgal-discuss] Find all neighbours of a certain primitive


Chronological Thread 
  • From: Rash <>
  • To:
  • Subject: [cgal-discuss] Find all neighbours of a certain primitive
  • Date: Thu, 16 May 2019 01:57:43 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:Ofnh/B1dvqtp5E41smDT+DRfVm0co7zxezQtwd8Zse0VK/ad9pjvdHbS+e9qxAeQG9mCsrQV2qGM7ejJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglVmTaxe7d/IRG5oQnPt8QdnJdvJLs2xhbVuHVDZv5YxXlvJVKdnhb84tm/8Zt++ClOuPwv6tBNX7zic6s3UbJXAjImM3so5MLwrhnMURGP5noHXWoIlBdDHhXI4wv7Xpf1tSv6q/Z91SyHNsD4Ubw4RTKv5LptRRT1iikIKiQ5/XnUhMJ+jKxUrh2uqQJizYHIe4yaLuZycbnHct8GS2dMXMBcXDFBDIOmaIsPCvIMM/pCoInmp1sFsByzBRO2C+P0yj9Ih2L50LY/0+QgFQHJxhAvH9ULsHjOsdr6Kr4fXOaox6fGyjXDaulZ2Tb76IXQbh8hruuDXbZqfcrW00kvGAXIhUiTp4z9Jz6Y1eQAv3KG4+duT+6jlmAqpgVrrjSyxcohiZHFi4EWx1ze6Cl0zpo5Kce4RUN6e9KoDYZcuiOcOoBrWM0tWXtotzw/yrAeuZ60YiwKyJM/yhHCdvOLboyF7x39WOueOzt4h2hqeKmkhxms60ig1PPzVtOu3FlWqSpFl8HAtnEL1xPN9siKUvhw80e71TqS2Q3f8PxILE4wmKbBNpIswb09moIWsUvZHy/2nEv2jLWRdkUh4uWo8f7oYq7mpp+dKoB5kQT+MqUqmsOlHes4NQ0OU3KG9uuizLHj51H2QK1Wjv0qlanUqIzVJcsBqa69GgNaz4cj6w2jADe7y9QYhmIKLElFeRKCl4jmIUvCIPH+DfelglSjii1nx/7cPu6pPpKYJXfKlPLtfK129lVH4As119FWoZxOWZ8bJ/emYEbqtJSMFBYiMw246+PmDNx20YZYVW/ZUfzRC7/brVLdvrFnGOKLfoJA4G+hechg3ObniDoCoXFYZbOghMFFbXG8F/9hJgOVbCi024ZTISIxpgM7CdfSphiHWD9XaWy1WvtmtDQ6DIutCoKFSo3/2OXcjhf+JYVfYyV9Mn7JEXrscN/fCfsAMXPOeJMnkTUfTrW7VYI7kxqpsV2ixg==

Hi people,

I wrote a small raytracer (with CGAL::Surface_mesh<Point> Mesh) with tree acceleration in cgal. I would like to find all neighbours of a hit primitive.

Ray_intersection hit = tree.first_intersection(rays[y][x]);

if(hit)
{
    const Point& point =  boost::get<Point>(hit->first);
    const Primitive_id& primitive_id = boost::get<Primitive_id>(hit->second);
    //i need the neighbours of the hit primitive
}

How do I this? I found this documentation but it seems to work only for points not primitives:

https://doc.cgal.org/latest/Spatial_searching/index.html

And it searches for its euclidan distance not for being connected together.

Is there something like:

std::vector<Primitive_id&> ids = getNeighoursOfPrimive(primitive_id);


Like I said I am using CGAL::Surface_mesh<Point> Mesh for my mesh and their is only one mesh in the scene.

Kind regards
Rashid




Archive powered by MHonArc 2.6.18.

Top of Page