\( \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.11.3 - 3D Fast Intersection and Distance Computation (AABB Tree)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
AABBPrimitiveWithSharedData Concept Reference

Definition

The concept AABBPrimitiveWithSharedData 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 AABBPrimitiveWithSharedData also refines the concepts DefaultConstructible and Assignable. The concept is similar to AABBPrimitive except that some data stored outside of the primitives are required to access the datum and the reference point.

See Also
CGAL::AABB_tree<AABBTraits>
AABBPrimitive

Example

The Primitive type can be a wrapper around an integer that refers to the position of an object in a vector. Assume for instance that the input objects are some triangles. The Datum would be a Triangle_3 and the Id a std::size_t. The shared data here is a std::vector<Triangle_3>. The method datum(const Shared_data&) then returns a triangle from the vector.

Has Models:

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

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

CGAL::AABB_face_graph_triangle_primitive<FaceGraph,VertexPointPMap,Tag_true,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(const Shared_data&). More...
 
typedef unspecified_type Datum_reference
 Datum reference type returned by the function datum(const Shared_data&). More...
 
typedef unspecified_type Id
 Type of identifiers through which the input objects are referred to. More...
 
typedef unspecified_type Shared_data
 Type of the data shared amongst primitives.
 

Operations

Datum_reference datum (const Shared_data &data)
 Returns the datum (geometric object) represented by the primitive.
 
Id id ()
 Returns the corresponding identifier. More...
 
Point_reference reference_point (const Shared_data &data)
 Returns a 3D point located on the geometric object represented by the primitive. More...
 
template<class... T>
static Shared_data construct_shared_data (T...t)
 A static function responsible for the creation of the shared data of a primitive. More...
 

Member Typedef Documentation

Datum reference type returned by the function datum(const Shared_data&).

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(const Shared_data&).

It is convertible to the type Point.

Member Function Documentation

template<class... T>
static Shared_data AABBPrimitiveWithSharedData::construct_shared_data ( T...  t)
static

A static function responsible for the creation of the shared data of a primitive.

The parameter pack is such that there exists a constructor template <class T1, class ... T> AABBPrimitiveWithSharedData (T1,T...).

Id AABBPrimitiveWithSharedData::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 AABBPrimitiveWithSharedData::reference_point ( const Shared_data data)

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.