build_cwbvh

Function build_cwbvh 

Source
pub fn build_cwbvh<T: Boundable>(
    primitives: &[T],
    config: BvhBuildParams,
    core_build_time: &mut Duration,
) -> CwBvh
Expand description

Build a cwbvh from the given list of Boundable primitives. pre_split in BvhBuildParams is ignored in this case. Just a helper function / example, feel free to reimplement for your specific use case.

ยงArguments

  • primitives - A list of Primitives that implement Boundable.
  • 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