Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] AABB Primitve_id field

Subject: CGAL users discussion list

List archive

[cgal-discuss] AABB Primitve_id field


Chronological Thread 
  • From: Manu Kaul <>
  • To:
  • Subject: [cgal-discuss] AABB Primitve_id field
  • Date: Tue, 30 Oct 2012 16:00:13 +0100

Hi All,
I am trying out the AABB examples, and was wondering what the "Primitive_id" was and how I can print out the list of triangle IDs?
Trying out a plane intersection test, and now I want to know the triangles (their IDs) that have intersected successfully with my query plane.

  Point a(147.8, -90, 700 );
  Point b(-90, 28.9, 700 );
  Point c(-59.8, 150, 927 );
  // counts #intersections with a plane query
  Plane plane_query(a,b,c);


  std::list<Primitive_id> primitives;
  tree.all_intersected_primitives(plane_query, std::back_inserter(primitives));
  for (std::list<Primitive_id>::const_iterator i = primitives.begin(); i != primitives.end(); ++i)
    std::cout <<"Test triangle intersects with triangle " << *i  << std::endl;

  std::cout <<"------------------------------" <<std::endl;
  std::cout << tree.number_of_intersected_primitives(plane_query)
              << " intersection(s) found." << std::endl;


Cheers,
Manu

--

The greater danger for most of us lies not in setting our aim too high and falling short; but in setting our aim too low, and achieving our mark.
- Michelangelo



Archive powered by MHonArc 2.6.18.

Top of Page