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