Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] AABBTree primitives versus objects

Subject: CGAL users discussion list

List archive

[cgal-discuss] AABBTree primitives versus objects


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] AABBTree primitives versus objects
  • Date: Thu, 3 Dec 2009 16:58:56 +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?

/**********/
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 versus objects, robertolam, 12/03/2009

Archive powered by MHonArc 2.6.16.

Top of Page