CGAL 5.4 - 3D Fast Intersection and Distance Computation (AABB Tree)
CGAL::AABB_traits_construct_by_sorting< GeomTraits, AABBPrimitive, BboxMap, ConcurrencyTag > Class Template Reference

#include <CGAL/AABB_traits_construct_by_sorting.h>

Inherits from

CGAL::AABB_traits< GeomTraits, AABBPrimitive, BboxMap >.

Definition

template<typename GeomTraits, typename AABBPrimitive, typename BboxMap = Default, class ConcurrencyTag = Sequential_tag>
class CGAL::AABB_traits_construct_by_sorting< GeomTraits, AABBPrimitive, BboxMap, ConcurrencyTag >

This traits class provides the same functionality of the default AABB_traits class, it can be used to enable faster construction of trees, at the cost of lower traversal speed.

This is done by sorting the primitives along the hilbert curve, rather than repeatedly partitioning them along the longest axis of their bounding box. The result is a tree that may contain nodes that have very high aspect ratios, which means slower traversals on average. In practice, construction can be up to 50% faster, and traversal tends to be around 20% slower. Building the tree with the more optimal strategy tends not to become worthwhile until that tree is used for on the order of 10^5 traversals.

Is Model Of:

AABBTraits

AABBRayIntersectionTraits

Template Parameters
GeomTraitsmust be a model of the concept AABBGeomTraits, and provide the geometric types as well as the intersection tests and computations.
AABBPrimitiveprovide the type of primitives stored in the AABB_tree. It is a model of the concept AABBPrimitive or AABBPrimitiveWithSharedData.
BboxMapmust be a model of ReadablePropertyMap that has as key type a primitive id, and as value type a Bounding_box. If the type is Default the Datum must have the member function bbox() that returns the bounding box of the primitive.
ConcurrencyTagMust be one of CGAL::Sequential_tag, CGAL::Parallel_tag, or CGAL::Parallel_if_available_tag. It is used to determine the algorithm used by the underlying hilbert sort.

If the argument GeomTraits is a model of the concept AABBRayIntersectionGeomTraits, this class is also a model of AABBRayIntersectionTraits.

Examples:
AABB_tree/AABB_fast_construction_example.cpp.

Public Member Functions

Traits::Split_primitives split_primitives_object () const
 Factory function that produces a splitting functor which is associated with this traits class. More...
 
- Public Member Functions inherited from CGAL::AABB_traits< GeomTraits, AABBPrimitive, BboxMap >
 AABB_traits ()
 Default constructor.
 

Additional Inherited Members

- Public Types inherited from CGAL::AABB_traits< GeomTraits, AABBPrimitive, BboxMap >
typedef GeomTraits::Point_3 Point_3
 Point query type.
 
typedef GeomTraits::Iso_cuboid_3 Iso_cuboid_3
 additionnal types for the search tree, required by the RangeSearchTraits concept More...
 
typedef CGAL::Bbox_3 Bounding_box
 Bounding box type.
 

Member Function Documentation

◆ split_primitives_object()

template<typename GeomTraits , typename AABBPrimitive , typename BboxMap = Default, class ConcurrencyTag = Sequential_tag>
Traits::Split_primitives CGAL::AABB_traits_construct_by_sorting< GeomTraits, AABBPrimitive, BboxMap, ConcurrencyTag >::split_primitives_object ( ) const

Factory function that produces a splitting functor which is associated with this traits class.

Returns
a new splitting function