Subject: CGAL users discussion list
List archive
- From: vahid <>
- To:
- Subject: Re: [cgal-discuss] The triangle closest to a query point
- Date: Tue, 23 Sep 2014 07:43:21 -0700 (PDT)
Actually, what I want to do is to project the query point on the surface, and use the closest point on the surface to distribute some information from the query point to the nodes of the closest triangle. My question specifically is that when CGAL returns the coordinates of the vertices of the triangle which includes the closest point, how can I find out the ID numbers of the vertices. For instance, if my surface has thousands of vertices and triangles, and I have found the closest point on the surface with the triangle that passes through that point, how can I find out the ID numbers of the vertices constructing that triangle (instead of their coordinates). That means if I call points a, b, c, d, etc as points 1, 2, 3, 4, ... then is there any way for CGAL to give me the ID number of the three vertices making the closest triangle (such as points 1, 2, and 4)?
Thanks,
Vahid
On Tue, Sep 23, 2014 at 3:52 AM, Sebastien Loriot (GeometryFactory) [via cgal-discuss] <[hidden email]> wrote:
On 09/22/2014 09:58 PM, vahid wrote:The closest point is a point that is not necessarily a triangle vertex,
> 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?
>
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.
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
If you reply to this email, your message will be added to the discussion below:http://cgal-discuss.949826.n4.nabble.com/The-triangle-closest-to-a-query-point-tp4659854p4659874.html
Vahid Abdollahi
PhD Candidate
CFD Lab, Mechanical Engineering Department
McGill University, Montreal, QC, Canada
Phone: (+1) 514 8051374
[hidden email]
View this message in context: Re: The triangle closest to a query point
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] The triangle closest to a query point, vahid, 09/18/2014
- Re: [cgal-discuss] The triangle closest to a query point, Sebastien Loriot (GeometryFactory), 09/22/2014
- Re: [cgal-discuss] The triangle closest to a query point, vahid, 09/22/2014
- Re: [cgal-discuss] The triangle closest to a query point, Sebastien Loriot (GeometryFactory), 09/23/2014
- Re: [cgal-discuss] The triangle closest to a query point, vahid, 09/23/2014
- Re: [cgal-discuss] The triangle closest to a query point, Sebastien Loriot (GeometryFactory), 09/29/2014
- Re: [cgal-discuss] The triangle closest to a query point, vahid, 09/23/2014
- Re: [cgal-discuss] The triangle closest to a query point, Sebastien Loriot (GeometryFactory), 09/23/2014
- Re: [cgal-discuss] The triangle closest to a query point, vahid, 09/22/2014
- Re: [cgal-discuss] The triangle closest to a query point, Sebastien Loriot (GeometryFactory), 09/22/2014
Archive powered by MHonArc 2.6.18.