build_bvh2_from_tris

Function build_bvh2_from_tris 

Source
pub fn build_bvh2_from_tris(
    triangles: &[Triangle],
    config: BvhBuildParams,
    core_build_time: &mut Duration,
) -> Bvh2
Expand description

Build a bvh2 from the given list of Triangles. Just a helper function / example, feel free to reimplement for your specific use case.

ยงArguments

  • triangles - A list of Triangles.
  • config - Parameters for configuring the BVH building.
  • core_build_time - The core BVH build time. Does not include things like initial AABB generation or debug validation. This is mostly just here to simplify profiling in tray_racing