\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.6.1 - 3D Fast Intersection and Distance Computation (AABB Tree)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
AABBPrimitive Concept Reference

Definition

The concept AABBPrimitive describes the requirements for the primitives stored in the AABB tree data structure. The concept encapsulates a type for the input datum (a geometric object) and an identifier (id) type through which those primitives are referred to. The concept AABBPrimitive also refines the concepts DefaultConstructible and Assignable.

See Also
CGAL::AABB_tree<AABBTraits>
AABBPrimitiveWithSharedData

Example

The Primitive type can be, e.g., a wrapper around a Handle. Assume for instance that the input objects are the triangle faces of a mesh stored as a CGAL::Polyhedron_3. The Datum would be a Triangle_3 and the Id would be a polyhedron Face_handle. Method datum() can return either a Triangle_3 constructed on the fly from the face handle or a Triangle_3 stored internally. This provides a way for the user to trade memory for efficiency.

Has Models:

CGAL::AABB_primitive<Id,ObjectPropertyMap,PointPropertyMap,Tag_false,CacheDatum>

CGAL::AABB_segment_primitive<Iterator,CacheDatum>

CGAL::AABB_triangle_primitive<Iterator,CacheDatum>

CGAL::AABB_halfedge_graph_segment_primitive<HalfedgeGraph,VertexPointPMap,Tag_false,CacheDatum>

CGAL::AABB_face_graph_triangle_primitive<FaceGraph,VertexPointPMap,Tag_false,CacheDatum>

Types

typedef unspecified_type Point
 3D point type.
 
typedef unspecified_type Datum
 Type of input datum.
 
typedef unspecified_type Point_reference
 Point reference type returned by the function point(). More...
 
typedef unspecified_type Datum_reference
 Datum reference type returned by the function datum(). More...
 
typedef unspecified_type Id
 Type of identifiers through which the input objects are referred to. More...
 

Operations

Datum_reference datum ()
 Returns the datum (geometric object) represented by the primitive.
 
Id id ()
 Returns the corresponding identifier. More...
 
Point_reference reference_point ()
 Returns a 3D point located on the geometric object represented by the primitive. More...
 

Member Typedef Documentation

Datum reference type returned by the function datum().

It is convertible to the type Datum.

Type of identifiers through which the input objects are referred to.

It must be a model of the concepts DefaultConstructible and Assignable.

Point reference type returned by the function point().

It is convertible to the type Point.

Member Function Documentation

Id AABBPrimitive::id ( )

Returns the corresponding identifier.

This identifier is only used as a reference for the objects in the output of the AABB_tree methods.

Point_reference AABBPrimitive::reference_point ( )

Returns a 3D point located on the geometric object represented by the primitive.

This function is used to sort the primitives during the AABB tree construction as well as to construct the search KD-tree internal to the AABB tree used to accelerate distance queries.