Accelerating data structures¶
-
class ads_t¶
Generic accelerating data structure (ADS) interface.
Subclassed by wt::ads::bvh8w_t
Public Functions
-
ads_t() noexcept = default¶
-
virtual ~ads_t() noexcept = default¶
-
inline auto triangles_count() const noexcept¶
-
virtual std::size_t nodes_count() 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
-
ads_t() noexcept = default¶
-
class ads_constructor_t¶
Generic interface for accelerating data structure (ADS) construction.
Subclassed by wt::ads::construction::bvh8w_constructor_t