Class ads_t¶
Defined in File ads.hpp
Nested Relationships¶
Nested Types¶
Inheritance Relationships¶
Derived Type¶
public wt::ads::bvh8w_t
(Class bvh8w_t)
Class Documentation¶
-
class ads_t
Generic accelerating data structure (ADS) interface.
Subclassed by wt::ads::bvh8w_t
Public Functions
-
ads_t() noexcept = default
-
inline ads_t(std::vector<tri_t> tris) noexcept
-
ads_t(ads_t&&) = default
-
virtual ~ads_t() noexcept = default
-
inline const edge_t &edge(std::uint32_t euid) const noexcept
-
inline auto triangles_count() const noexcept
-
virtual std::size_t nodes_count() const noexcept = 0
-
virtual const aabb_t &V() const noexcept = 0
-
virtual intersection_record_t intersect(const ball_t &ball, const intersect_opts_t &opts = intersect_opts_t::defaults()) const noexcept = 0
Intersects the ADS with ball, returning the intersection record and contained primitives.
-
virtual intersection_record_t intersect(const ray_t &ray, const pqrange_t<> range = {0 * u::m, limits<length_t>::infinity()}) const noexcept = 0
Intersects the ADS with a ray, returning the intersection record with the intersected primitive.
- Parameters:
range – traversal bounds
z_search_range_scale – scaler for z-axis search range
-
virtual intersection_record_t intersect(const elliptic_cone_t &cone, const pqrange_t<> range = {0 * u::m, limits<length_t>::infinity()}, const intersect_opts_t &opts = intersect_opts_t::defaults()) const noexcept = 0
Intersects the ADS with an elliptic cone, returning the intersection record and contained primitives. Once the closest intersection is found, looks for triangles within a z distance from the closest point. This distance is computed as the cone major axis length time ‘z_search_range_scale’.
- Parameters:
range – traversal bounds
z_search_range_scale – scaler for z-axis search range
-
virtual bool shadow(const ray_t &ray, const pqrange_t<> range) const noexcept = 0
Intersects the ADS with a ray. Returns TRUE if a hit was found.
- Parameters:
range – traversal bounds
-
virtual bool shadow(const elliptic_cone_t &cone, const pqrange_t<> range) const noexcept = 0
Intersects the ADS with an elliptical cone. Returns TRUE if a hit was found.
- Parameters:
range – traversal bounds
-
virtual scene::element::info_t description() const = 0
-
struct intersect_opts_t
Public Members
-
bool detect_edges
-
bool accumulate_edges
-
bool accumulate_triangles
-
f_t z_search_range_scale
Public Static Functions
-
static inline constexpr intersect_opts_t defaults() noexcept
-
bool detect_edges
-
ads_t() noexcept = default