BVH3

- class BVH3
A bounding volume hierarchy to quickly select 3d shapes.
Methods
Constructor(s)
select(position, max_distance, result)Returns a rough selection of the elements at a distance of position smaller than max_distance.
- __init__()
Constructor(s)
BVH3 (v: Value)
Cast a Value object in BVH3.
If v has not the good type, a default value is constructed.
BVH3 (points,obj_per_leaf: int)
Build a BVH of 3d points.
- Parameters
points - The points
obj_per_leaf (int) - Number of points per BVH leaf. Smaller numbers give larger BVHs but faster object selection.
BVH3 (boxes,obj_per_leaf: int)
Build a BVH of axis aligned boxes.
- Parameters
boxes - The boxes
obj_per_leaf (int) - Number of boxes per BVH leaf. Smaller numbers give larger BVHs but faster object selection.
- select(position: Imath.V3f, max_distance: float, result: list(int)) None
Returns a rough selection of the elements at a distance of position smaller than max_distance.
All the objects closer to position than max_distance are returned once. Objects farther to position than max_distance may be also returned once. A more precise test should be performed after this rough selection.