Header menu logo Nu

Octree Module

Types

Type Description

Octree<'e>

A spatial structure that organizes elements in a 3d grid.

Functions and values

Function or value Description

Octree.addElement presence presenceInPlay bounds element tree

Full Usage: Octree.addElement presence presenceInPlay bounds element tree

Parameters:

Add an element with the given presence and bounds to the tree.

presence : Presence
presenceInPlay : Presence
bounds : Box3
element : Octelement<'e>
tree : Octree<'e>

Octree.clear tree

Full Usage: Octree.clear tree

Parameters:

Clear the contents of the tree.

tree : Octree<'a>

Octree.getBounds tree

Full Usage: Octree.getBounds tree

Parameters:
Returns: Box3

Get the bounds of the tree.

tree : Octree<'a>
Returns: Box3

Octree.getDepth tree

Full Usage: Octree.getDepth tree

Parameters:
Returns: int

Get the depth of the tree.

tree : Octree<'a>
Returns: int

Octree.getElements set tree

Full Usage: Octree.getElements set tree

Parameters:

Get all of the elements in a tree.

set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getElementsAtPoint point set tree

Full Usage: Octree.getElementsAtPoint point set tree

Parameters:

Get all of the elements in a tree that are in a node intersected by the given point.

point : Vector3
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getElementsInBounds bounds set tree

Full Usage: Octree.getElementsInBounds bounds set tree

Parameters:

Get all of the elements in a tree that are in a node intersected by the given bounds.

bounds : Box3
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getElementsInFrustum frustum set tree

Full Usage: Octree.getElementsInFrustum frustum set tree

Parameters:

Get all of the elements in a tree that are in a node intersected by the given frustum.

frustum : Frustum
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getElementsInPlay playBox playFrustum set tree

Full Usage: Octree.getElementsInPlay playBox playFrustum set tree

Parameters:

Get all of the elements in a tree that are in a node intersected by one of the given box or frustum depending on its attributes.

playBox : Box3
playFrustum : Frustum
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getElementsInView frustumInterior frustumExterior frustumImposter lightBox set tree

Full Usage: Octree.getElementsInView frustumInterior frustumExterior frustumImposter lightBox set tree

Parameters:

Get all of the elements in a tree that are in a node intersected by one of the given frustums or light box depending on its attributes.

frustumInterior : Frustum
frustumExterior : Frustum
frustumImposter : Frustum
lightBox : Box3
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getElementsInViewBox box set tree

Full Usage: Octree.getElementsInViewBox box set tree

Parameters:

Get all of the elements in a tree that satisfy the given query parameters.

box : Box3
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getElementsInViewFrustum interior exterior frustum set tree

Full Usage: Octree.getElementsInViewFrustum interior exterior frustum set tree

Parameters:

Get all of the elements in a tree that satisfy the given query parameters.

interior : bool
exterior : bool
frustum : Frustum
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getLeafSize tree

Full Usage: Octree.getLeafSize tree

Parameters:
Returns: Vector3

Get the size of the tree's leaves.

tree : Octree<'a>
Returns: Vector3

Octree.getLightProbesInView set tree

Full Usage: Octree.getLightProbesInView set tree

Parameters:

Get all of the light probe elements.

set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getLightProbesInViewBox box set tree

Full Usage: Octree.getLightProbesInViewBox box set tree

Parameters:

Get all of the light probe elements in the given box.

box : Box3
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getLightProbesInViewFrustum frustum set tree

Full Usage: Octree.getLightProbesInViewFrustum frustum set tree

Parameters:

Get all of the light probe elements in the given frustum.

frustum : Frustum
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getLightsInViewBox box set tree

Full Usage: Octree.getLightsInViewBox box set tree

Parameters:

Get all of the light elements in the given box.

box : Box3
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.getLightsInViewFrustum frustum set tree

Full Usage: Octree.getLightsInViewFrustum frustum set tree

Parameters:

Get all of the light elements in the given frustum.

frustum : Frustum
set : HashSet<Octelement<'a>>
tree : Octree<'a>

Octree.make depth size

Full Usage: Octree.make depth size

Parameters:
Returns: Octree<'e>

Create an Octree with the given depth and overall size. Size dimensions must be a power of two.

depth : int
size : Vector3
Returns: Octree<'e>

Octree.removeElement presence presenceInPlay bounds element tree

Full Usage: Octree.removeElement presence presenceInPlay bounds element tree

Parameters:

Remove an element with the given presence and bounds from the tree.

presence : Presence
presenceInPlay : Presence
bounds : Box3
element : Octelement<'e>
tree : Octree<'e>

Octree.sweep tree

Full Usage: Octree.sweep tree

Parameters:

Remove all unused non-root nodes in the tree.

tree : Octree<'a>

Octree.updateElement presenceOld presenceInPlayOld boundsOld presenceNew presenceInPlayNew boundsNew element tree

Full Usage: Octree.updateElement presenceOld presenceInPlayOld boundsOld presenceNew presenceInPlayNew boundsNew element tree

Parameters:

Update an existing element in the tree.

presenceOld : Presence
presenceInPlayOld : Presence
boundsOld : Box3
presenceNew : Presence
presenceInPlayNew : Presence
boundsNew : Box3
element : Octelement<'a>
tree : Octree<'a>

Type something to start searching.