Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] The triangle closest to a query point
- Date: Mon, 22 Sep 2014 16:20:12 +0200
- Organization: GeometryFactory
On 09/18/2014 11:40 PM, vahid wrote:
Hi all
I am trying to use the example " AABB_triangle_3_example.cpp
<http://doc.cgal.org/latest/AABB_tree/AABB_tree_2AABB_triangle_3_example_8cpp-example.html>
" to find the closest point in the union of all input primitives to a query
point.
I would like to be able to have more information about the obtained closest
point such as which triangle (id number) contains the closest point or if it
lies on an input point, what is the id number of the input point.
I have tried to use:
Point_and_primitive_id pp = tree.closest_point_and_primitive(point_query);
std::cerr << "closest point is: " << pp.first << std::endl;
which gives me the same results, but I cannot manage to get any id from
pp.second (I get errors).
I would appreciate any help on this matter.
try:
Point_and_primitive_id closest_point = tree.closest_point_and_primitive(point_query);
std::cerr << "closest point is: " << closest_point.first << std::endl;
Iterator closest_primitive = closest_point.second;
Sebastien.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/The-triangle-closest-to-a-query-point-tp4659854.html
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.