ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::cuboid_intersector Struct Reference

Checks if a cuboid bonuding box is intersected by a ray. More...

#include <detray/navigation/intersection/bounding_box/cuboid_intersector.hpp>

Public Member Functions

template<concepts::algebra algebra_t, typename mask_t>
bool operator() (const detail::ray< algebra_t > &ray, const mask_t &box, const dscalar< algebra_t >=0.f) const
 Operator to find intersections between ray and a cuboid aabb.

Detailed Description

Checks if a cuboid bonuding box is intersected by a ray.

This will not compute the intersection point and is meant for aabb intersection instead of navigation. For the implementation see: https://tavianator.com/2022/ray_box_boundary.html and https://github.com/acts-project/acts/blob/85a67758f79f3b01aed4025592ab6a5e5ffbd323/Core/include/Acts/Utilities/BoundingBox.ipp

Member Function Documentation

◆ operator()()

template<concepts::algebra algebra_t, typename mask_t>
bool detray::cuboid_intersector::operator() ( const detail::ray< algebra_t > & ray,
const mask_t & box,
const dscalar< algebra_t > = 0.f ) const

Operator to find intersections between ray and a cuboid aabb.

Template Parameters
algebra_tis the linear algebra implementation used
Parameters
rayis the input ray trajectory
boxis the input mask The optional tolerance argument is retained for intersector compatibility and is not used by this axis-aligned box test.
Returns
true if the cuboid aabb was intersected