Closest vertex to a given 3D-Point on a Surface_mesh

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Closest vertex to a given 3D-Point on a Surface_mesh

weiherer.maximilian

Given a 3D-Point p = (x, y, z) on a Surface_mesh in CGAL, how to find the closest vertex to this point?


Virenfrei. www.avast.com
Reply | Threaded
Open this post in threaded view
|

Re: Closest vertex to a given 3D-Point on a Surface_mesh

andreas.fabri

If you only have one point, you have to compute the distance to all vertices.

If you have many query points, you can put the vertices in a kd-tree
and then perform your queries.

andreas

On 4/23/2019 12:06 AM, [hidden email] wrote:

Given a 3D-Point p = (x, y, z) on a Surface_mesh in CGAL, how to find the closest vertex to this point?


Virenfrei. www.avast.com
-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri