Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] The triangle closest to a query point

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] The triangle closest to a query point


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] The triangle closest to a query point
  • Date: Tue, 23 Sep 2014 09:52:23 +0200
  • Organization: GeometryFactory

On 09/22/2014 09:58 PM, vahid wrote:
Thank you so much Sebastien for your help.

I can get the vertex coordinates of the closest triangles by using:
std::cerr << "closest primitive is: " << *closest_primitive << std::endl;
which gives me the coordinates of all the three vertices constructing the
triangle, consecutively. How can I get the location of the points separately
instead of having them all together? (I guess it is an easy process, but I
am a beginner in both CGAL and C++) .

My other question is that then how can I know which points are involved with
this triangles? I mean in the same example, is there a way so I can know for
instance points a,b, and d are the ones that are making the closest triangle
to the query point without performing a search among all the points?


The closest point is a point that is not necessarily a triangle vertex,
it is the closest points on the set of triangles provided.

If you want to perform nearest neighbors queries, you should use this
package:

http://doc.cgal.org/latest/Spatial_searching/index.html#Chapter_dD_Spatial_Searching

Sebastien.

Vahid



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/The-triangle-closest-to-a-query-point-tp4659854p4659870.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page