CGAL 5.3.2 - 3D Fast Intersection and Distance Computation (AABB Tree)
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

Datum reference type returned by the function datum().

It is convertible to the type Datum.

◆ Id

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

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

◆ Point_reference

Point reference type returned by the function point().

It is convertible to the type Point.

Member Function Documentation

◆ id()

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.

◆ reference_point()

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.