mirror of https://github.com/CGAL/cgal
AABB tree: added doc
This commit is contained in:
parent
93611aa06b
commit
37b3262e71
|
|
@ -1,4 +1,15 @@
|
|||
* text=auto !eol
|
||||
AABB_tree/doc_tex/AABB_tree/AABB_tree_user.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree/PkgDescription.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree/main.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/AABBGeomTraits.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/AABBPrimitive.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/AABBTraits.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/AABBTrianglePrimitive.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/AABB_traits.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/AABB_tree.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/intro.tex -text
|
||||
AABB_tree/doc_tex/AABB_tree_ref/main.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations/Algebraic_foundations.png -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations/Algebraic_foundations2.png -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations/algebraic_structures.tex -text
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
\section{Introduction}
|
||||
|
||||
\label{AABB_tree_section_intro}
|
||||
|
||||
The AABB tree component offers a data structure and algorithms to perform efficient intersection detection and projection of queries against a large set of geometric primitives. Common examples of intersection queries include a 3D ray against a set of 3D triangles, and a 3D plane against a set of 3D segments. A common example of projection query amounts to find the closest point from a 3D point query to a large set of 3D triangles.\\
|
||||
|
||||
The data structure takes as input the set of geometric primitives
|
||||
which are to be queried for intersection detection and projection.
|
||||
From this set, a hierarchy of axis-aligned bounding boxes (AABBs) is built, and used to speed up intersection and projection queries. More specifically, the hierarchy construction is initialized by computing the AABB of the whole set of input primitives. All primitives are then stored along the longest axis of this box, and the primitives are separated into two equal sized sets. This procedure is applied recursively until an AABB contains conceptually only one primitive. In practice the design is a slightly different as the tree is leafless as presented in the OPCODE whitepaper http://www.codercorner.com/Opcode.pdf. An intersection query then traverses the tree by computing intersection tests only with respect to the AABBs during traversal, and with respect to the input primitives at the end of traversal, i.e., in the leafs of the tree. A projection query between, e.g., a point $q$ and a set of triangle primitives is turned into a \emph{ball} query centered at the query point. The ball then traverses the tree while recursively querying intersections with the AABBs, and computes the closest point $p$ from the query point to the input primitives only when the traversal ends at a leaf of the tree. The ball radius is then shrunk to the distance between p and q for all remaining recursive tree traversals. Efficiency requires providing a small initial ball radius which is guaranteed to intersect the input primitives.\\
|
||||
|
||||
The set of geometric primitive 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 predicates and constructors are implemented in the traits class.
|
||||
|
||||
% \section{Interface}
|
||||
% \label{AABB_tree_section_interface}
|
||||
|
||||
|
||||
\section{Examples}
|
||||
\label{AABB_tree_section_examples}
|
||||
|
||||
|
||||
\ccIncludeExampleCode{AABB_tree/AABB_example.cpp}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
\begin{ccPkgDescription}{AABB tree \label{Pkg:AABB_tree}}
|
||||
%\ccPkgHowToCiteCgal{cgal:y-t2-08}
|
||||
\ccPkgSummary{The AABB tree component is a component for efficient intersection detection and projection between, e.g., 3D line queries and larges set of 3D triangles or 3D plane queries and large sets of segments.}
|
||||
|
||||
%\ccPkgDependsOn{\ccRef[3D Triangulations]{Pkg:Triangulation3}}
|
||||
\ccPkgIntroducedInCGAL{3.5}
|
||||
\ccPkgLicense{\ccLicenseQPL}
|
||||
%\ccPkgDemo{Mesh_3}{mesh_3.zip}
|
||||
|
||||
%\ccPkgIllustration{Mesh_3/mesh3-small.png}{Mesh_3/mesh3-big.png}
|
||||
\end{ccPkgDescription}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
\ccUserChapter{AABB tree\label{AABB_tree}}
|
||||
\label{user_chapter_AABB_tree}
|
||||
|
||||
\ccChapterAuthor{Pierre Alliez, Laurent Rineau,
|
||||
Jane Tournois, Camille Wormser and Mariette Yvinec}
|
||||
|
||||
\input{AABB_tree/PkgDescription}
|
||||
|
||||
\minitoc
|
||||
|
||||
\input{AABB_tree/AABB_tree_user}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: AABBGeomTraits.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 25.02.2009 Author
|
||||
% | Package: Package
|
||||
% |
|
||||
\RCSdef{\RCSAABBGeomTraitsRev}{$Id: header.tex 40270 2007-09-07 15:29:10Z lsaboret $}
|
||||
\RCSdefDate{\RCSAABBGeomTraitsDate}{$Date: 2007-09-07 17:29:10 +0200 (Ven, 07 sep 2007) $}
|
||||
% |
|
||||
\ccRefPageBegin
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{AABBGeomTraits}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ defines the requirements for the first template parameter of the class \ccc{AABB_traits<GeomTraits, TrianglePrimitive>}. It provides query types as well as predicates and constructors to detect and compute intersections between objects of those query types with the primitives stored in the AABB tree. In addition, it contains query types as well as predicates and constructors to compute projections between a point query and the primitives stored in the AABB tree.
|
||||
|
||||
\ccGeneralizes
|
||||
|
||||
ThisConcept \\
|
||||
ThatConcept
|
||||
|
||||
\ccTypes
|
||||
|
||||
|
||||
\ccNestedType{Ray_3}{Ray type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Line_3}{Line type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_3}{Point type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Plane_3}{Plane type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Sphere_3}{Sphere type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Segment_3}{Segment type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Triangle_3}{Triangle type. This type should match
|
||||
the type \ccc{TrianglePrimitive::Triangle_3}.}
|
||||
\ccGlue
|
||||
\ccNestedType{Bbox_3}{Bounding box type.}
|
||||
|
||||
\ccNestedType{Do_intersect_3}
|
||||
{A functor object to detect intersections between two primitives.
|
||||
Provides the operators:
|
||||
\ccc{bool operator()(Type_1 type_1, Type_2 type_2);}
|
||||
where \ccc{Type_1} and \ccc{Type_2} are relevant types
|
||||
among \ccc{Ray_3}, \ccc{Segment_3}, \ccc{Line_3}, \ccc{Triangle_3}, \ccc{Sphere_3}, \ccc{Plane_3} and \ccc{Bbox_3} \}. Relevant herein means that a lineic primitive (ray, segment, line) is tested against a planar or solid primitive (plane, triangle, box, interior of a sphere), and a solid primitive is tested against another solid primitive (sphere against box, box against box). The operator returns \ccc{true} if \ccc{type_1} and \ccc{type_2}
|
||||
have a non empty intersection.}
|
||||
|
||||
\ccNestedType{Intersect_3}
|
||||
{A functor object to construct the intersection between two primitives.
|
||||
Provides the operators:
|
||||
\ccc{CGAL::Object operator()(Type_1 type_1, Type_2 type_2);}
|
||||
where \ccc{Type_1} and \ccc{Type_2} are any relevant types
|
||||
among \ccc{Ray_3}, \ccc{Segment_3}, \ccc{Line_3}, \ccc{Triangle_3}, \ccc{Sphere_3}, \ccc{Plane_3} and \ccc{Bbox_3}. \}.
|
||||
The operator computes a \ccc{CGAL::Object} which is the intersection between the objects \ccc{type_1} and \ccc{type_2}.}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{geomtraits} %% choose variable name
|
||||
|
||||
%\ccConstructor{AABBGeomTraits();}{default constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{Do_intersect_3 do_intersect_3_object();}
|
||||
{Returns the intersection detection functor.}
|
||||
|
||||
\ccMethod{Intersect_3 intersect_3_object();}
|
||||
{Returns the intersection constructor.}
|
||||
|
||||
\ccHasModels
|
||||
Any instantiation of \ccc{CGAL::Kernel} is a model of this traits concept.
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{AABB_traits<GeomTraits,TrianglePrimitive>}.
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: AABBPrimitive.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.02.2009 Author
|
||||
% | Package: Package
|
||||
% |
|
||||
\RCSdef{\RCSAABBPrimitiveRev}{$Id: header.tex 40270 2007-09-07 15:29:10Z lsaboret $}
|
||||
\RCSdefDate{\RCSAABBPrimitiveDate}{$Date: 2007-09-07 17:29:10 +0200 (Ven, 07 sep 2007) $}
|
||||
% |
|
||||
\ccRefPageBegin
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{AABBPrimitive}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ describes the requirements for the primitives stored in the AABB data structure. The concept encapsulates a type for the geometric primitives and an identifier type by which those primitives are referred to. The concept \ccRefName\ also refines the concepts DefaultConstructible and Assignable.
|
||||
|
||||
\ccConstructor{AABBPrimitive(Handle h);}
|
||||
{Constructs a primitive whose geometric primitive is the one h points to.}
|
||||
|
||||
% \ccGeneralizes
|
||||
|
||||
% ThisConcept \\
|
||||
% ThatConcept
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{Data_type}{The geometric primitive type.}
|
||||
|
||||
\ccNestedType{Id_type}{The type of identifiers by which the primitives are referred to.}
|
||||
|
||||
|
||||
\ccCreationVariable{primitive} %% choose variable name
|
||||
\ccOperations
|
||||
|
||||
%\ccMethod{void foo();}{some member functions}
|
||||
\ccMethod{Data_type get_data();}
|
||||
{Returns the geometric data wrapped inside the Primitive.}
|
||||
|
||||
\ccMethod{Id_type get_id();}
|
||||
{Returns the corresponding identifier. This identifier is only used as a representant for the primitive in the output of the \ccc{AABB_tree} methods.}
|
||||
|
||||
% \ccHasModels
|
||||
|
||||
% \ccc{AABB_primitive_base<ID>}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
\ccc{AABB_tree<Traits>}
|
||||
|
||||
\ccExample
|
||||
|
||||
Usually, the \ccc{Primitive} type is a wrapper around a \ccc{Handle}. Assume for instance, that geometric primitives
|
||||
are to be the faces of a mesh stored as a \ccc{CGAL::Polyhedron}, the Primitive type would be a wrapper around the \ccc{Face_handle} type of the polyhedron. The \ccc{Data_type} would be \ccc{Face},
|
||||
the \ccc{Id_type} would be \ccc{Face_handle}, \ccc{get_data()} would dereference the \ccc{Face_handle}, and \ccc{get_id()} would return the \ccc{Face_handle} itself.
|
||||
|
||||
% A short example program.
|
||||
% Instead of a short program fragment, a full running program can be
|
||||
% included using the
|
||||
% \verb|\ccIncludeExampleCode{Package/AABBPrimitive.C}|
|
||||
% macro. The program example would be part of the source code distribution and
|
||||
% also part of the automatic test suite.
|
||||
|
||||
% \begin{ccExampleCode}
|
||||
% void your_example_code() {
|
||||
% }
|
||||
% \end{ccExampleCode}
|
||||
|
||||
%% \ccIncludeExampleCode{Package/AABBPrimitive.C}
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: AABBTraits.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.02.2009 Author
|
||||
% | Package: Package
|
||||
% |
|
||||
\RCSdef{\RCSAABBTraitsRev}{$Id: header.tex 40270 2007-09-07 15:29:10Z lsaboret $}
|
||||
\RCSdefDate{\RCSAABBTraitsDate}{$Date: 2007-09-07 17:29:10 +0200 (Ven, 07 sep 2007) $}
|
||||
% |
|
||||
\ccRefPageBegin
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{AABBTraits}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ provides the geometric primitive types and methods for the class \ccc{AABB_tree<Traits>}.
|
||||
|
||||
% \ccGeneralizes
|
||||
|
||||
% ThisConcept \\
|
||||
% ThatConcept
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{Primitive}{This type must be a model of the concept
|
||||
\ccc{AABBPrimitive}.}
|
||||
\ccGlue
|
||||
\ccNestedType{Bounding_box}{Bounding box type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Intersection_type}{Typically a point or a \ccc{CGAL::Object} or a container of those.}
|
||||
|
||||
The following types are required for projection queries.
|
||||
|
||||
\ccNestedType{Sphere}{Sphere type.}
|
||||
\ccGlue
|
||||
\ccNestedType{Projection_query}{Type for which projection queries are issued, typically a point.}
|
||||
\ccGlue
|
||||
\ccNestedType{Projection_return}{Return type of projection queries, typically a point with additional information such as handle.}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{AABBTraits();}{default constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
During the construction of the \ccc{AABB_tree}, the primitives are sorted according to some comparison functions related to the $x$, $y$ or $z$ coordinate axis.
|
||||
|
||||
\ccMethod{bool x_less_than(const Primitive & pr1, const Primitive & pr2);}{}
|
||||
\ccGlue
|
||||
\ccMethod{bool y_less_than(const Primitive & pr1, const Primitive & pr2);}{}
|
||||
\ccGlue
|
||||
\ccMethod{bool z_less_than(const Primitive & pr1, const Primitive & pr2);}{}
|
||||
|
||||
|
||||
\ccMethod{Bounding_box compute_bbox(const_primitive_iterator p_begin, const_primitive_iterator p_end);}
|
||||
{Returns the bounding box of a set of primitives.}
|
||||
|
||||
The following predicates are required for each type \ccc{Query}
|
||||
for which the class \ccc{AABB_tree<Traits>} may receive a query.
|
||||
|
||||
\ccMethod{bool do_intersect(const Query & q, const Bounding_box & box);}
|
||||
{Returns true if the query intersects the bounding box, false otherwise.}
|
||||
\ccGlue
|
||||
\ccMethod{bool do_intersect(const Query & q, const Primitive::Data_type pr);}
|
||||
{Returns true if the query intersects the primitive, false otherwise.}
|
||||
\ccGlue
|
||||
\ccMethod{bool intersection(const Query & q,
|
||||
const Primitive::Data_type pr, Intersection_type & intersection);}
|
||||
{Returns true if the query intersects the primitive, and false otherwise. In the positive, stores the intersection in the last parameter. }
|
||||
|
||||
% PA: I removed this as we intersect a single primitive here, and we assume dealing only with convex primitives.
|
||||
% The \ccc{Intersection_type} may be a container for multiple intersections.
|
||||
|
||||
|
||||
|
||||
The following members are required only if projection queries are issued.
|
||||
\ccMethod{Sphere sphere_from_query_and_hint(const Projection_query & center,
|
||||
const Projection_return & hint);}
|
||||
{Returns a sphere centered at \ccc{center} and passing through \ccc{hint}.}
|
||||
|
||||
\ccMethod{ bool intersect(const Sphere & sphere,
|
||||
const Primitive::Data_type p,
|
||||
const Projection_return & pr);}
|
||||
{Returns true if the primitive is intersecting the ball defined as the interior of the sphere, and false otherwise. In the positive, the point of the primitive closest to the center of the sphere is stored in the last parameter.}
|
||||
|
||||
\ccMethod{bool is_smaller(const Sphere & a, const Sphere & b);}{Returns true if sphere $a$ is contained in sphere $b$. Both spheres are assumed to share the same center.}
|
||||
|
||||
\ccHasModels
|
||||
|
||||
\ccc{AABB_traits<GeomTraits,TrianglePrimitive>}.
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
\ccc{AABB_traits<GeomTraits,TrianglePrimitive>}\\
|
||||
\ccc{AABB_tree<Traits>}
|
||||
|
||||
|
||||
% \ccExample
|
||||
|
||||
% A short example program.
|
||||
% Instead of a short program fragment, a full running program can be
|
||||
% included using the
|
||||
% \verb|\ccIncludeExampleCode{Package/AABBTraits.C}|
|
||||
% macro. The program example would be part of the source code distribution and
|
||||
% also part of the automatic test suite.
|
||||
|
||||
% \begin{ccExampleCode}
|
||||
% void your_example_code() {
|
||||
% }
|
||||
% \end{ccExampleCode}
|
||||
|
||||
% %% \ccIncludeExampleCode{Package/AABBTraits.C}
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: AABBTrianglePrimitive.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 25.02.2009 Author
|
||||
% | Package: Package
|
||||
% |
|
||||
\RCSdef{\RCSAABBTrianglePrimitiveRev}{$Id: header.tex 40270 2007-09-07 15:29:10Z lsaboret $}
|
||||
\RCSdefDate{\RCSAABBTrianglePrimitiveDate}{$Date: 2007-09-07 17:29:10 +0200 (Ven, 07 sep 2007) $}
|
||||
% |
|
||||
\ccRefPageBegin
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{AABBTrianglePrimitive}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ describes the requirement for the primitive used in the class \ccc{AABB_traits<GeomTraits,TrianglePrimitive>}
|
||||
(which implements a model of \ccc{AABBTraits}) when the geometric primitives to be stored in the tree are triangles.
|
||||
|
||||
The concept \ccRefName\ refines the concept \ccc{AABBPrimitive}, with \ccc{Data_type} being \ccc{GeomTraits::Triangle_3}.
|
||||
|
||||
|
||||
\ccGeneralizes
|
||||
|
||||
\ccc{AABBPrimitive}\\
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{Triangle_3}{The type for triangles. This type should match
|
||||
the triangle type \ccc{GeomTraits::Triangle_3} provided by the geometric traits.}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{primitive} %% choose variable name
|
||||
|
||||
\ccConstructor{AABBTrianglePrimitive(TriangleHandle h);}
|
||||
{Constructs a primitive whose triangle is the one h points to.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{Triangle_3 triangle();}
|
||||
{Builds a triangle from the geometric primitive.}
|
||||
|
||||
% \ccHasModels
|
||||
|
||||
% \ccc{Some_class},
|
||||
% \ccc{Some_other_class}.
|
||||
|
||||
\ccSeeAlso
|
||||
\ccc{AABBPrimitive}\\
|
||||
\ccc{AABB_traits<GeomTraits,TrianglePrimitive>}\\
|
||||
|
||||
% \ccExample
|
||||
|
||||
% A short example program.
|
||||
% Instead of a short program fragment, a full running program can be
|
||||
% included using the
|
||||
% \verb|\ccIncludeExampleCode{Package/AABBTrianglePrimitive.C}|
|
||||
% macro. The program example would be part of the source code distribution and
|
||||
% also part of the automatic test suite.
|
||||
|
||||
% \begin{ccExampleCode}
|
||||
% void your_example_code() {
|
||||
% }
|
||||
% \end{ccExampleCode}
|
||||
|
||||
%% \ccIncludeExampleCode{Package/AABBTrianglePrimitive.C}
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: AABB_traits_base.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.02.2009 Author
|
||||
% | Package: Package
|
||||
% |
|
||||
\RCSdef{\RCSAABBtraitsbaseRev}{$Id: header.tex 40270 2007-09-07 15:29:10Z lsaboret $}
|
||||
\RCSdefDate{\RCSAABBtraitsbaseDate}{$Date: 2007-09-07 17:29:10 +0200 (Ven, 07 sep 2007) $}
|
||||
% |
|
||||
\ccRefPageBegin
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{AABB_traits<GeomTraits,TrianglePrimitive>} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ is a model of the concept \ccc{AABBTraits}. This traits class handle primitives whose geometric types are
|
||||
triangular facets. It provides intersection detections and computations for queries of types \ccc{CGAL::Ray_3}, \ccc{CGAL::Line_3} and \ccc{CGAL::Segment_3}, and projection computation for queries of type \ccc{Point_3}.
|
||||
|
||||
\ccParameters
|
||||
The template parameter \ccc{GeomTraits} provides the geometric types as well as the intersection tests and computations required.
|
||||
This type must be a model of the concept \ccc{AABBGeomTraits}.
|
||||
|
||||
The template parameter \ccc{TrianglePrimitivee} provides the triangular primitives stored in the AABB tree. This parameter must be a model of the concept \ccc{TrianglePrimitive}.
|
||||
|
||||
\ccInclude{AABB_traits.h}
|
||||
|
||||
% \ccIsModel
|
||||
|
||||
% Concept
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccTypedef{GeomTraits::Ray_3 Ray_3;}{Ray query type.}
|
||||
\ccTypedef{GeomTraits::Segment_3 Segment_3;}{Segment query type.}
|
||||
\ccTypedef{GeomTraits::Line_3 Line_3;}{Line query type.}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
%\ccConstructor{AABB_traits();}{default constructor.}
|
||||
|
||||
% \ccOperations
|
||||
|
||||
% \ccMethod{void foo();}{some member functions}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{AABBTraits},\\
|
||||
\ccc{AABB_tree<Traits>}, \\
|
||||
\ccc{AABBTrianglePrimitive}
|
||||
|
||||
%\ccExample
|
||||
|
||||
|
||||
|
||||
% A short example program.
|
||||
% Instead of a short program fragment, a full running program can be
|
||||
% included using the
|
||||
% \verb|\ccIncludeExampleCode{Package/AABB_traits_base.C}|
|
||||
% macro. The program example would be part of the source code distribution and
|
||||
% also part of the automatic test suite.
|
||||
|
||||
% \begin{ccExampleCode}
|
||||
% void your_example_code() {
|
||||
% }
|
||||
|
||||
|
||||
%% \ccIncludeExampleCode{Package/AABB_traits_base.C}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: AABB_tree.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.02.2009 Author
|
||||
% | Package: Package
|
||||
% |
|
||||
\RCSdef{\RCSAABBtreeRev}{$Id: header.tex 40270 2007-09-07 15:29:10Z lsaboret $}
|
||||
\RCSdefDate{\RCSAABBtreeDate}{$Date: 2007-09-07 17:29:10 +0200 (Ven, 07 sep 2007) $}
|
||||
% |
|
||||
\ccRefPageBegin
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{AABB_tree<Traits>} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ is a data structure for efficient intersection detection and projection. It builds a hierarchy of axis-aligned bounding boxes from a set of geometric primitives such as 3D triangles, and can received intersection and projection queries, provided that the corresponding predicates are implemented in the traits class. The design is a leafless design, as presented in the Opcode whitepaper http://www.codercorner.com/Opcode.pdf
|
||||
|
||||
The template parameter \ccc{Traits} stands for a traits class which must be a model of the concept \ccc{AABBTraits}.
|
||||
|
||||
\ccInclude{AABB_tree.h}
|
||||
|
||||
%\ccIsModel
|
||||
|
||||
%Concept
|
||||
|
||||
\ccTypes
|
||||
|
||||
|
||||
\ccTypedef{typedef Traits::Primitive Primitive;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Traits::Projection_query Projection_query;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Traits::Projection_return Projection_return;}{}
|
||||
%\ccNestedType{AABB}{some nested types}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{aabb} %% choose variable name
|
||||
|
||||
\ccConstructor{AABB_tree();}{Default constructor.}
|
||||
\ccConstructor{template < class ConstPrimitiveIterator>
|
||||
AABB_tree( ConstPrimitiveIterator begin,
|
||||
ConstPrimitiveIterator end );}
|
||||
{Builds the datastructure. Type \ccc{ConstPrimitiveIterator} can be any const iterator on a container of \ccc{Primitive::Data_type} such that \ccc{Primitive} has a constructor taking a \ccc{ConstPrimitiveIterator} as argument.}
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
%\ccMethod{void foo();}{some member functions}
|
||||
\ccMethod{ template <class Query>
|
||||
bool do_intersect(const Query & q);}
|
||||
{ Returns true if the query intersects the primitives, false otherwise. Type \ccc{Query} has to be a type for which \ccc{do_intersect} predicates have been defined in \ccc{Traits}.}
|
||||
|
||||
\ccMethod{template <class Query>
|
||||
int number_of_intersections(const Query& q );}
|
||||
{Returns the number of primitives intersected by the query. Type \ccc{Query} has to be a type for which \ccc{do_intersect} predicates have been defined in \ccc{Traits}.}
|
||||
|
||||
\ccMethod{template <class Query, class OutputIterator>
|
||||
OutputIterator
|
||||
intersected_primitives(const Query& q ,
|
||||
OutputIterator out);}
|
||||
{Outputs to the iterator the list of the identifiers of intersected primitives. Type \ccc{Query} must be a type for which \ccc{do_intersect} predicates have been defined in \ccc{Traits}.
|
||||
The value type of OutputIterator is assumed to be \ccc{Primitive::Id_type}.}
|
||||
|
||||
\ccMethod{ template <class Query, class OutputIterator>
|
||||
OutputIterator
|
||||
all_intersections(const Query& q ,
|
||||
OutputIterator out);}
|
||||
{Outputs to the iterator the list of intersected geometric primitives. Type \ccc{Query} must be a type for which \ccc{do_intersect} and intersection predicates have been defined in \ccc{Traits}. The value type of OutputIterator is assumed to be \ccc{Primitive::Data_type}.}
|
||||
|
||||
|
||||
\ccMethod{template <class Query>
|
||||
bool any_intersection(const Query& q , Intersection_type &);}
|
||||
{Returns true if the query intersects the primitives, false otherwise. In the positive, saves the first encountered intersection to the second parameter. Type \ccc{Query} has to be a type for which \ccc{do_intersect} and intersection predicates have been defined in \ccc{Traits}.}
|
||||
|
||||
\ccMethod{Projection_return
|
||||
closest_point(const Projection_query& q,
|
||||
const Projection_return & hint);}
|
||||
{Returns the point on all inputs primitive which is closest to the query q. Hint is assumed to be any point on the input primitives (the closer hint to q, the faster the query).}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{AABBTraits}, \\
|
||||
\ccc{AABBPrimitive}.
|
||||
|
||||
\ccExample
|
||||
|
||||
% A short example program.
|
||||
% Instead of a short program fragment, a full running program can be
|
||||
% included using the
|
||||
% \verb|\ccIncludeExampleCode{Package/AABB_tree.C}|
|
||||
% macro. The program example would be part of the source code distribution and
|
||||
% also part of the automatic test suite.
|
||||
|
||||
% \begin{ccExampleCode}
|
||||
% void your_example_code() {
|
||||
% }
|
||||
% \end{ccExampleCode}
|
||||
|
||||
\ccIncludeExampleCode{AABB_tree/AABB_example.cpp}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
\ccRefChapter{AABB tree}
|
||||
\ccChapterAuthor{Pierre Alliez, Laurent Rineau,
|
||||
Jane Tournois, Camille Wormser and Mariette Yvinec}
|
||||
|
||||
\section{Classified Reference Pages}
|
||||
|
||||
\subsection*{Concepts}
|
||||
|
||||
\ccRefConceptPage{AABBPrimitive} \\
|
||||
\ccRefConceptPage{AABBTrianglePrimitive} \\
|
||||
\ccRefConceptPage{AABBTraits} \\
|
||||
\ccRefConceptPage{AABBGeomTraits}
|
||||
|
||||
\subsection*{Classes}
|
||||
\ccRefIdfierPage{CGAL::AABB_traits<GeomTraits,TrianglePrimitive>} \\
|
||||
\ccRefIdfierPage{CGAL::AABB_tree<Traits>} \\
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | CBP Reference Manual: main.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | Automatically generated driver file for the reference manual chapter
|
||||
% | of this package. Do not edit manually, you may loose your changes.
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\input{AABB_tree_ref/intro.tex}
|
||||
|
||||
\input{AABB_tree_ref/AABBGeomTraits.tex}
|
||||
\input{AABB_tree_ref/AABBPrimitive.tex}
|
||||
\input{AABB_tree_ref/AABBTraits.tex}
|
||||
\input{AABB_tree_ref/AABBTrianglePrimitive.tex}
|
||||
\input{AABB_tree_ref/AABB_traits.tex}
|
||||
\input{AABB_tree_ref/AABB_tree.tex}
|
||||
|
||||
%% EOF
|
||||
Loading…
Reference in New Issue