Logo Euclid.BVH

Bvh Type

Provides static functions to create Bvh trees without specifying the generic type argument.

Static members

Static member Description

Bvh.create (items, getBox, ?leafSize)

Full Usage: Bvh.create (items, getBox, ?leafSize)

Parameters:
    items : '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.

items : '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.

Bvh.create (items, getBox, ?leafSize)

Full Usage: Bvh.create (items, getBox, ?leafSize)

Parameters:
    items : 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.

items : 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.

Bvh.create (items, getBox, ?leafSize)

Full Usage: Bvh.create (items, getBox, ?leafSize)

Parameters:
    items : '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.

items : '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.

Bvh.createFromBoxes (boxes, ?leafSize)

Full Usage: Bvh.createFromBoxes (boxes, ?leafSize)

Parameters:
    boxes : 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.

boxes : 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.

Type something to start searching.