Subject: CGAL users discussion list
List archive
- From: Nikolas Engelhard <>
- To: "" <>
- Subject: [cgal-discuss] Failing call of Triangle_3.has_on
- Date: Thu, 10 Dec 2009 18:20:48 +0100
Hello I'm writing a little raycasting-Program and have a problem with intersection a Triangle with a Ray. Since this intersection is not yet supported, I intersect the ray with the supporting plane of the Triangle and check if the point is within the triangle. Here are my Definitions: #include <CGAL/Exact_predicates_exact_constructions_kernel.h> typedef CGAL::Exact_predicates_exact_constructions_kernel K; typedef CGAL::Point_3<K> P; typedef CGAL::Triangle_3<K> Tri; typedef CGAL::Ray_3<K> R; typedef CGAL::Vector_3<K> V; and a little sample: P t(0,0,0); P q(10,0,0); P r(0,10,0); Tri tri(t,q,r); P s(1,1,1); V v(0,0,-1); R ray(s,v); P is(5,4.5,0); cout << is << " " << tri << endl; if (tri.has_on(is)){ cout << "intersection" << endl; } else cout <<"no intersection" << endl;
I would expect to find an intersection ( "is" lies on tri) but I get "Program received signal: “EXC_BAD_ACCESS”." after calling has_on. Other functions like intersection(ray,plane) work well und in some cases also this call works (with different values), so I have no idea, what to do. Does anyone has an idea? Nikolas |
- [cgal-discuss] Find a tetrahedron in space, Leandro Gazoni, 12/10/2009
- Re: [cgal-discuss] Find a tetrahedron in space, Panagiotis Foteinos, 12/10/2009
- [cgal-discuss] Failing call of Triangle_3.has_on, Nikolas Engelhard, 12/10/2009
- Re: [cgal-discuss] Failing call of Triangle_3.has_on, Pierre Alliez, 12/10/2009
- [cgal-discuss] Failing call of Triangle_3.has_on, Nikolas Engelhard, 12/10/2009
- [cgal-discuss] Reduce Skeleton computation time, Conti Manuele, 12/10/2009
- Re: [cgal-discuss] Find a tetrahedron in space, Panagiotis Foteinos, 12/10/2009
Archive powered by MHonArc 2.6.16.