mirror of https://github.com/CGAL/cgal
92 lines
3.6 KiB
TeX
92 lines
3.6 KiB
TeX
% +------------------------------------------------------------------------+
|
|
% | 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>}.
|
|
|
|
\ccTypes
|
|
|
|
\ccNestedType{Primitive}{Type of primitive.
|
|
Must be a model of the concept \ccc{AABBPrimitive}.}
|
|
\ccGlue
|
|
\ccNestedType{Bounding_box}{Bounding box type.}
|
|
\ccGlue
|
|
\ccTypedef{typedef std::pair<Point, Primitive> Point_and_primitive;}{}
|
|
\ccGlue
|
|
\ccNestedType{Sphere}{Sphere type required for distance queries.}
|
|
|
|
|
|
\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 less_x(const Primitive & pr1, const Primitive & pr2);}{}
|
|
\ccGlue
|
|
\ccMethod{bool less_y(const Primitive & pr1, const Primitive & pr2);}{}
|
|
\ccGlue
|
|
\ccMethod{bool less_z(const Primitive & pr1, const Primitive & pr2);}{}
|
|
|
|
\ccMethod{Bounding_box compute_bbox(const_primitive_iterator begin, const_primitive_iterator beyond);}
|
|
{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 \ccc{true} iff the query intersects the bounding box.}
|
|
\ccGlue
|
|
\ccMethod{bool do_intersect(const Query & q, const Primitive& primitive);}
|
|
{Returns \ccc{true} iff the query intersects the primitive.}
|
|
\ccGlue
|
|
% \ccMethod{int do_transversally_intersect(const Query & q, const Primitive& primitive);}
|
|
%{Returns 1 iff the query intersects the primitive transversally, returns 0 iff the query does not intersect the primitive and returns a negative error code in case of a non-transversal intersection.}
|
|
%\ccGlue
|
|
% TODO: replace return by pair<bool,Intersection>
|
|
\ccMethod{bool intersection(const Query & q,
|
|
const Primitive& primitive,
|
|
Point_and_primitive& result);}
|
|
{Returns \ccc{true} iff the query intersects the primitive. In the positive, stores the intersection in the last parameter as a pair composed of a point and a primitive. }
|
|
|
|
% TODO: document nearest_point
|
|
|
|
|
|
\ccMethod{bool is_contained(const Sphere & a, const Sphere & b);}{Returns \ccc{true} iff 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>}
|
|
\ccc{AABBPrimitive}
|
|
|
|
\end{ccRefConcept}
|
|
|
|
% +------------------------------------------------------------------------+
|
|
%%RefPage: end of main body, begin of footer
|
|
\ccRefPageEnd
|
|
% EOF
|
|
% +------------------------------------------------------------------------+
|
|
|