Module bvh::bvh

source ·
Expand description

This module defines a Bvh.

Structs§

  • The Bvh data structure. Contains the list of BvhNodes.
  • Holds the arguments for calling build.
  • Iterator to traverse a Bvh without memory allocations
  • Shapes holds a mutable ptr to the slice of Shapes passed in to build. It is accessed only through a ShapeIndex. These are a set of unique indices into Shapes that are generated at the start of the build process. Because they are all unique they guarantee that access into Shapes is safe to do in parallel.

Enums§

  • The BvhNode enum that describes a node in a Bvh. It’s either a leaf node and references a shape (by holding its index) or a regular node that has two child nodes. The non-leaf node stores the Aabbs of its children.

Functions§