aabb tree: more code cleanup

This commit is contained in:
Pierre Alliez 2009-06-27 15:26:09 +00:00
parent dfa149a2d7
commit 8f3cbf217e
1 changed files with 7 additions and 6 deletions

View File

@ -42,17 +42,18 @@
template <class K>
int test()
{
// types
typedef typename K::FT FT;
typedef typename K::Line_3 Line;
typedef typename K::Point_3 Point;
typedef typename K::Segment_3 Segment;
// load polyhedron
typedef CGAL::Polyhedron_3<K> Polyhedron;
Polyhedron polyhedron;
std::ifstream ifs("./data/tetrahedron.off");
ifs >> polyhedron;
typedef typename K::FT FT;
typedef typename K::Point_3 Point;
typedef typename K::Segment_3 Segment;
typedef typename K::Line_3 Line;
// construct tree from facets
typedef typename CGAL::AABB_polyhedron_triangle_primitive<K,Polyhedron> Primitive;
typedef typename CGAL::AABB_traits<K,Primitive> Traits;
@ -81,7 +82,7 @@ int test()
any = tree.any_intersection(pq);
if(!any)
{
std::cerr << "any intersection did not find any intersection" << std::endl;
std::cerr << "did not find any intersection" << std::endl;
return EXIT_FAILURE;
}
Object_and_primitive_id op = *any;