Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: Intersection of surfaces
- Date: Thu, 26 May 2011 08:20:59 +0200
Roger Mason wrote:
Hi Sebastien,Something like this.
Many thanks for your reply.
"Sebastien Loriot (GeometryFactory) [via cgal-discuss]"
<[hidden email] </user/SendEmail.jtp?type=node&node=3550411&i=0>> writes:
> Create two vectors of such bbox (using Bbox_3 of the three points of
> each triangle and the Face_handle) and then do the triangle-triangle
> intersection in the callback.
You mean iterate over the triangles in each surface, putting them in a
vector of bbox? Something like this (from 61.5)?
// Create the corresponding vector of bounding boxes
std::vector<Box> boxes;
for ( Iterator i = triangles.begin(); i != triangles.end(); ++i)
boxes.push_back( Box( i->bbox(), i));
typedef CGAL::Box_intersection_d::Box_with_handle_d<double,3,Terrain::Finite_faces_iterator> Box;
std::vector<Box> boxes;
boxes.reserve(t.number_of_faces);
Terrain t;
Terrain::Finite_faces_iterator fit=t.finite_faces_begin();
for (;fit!=t.finite_faces_end();++it){
CGAL::Bbox_3 bbox=fit->vertex(0)->point().bbox()+
fit->vertex(1)->point().bbox()+
fit->vertex(2)->point().bbox();
boxes.push_back(Box(bbox,fit));
}
The triangles should be created only in the callback.
S.
Sorry to be so stupid about this, but I don't usually deal with such
abstract programming methods.
I understand perfectly if you don't have time to help further.
Thanks,
Roger
------------------------------------------------------------------------
View this message in context: Re: Intersection of surfaces <http://cgal-discuss.949826.n4.nabble.com/Intersection-of-surfaces-tp3549940p3550411.html>
Sent from the cgal-discuss mailing list archive <http://cgal-discuss.949826.n4.nabble.com/> at Nabble.com.
- [cgal-discuss] Intersection of surfaces, Roger Mason, 05/25/2011
- Re: [cgal-discuss] Intersection of surfaces, Sebastien Loriot (GeometryFactory), 05/25/2011
- [cgal-discuss] Re: Intersection of surfaces, Roger Mason, 05/25/2011
- Re: [cgal-discuss] Re: Intersection of surfaces, Sebastien Loriot (GeometryFactory), 05/26/2011
- [cgal-discuss] Re: Intersection of surfaces, Roger Mason, 05/26/2011
- [cgal-discuss] Re: Intersection of surfaces, Roger Mason, 05/30/2011
- Re: [cgal-discuss] Re: Intersection of surfaces, Andreas Fabri, 05/30/2011
- [cgal-discuss] Re: Intersection of surfaces, Roger Mason, 05/30/2011
- Re: [cgal-discuss] Re: Intersection of surfaces, Andreas Fabri, 05/30/2011
- [cgal-discuss] Re: Intersection of surfaces, Roger Mason, 05/30/2011
- Re: [cgal-discuss] Re: Intersection of surfaces, Francois Berenger, 05/31/2011
- [cgal-discuss] Re: Intersection of surfaces, Roger Mason, 05/30/2011
- Re: [cgal-discuss] Re: Intersection of surfaces, Andreas Fabri, 05/30/2011
- Re: [cgal-discuss] Re: Intersection of surfaces, Sebastien Loriot (GeometryFactory), 05/26/2011
- [cgal-discuss] Re: Intersection of surfaces, Roger Mason, 05/25/2011
- Re: [cgal-discuss] Intersection of surfaces, Sebastien Loriot (GeometryFactory), 05/25/2011
Archive powered by MHonArc 2.6.16.