hawk.geometry.closest_hit

Contents

hawk.geometry.closest_hit#

hawk.geometry.closest_hit(tables, o, d, tmax=None, *, depth=32)[source]#

The nearest hit of the ray o + t d, 0 <= t <= tmax, against the tree: [hit, t, u, v, leaf_position], with t = 0 and zeros elsewhere when nothing is hit. The stack holds depth levels; a tree deeper than that is refused, never traversed with a truncated stack.

Parameters:
  • tables (BVHTables)

  • o (Any)

  • d (Any)

  • tmax (Any)

  • depth (int)