Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] How do I get the primitive out of a tree after an intersection?

Subject: CGAL users discussion list

List archive

[cgal-discuss] How do I get the primitive out of a tree after an intersection?


Chronological Thread 
  • From: Rash <>
  • To: "" <>
  • Subject: [cgal-discuss] How do I get the primitive out of a tree after an intersection?
  • Date: Tue, 3 Jul 2018 19:14:13 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:gK/poRRnsd4jw2n7GxB3W3Gvptpsv+yvbD5Q0YIujvd0So/mwa69ZhaN2/xhgRfzUJnB7Loc0qyK6/6mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbJ/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/nzZisJwkqxVoxyvqBJwzIHWfI6bO+Fzfr/fcN4AWWZNQshcWi5HD4ihb4UPFe0BPeNAoofhvVQOthu+DhSrCeP10DBInX/23awn3Ok6FAHG3QggEMgSv3TTqdX5LrodXv6swaTO0D7NbOtW1C/+5YXIaBwtvP+BUahtfcffzUQjDR7Jg1aTpID9Ij+Y1ecAv3Kf4udhT+6jlm0qpx9rrjSx2sshio/EjZ8PxF/e7yV22oM1KMW4SEFlZd6kF4NduDyHOIdrRs4vTH9ktSkgxr0Fo5G7ZzMKx4o9xx7BdfOHaZKE7Q7kVOaUOTt4hXRld6yjhxuq8kWtyvfwWtS63VpQsyZInN3BumoQ2xHQ6cWLUv598V2g2TaL2QDT8OZEIUUsmKrBMZEh2b4wlpsOvknYGy/2mUH2g7WKeUUj/+ik8fnobav+qp+GK4B0kh3+MrgpmsGnHes4PRIBX2yC9euh1b3j5lH2QKhRjv0tiaTZq5DbJcEDpqGjGQNV04Aj6wy+Dzi8ytgYk2MHfxp5f0fNhIfgPxTCIevzEOykq1WqijZigf7cdPW1CZrEKj3PkazqYK1mw09a0gs6i95FscF6ELYEdcj6QU+54MbRFR84PySxwuLuA9J4kI8TDzHcSpSFOb/f5AfbrtkkJPOBMddM6WTNbsM97vurtkcX3FoUfK2nx5wSMSrqG/ViKk6eZDzgj4VZSDtYjk8FVOXvzWa6f3tLfX/rBfA55zUyA4WjS4vOFNj03e6xmRyjF5gTXVhoT1CBFXCyLNeIV65dNHjOZMxoiScJT6asUckq0hT87AI=

Dear Readers,

I fail horribly at retrieving the primitive which causes the intersection. I calculate a hit:

boost::optional<Primitive_id> hit = tree.first_intersected_primitive(rays[this->transformCoordinates(y,x)]);

Then check if a hit happened:

if(hit)

And then the chaos starts. There is simply no "getIntersectedPrimitive" member function of primitive id. What I am doing wrong? How can I do it right?

Currently I am getting an iterrator for faces (at least this is what I think what I am doing). Then I get the first face. This seems to be a pretty strange approach. How can I get the the normal of I_Polyhedron_facet and how do I get the intersection point?


CGAL::internal::In_place_list_iterator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Simple_cartesian<double>, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Simple_cartesian<double> > > > >, std::allocator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Simple_cartesian<double>, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Simple_cartesian<double> > > > > > > it = *hit;


CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Simple_cartesian<double>, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Simple_cartesian<double> > > >::Halfedge_around_facet_circulator ipfacet = it->facet_begin();

Kind regards
Rashid



Archive powered by MHonArc 2.6.18.

Top of Page