AABB tree: added (commented) example of projection against a set of segments.

does not compile for now
This commit is contained in:
Pierre Alliez 2009-04-26 20:59:43 +00:00
parent 73364294e5
commit 2421c82abe
5 changed files with 17 additions and 20 deletions

View File

@ -1,7 +1,7 @@
\section{Introduction} \section{Introduction}
\label{AABB_tree_section_intro} \label{AABB_tree_section_intro}
The AABB tree component offers a data structure and algorithms to perform efficient intersection and projection of 3D queries against a large set of 3D geometric objects. Common examples of intersection queries include a ray or line or segment against a set of triangles, and a plane against a set of segments. A common example of projection query is to find the closest point from a point query to a set of triangles. The AABB tree component offers a data structure and algorithms to perform efficient intersection and projection of 3D queries against a large set of 3D geometric objects. Common examples of intersection queries include a ray or line or segment against a set of triangles, and a plane or triangle against a set of segments. A common example of projection query is to find the closest point from a point query to a set of triangles.
More generally, the set of geometric objects stored in the data structure may be queried for intersection detection, intersection computation and projection with any type of query type, provided that the corresponding intersection predicates and constructors are implemented in the traits class. More generally, the set of geometric objects stored in the data structure may be queried for intersection detection, intersection computation and projection with any type of query type, provided that the corresponding intersection predicates and constructors are implemented in the traits class.

View File

@ -35,7 +35,7 @@ typedef K::FT FT;
typedef K::Point_3 Point; typedef K::Point_3 Point;
typedef K::Plane_3 Plane; typedef K::Plane_3 Plane;
typedef K::Segment_3 Segment; typedef K::Segment_3 Segment;
typedef K::Triangle_3 Triangle;
typedef std::list<typename Segment>::iterator Iterator; typedef std::list<typename Segment>::iterator Iterator;
typedef CGAL::AABB_segment_primitive<K,Iterator> Primitive; typedef CGAL::AABB_segment_primitive<K,Iterator> Primitive;
@ -55,8 +55,21 @@ int main(void)
segments.push_back(Segment(c,d)); segments.push_back(Segment(c,d));
Tree tree(segments.begin(),segments.end()); Tree tree(segments.begin(),segments.end());
Plane plane(a,b,d); Plane plane(a,b,d);
std::cout << tree.number_of_intersections(plane) std::cout << tree.number_of_intersections(plane)
<< " intersections(s) with plane" << std::endl; << " intersections(s) with plane" << std::endl;
Triangle triangle(a,b,c);
std::cout << tree.number_of_intersections(triangle)
<< " intersections(s) with triangle" << std::endl;
// TOFIX: following does not compile due to intersection(const Sphere& sphere,
// const P& pr,Projection&...function in AABB_traits.h
//Point hint(a);
//Point query(2.0, 2.0, 2.0);
//Point closest = tree.closest_point(query,hint);
return 0; return 0;
} }

View File

@ -1 +1 @@
Static collision model for triangle soups. Data structure for efficient intersection and projection.

View File

@ -1,16 +1 @@
This package implements a collision detection algorithm, using so called AABB trees, This package implements a hierarchy of axi-aligned bounding boxes (AABBs) for efficient intersection and projection of 3D queries against a set of geometric objects.
along the lines of
@article{terdiman2003ooc,
title={{Opcode: Optimized collision detection}},
author={Terdiman, P.},
year={2003}
}
This package will not be documented for CGAL-3.4. It is a stripped down version
of a generic tool (generic in terms of inputs and queries), which is still under
development. It is already added to the trunk because it is used by the Polyhedron
Demo to efficiently remesh polyhedral surfaces.
For CGAL-3.5, we hope to integrate the fully generic version, for triangle soups and
polylines, with more queries (intersection, projection), parallelism, etc.

View File

@ -1,3 +1,2 @@
Camille Wormser <Camille.Wormser@normalesup.org> Camille Wormser <Camille.Wormser@normalesup.org>
Pierre Alliez <Pierre.Alliez@sophia.inria.fr> Pierre Alliez <Pierre.Alliez@sophia.inria.fr>
Jane Tournois <Jane.Tournois@sophia.inria.fr>