Function wt::intersect::intersect_cone_tri

Function Documentation

inline std::optional<intersect_cone_tri_ret_t> wt::intersect::intersect_cone_tri(const elliptic_cone_t &cone, const pqvec3_t &a, const pqvec3_t &b, const pqvec3_t &c, const dir3_t &n, const pqrange_t<> &range = pqrange_t<>::positive()) noexcept

Cone-triangle intersection test. Returns minimal distance to intersection, if any, and intersection point.

Parameters:
  • cone_frame – vectorized cone frame, can be constructed using cone.frame().vectorized().

  • a – triangle vertex

  • b – triangle vertex

  • c – triangle vertex

  • n – triangle normal

  • range – range over which to look for intersection