CGAL 6.0 - Fast Intersection and Distance Computation (AABB Tree)
Loading...
Searching...
No Matches
AABBRayIntersectionTraits Concept Reference

Definition

The concept AABBRayIntersectionTraits is a refinement of the concept AABBTraits. In addition to the types and functions required by AABBTraits it also requires function objects to calculate the distance of an intersection along a ray.

Refines
AABBTraits
Has models
CGAL::AABB_traits_2<AABBGeomTraits_2,AABBPrimitive>
CGAL::AABB_traits_3<AABBGeomTraits_3,AABBPrimitive>
See also
CGAL::AABB_tree<AABBTraits>
AABBPrimitive

Public Types

typedef unspecified_type Ray
 Type of a ray.
 
typedef unspecified_type Vector
 Type of a vector.
 
typedef AABBTraits::Bounding_box Bounding_box
 Type of bounding box.
 
typedef unspecified_type Construct_source
 A functor object to construct the source point of a ray.
 
typedef unspecified_type Cartesian_const_iterator
 A model of CartesianConstIterator_2 or CartesianConstIterator_3, depending on the dimension of Vector.
 
typedef unspecified_type Construct_cartesian_const_iterator
 A model of ConstructCartesianConstIterator_2 or ConstructCartesianConstIterator_3, depending on the dimension of Vector.
 
typedef unspecified_type Construct_vector
 A functor object to construct a vector having the same direction as a ray.
 
typedef unspecified_type Intersection_distance
 A functor object to compute the distance between the source of a ray and its closest intersection point between the ray and a primitive or a bounding box.
 

Public Member Functions

Construct_source construct_source_object ()
 returns the Construct_source functor.
 
Construct_cartesian_const_iterator construct_cartesian_const_iterator_object ()
 returns the Construct_cartesian_const_iterator functor.
 
Construct_vector construct_vector_object ()
 returns the Construct_vector functor.
 
Intersection_distance intersection_distance_object () const
 returns the intersection distance functor.
 

Member Typedef Documentation

◆ Construct_source

A functor object to construct the source point of a ray.

Provides the operator: Point operator()(const Ray&);

◆ Construct_vector

A functor object to construct a vector having the same direction as a ray.

Provides the operator: Vector operator()(const Ray&);

◆ Intersection_distance

A functor object to compute the distance between the source of a ray and its closest intersection point between the ray and a primitive or a bounding box.

An empty std::optional is returned, if there is no intersection. When there is an intersection, an object of type FT is returned such that if i1 and i2 are two intersection points, then i1 is closer to the source of the ray than i2 iff n1 < n2, n1 and n2 being the numbers returned for i1 and i2 respectively.

Provides the operators: std::optional<FT> operator()(const Ray& r, const Bounding_box& bbox). std::optional<std::pair<FT, Intersection_and_primitive_id<Ray>::Type > > operator()(const Ray& r, const Primitive& primitive).

A common algorithm to compute the intersection between a bounding box and a ray is the slab method.