Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] How to obtain the handle of a triangle that is intersected by a ray
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] How to obtain the handle of a triangle that is intersected by a ray
- Date: Wed, 22 Mar 2017 08:23:04 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:02LylBNSCBbw+/dPYwUl6mtUPXoX/o7sNwtQ0KIMzox0KPz7rarrMEGX3/hxlliBBdydsKMZzbWO+Pm6ACRAuc/H6y9SNsQUFlcssoY/oU8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0IufrymUt2as8Pi3O+7/9jfYh5DmSGmSbJ0NhS/6wvL5ecMho43YJ08wBLSvnpFfaxywnlpIk7b3znx4cK94IRy3S1bp/U75o8KGfHhe6MiTLtESjEiG28w7czv8xLESF3ctTMnTmwKn08QUED+5xbgU8Kpvw==
- Organization: GeometryFactory
Replace:
KernelSCD::Vector_3 v = CGAL::Polygon_mesh_processing::compute_face_normal(primitive_id,points_3d);
by
KernelSCD::Vector_3 v = CGAL::normal(primitive_id->vertex(0), primitive_id->vertex(1), primitive_id->vertex(2) );
The function you were calling is meant to be used with a graph.
Sebastien.
On 03/21/2017 10:16 AM, adrian wrote:
I have an AABBtree structure and a ray that intersects it.
How do I obtain the handle of the triangle that is interesected by the ray?
The reason why I need that is that I need to compute the normal vector of
the intersected triangle.
I tried the following approach:
But the last line does not compile.
This is my code:
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/How-to-obtain-the-handle-of-a-triangle-that-is-intersected-by-a-ray-tp4662591.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] How to obtain the handle of a triangle that is intersected by a ray, adrian, 03/21/2017
- Re: [cgal-discuss] How to obtain the handle of a triangle that is intersected by a ray, Sebastien Loriot (GeometryFactory), 03/22/2017
Archive powered by MHonArc 2.6.18.