Bvh Type
Provides static functions to create Bvh trees without specifying the generic type argument.
Static members
| Static member |
Description
|
Full Usage:
Bvh.create (items, getBox, ?leafSize)
Parameters:
'T seq
-
The items to build the tree from. They are enumerated and copied to an array at build time.
getBox : 'T -> BBox
-
A function returning the axis aligned bounding box of an item.
It is called once per item at build time.
?leafSize : int
-
The maximum amount of items per leaf node. Optional, 4 by default.
Returns: Bvh<'T>
A new immutable Bvh.
Type parameters: 'T |
Builds a Bvh from the given sequence of items.
|
Full Usage:
Bvh.create (items, getBox, ?leafSize)
Parameters:
ResizeArray<'T>
-
The items to build the tree from. They are copied to an array at build time.
getBox : 'T -> BBox
-
A function returning the axis aligned bounding box of an item.
It is called once per item at build time.
?leafSize : int
-
The maximum amount of items per leaf node. Optional, 4 by default.
Returns: Bvh<'T>
A new immutable Bvh.
Type parameters: 'T |
Builds a Bvh from the given resizable array of items.
|
Full Usage:
Bvh.create (items, getBox, ?leafSize)
Parameters:
'T[]
-
The items to build the tree from. The array is referenced, not copied. Do not mutate it afterwards.
getBox : 'T -> BBox
-
A function returning the axis aligned bounding box of an item.
It is called once per item at build time.
?leafSize : int
-
The maximum amount of items per leaf node. Optional, 4 by default.
Returns: Bvh<'T>
A new immutable Bvh.
Type parameters: 'T |
Builds a Bvh from the given items. The tree is built top-down by splitting at the median of the item-box centers along the longest axis of the current bounding box.
|
Full Usage:
Bvh.createFromBoxes (boxes, ?leafSize)
Parameters:
BBox[]
-
The axis aligned bounding boxes to build the tree from.
The array is referenced, not copied. Do not mutate it afterwards.
?leafSize : int
-
The maximum amount of boxes per leaf node. Optional, 4 by default.
Returns: Bvh<BBox>
A new immutable Bvh of BBox.
|
Builds a Bvh directly from bounding boxes. The boxes themselves are the items.
|
Euclid.BVH