Bounding volume hierarchy for mesh primitives.
BaseBVH<number>new MeshBVH(
meshShape):MeshBVH
Creates an empty BVH associated with the provided mesh shape.
Mesh shape.
MeshBVH
readonlymeshShape:MeshShape
Mesh shape.
staticbuild(meshShape,groups?,options?):MeshBVH|null
Builds BVH for the provided mesh shape.
Mesh shape.
Optional primitive groups.
Optional build options.
MeshBVH | null
build(
groups?,options?):boolean
Builds BVH for this mesh shape.
Optional primitive groups.
Optional build options.
boolean
traverse(
intersects,intersect):void
Traverses BVH and calls intersect for primitives whose node bounds satisfy intersects.
(box) => boolean
Node bounds predicate.
(primitive) => void
Primitive callback.
void