% +------------------------------------------------------------------------+ % | 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}. \ccTypes \ccNestedType{Size_type}{Unsigned integral size type.} \ccGlue \ccNestedType{FT}{Number type returned by the distance method.} \ccGlue \ccNestedType{Point_3}{Type of a 3D point.} \ccGlue \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_and_primitive_id;}{} \ccGlue \ccTypedef{typedef std::pair Object_and_primitive_id;}{} % NOT NEEDED %\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} 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 \ccMethod{boost::optional intersection(const Query & q, const Primitive& primitive);} {Returns the intersection as a pair composed of a point and a primitive id, iff the query intersects the primitive.} \ccGlue \ccMethod{bool is_closer(const Point & p, const Bounding_box& box, const Point & q);} {Returns true, iff the primitive is closer to \ccc{p} than \ccc{q} is.} \ccGlue \ccMethod{bool is_closer(const Point & p, const Primitive& primitive, const Point & q);} {Returns true, iff the primitive is closer to \ccc{p} than \ccc{q} is.} \ccGlue \ccMethod{Point_3 closest_point(const Point_3 & p, const Primitive& primitive, const Point_3 & q);} {Returns the closest point to \ccc{p}, among \ccc{q} and the points of the primitive.} \ccGlue \ccMethod{FT squared_distance(const Point_3 & p, const Point_3 & q);} {Returns the distance between \ccc{p} and \ccc{q}.} % NOT NEEDED %\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}. \ccSeeAlso \ccc{AABB_traits}\\ \ccc{AABB_tree} \ccc{AABBPrimitive} \end{ccRefConcept} % +------------------------------------------------------------------------+ %%RefPage: end of main body, begin of footer \ccRefPageEnd % EOF % +------------------------------------------------------------------------+