Subject: CGAL users discussion list
List archive
- From: <>
- To:
- Subject: [cgal-discuss] AABBTree primitives or objects problem
- Date: Thu, 3 Dec 2009 17:03:33 +0100 (CET)
Hi,
I am working with a polyhedron_3, searching in it with an AABBTree. The
polyhedron is 2-Manifold and pure triangular mesh. My question is if I try to
use a Segment_3 that I know, in advanced, intersects in one vertice (with 5
facets around it) the tree.number_of_intersected_primitives(Segment) gives me
5
intersections. But if I use the code to test what type of objects are. only 3
are Point_3. What are the other 2?
This is is the code that I am using:
S is Segment_3
tree is AABBTree
std::cout << tree.number_of_intersected_primitives(S)
<< " intersection(s)" << std::endl;
std::list<Object_and_primitive_id> intersections;
tree.all_intersections(S, std::back_inserter(intersections));
std::list<Object_and_primitive_id>::iterator it;
std::cout << "intersections contains:\n";
for ( it=intersections.begin() ; it != intersections.end(); it++ ){
Object_and_primitive_id op = *it;
CGAL::Object object = op.first;
Point_3 point;
if(CGAL::assign(point,object))
std::cout << "intersection object is a point : " << point <<
std::endl;
Segment segment;
if(CGAL::assign(segment,object))
std::cout << "intersection object is a segment : " << segment <<
std::endl;
}
- [cgal-discuss] AABBTree primitives or objects problem, robertolam, 12/03/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Camille Wormser, 12/03/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Roberto Lam, 12/04/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Camille Wormser, 12/04/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Roberto Lam, 12/04/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Camille Wormser, 12/04/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Joe C, 12/04/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Joe C, 12/07/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Roberto Lam, 12/04/2009
- Re: [cgal-discuss] AABBTree primitives or objects problem, Camille Wormser, 12/03/2009
Archive powered by MHonArc 2.6.16.