Struct intersection_record_t

Nested Relationships

Nested Types

Struct Documentation

struct intersection_record_t

Contains the data of an ADS intersection query, including the lists of intersected triangles and edges.

Public Types

using triangles_container_t = std::vector<tuid_t>
using edges_container_t = std::set<tuid_t>

Public Functions

inline intersection_record_t(length_t dist, bool front_face, const triangles_container_t *triangles, const edges_container_t *edges) noexcept
inline intersection_record_t(const intersect::intersect_ray_tri_ret_t &raytracing_intersection_record, bool front_face, const tuid_t tuid, const edges_container_t *edges) noexcept
inline intersection_record_t() noexcept
intersection_record_t(const intersection_record_t &o) noexcept = default
inline auto distance() const noexcept

Distance to first intersection, or INF if none.

inline bool is_front_face() const noexcept

Returns TRUE if first intersection is front facing.

inline bool empty() const noexcept

Returns TRUE if this intersection record holds no triangles or edges.

inline bool has_raytracing_intersection_record() const noexcept
inline const auto &get_raytracing_intersection_record() const noexcept
inline auto triangles() const noexcept

Returns accessor for intersected triangles. The underlying storage might use thread_local vectors; a user should finish accessing the intersection record before calling adds::intersect on the same ads again.

inline const auto &edges() const noexcept

Returns container of intersected edges. The underlying storage might use thread_local vectors; a user should finish accessing the intersection record before calling adds::intersect on the same ads again.

Public Members

rt_record_t rt_record = {}
containers_t data
struct rt_record_t

Public Members

intersect::intersect_ray_tri_ret_t raytracing_intersection_record
tuid_t tuid
struct triangles_accessor_t

Public Functions

inline const auto begin() const noexcept
inline const auto end() const noexcept
inline const auto size() const noexcept
inline const auto empty() const noexcept

Public Members

const tuid_t *s = nullptr
const tuid_t *e = nullptr