CLASSES
TagsA - Z

OctreeBlock

Description

class OctreeBlock

Create a new OctreeBlock

Constructor

new OctreeBlock(minPoint, maxPoint, capacity, depth, maxDepth, creationFunc)

Parameters

Name Type Description
minPoint Vector3 The minimum point
maxPoint Vector3 The maximum point
capacity number @param capacity
depth number @param depth
maxDepth number @param maxDepth

Members

entries : T[]

The entries

blocks : Array<OctreeBlock<T>>

The blocks

capacity : number

The capacity of the octreeBlock

minPoint : Vector3

The min point

maxPoint : Vector3

The max point

Methods

addEntry(entry) void

Add an entry to this octree block. The creationFunc linked to this octreeblock is used on the given entry

Parameters

Name Type Description
entry T @param entry

addEntries(entries) void

Add an entries to this octree block.

Parameters

Name Type Description
entries T[] @param entries

select(frustumPlanes, selection, allowDuplicate) void

Select

Parameters

Name Type Description
frustumPlanes Plane[] Frustum plan of the mesh
selection SmartArray<T> @param selection
optional allowDuplicate boolean True if you want to duplicate it, false otherwise.

intersects(sphereCenter, sphereRadius, selection, allowDuplicate) void

Intersects

Parameters

Name Type Description
sphereCenter Vector3 The sphere center
sphereRadius number The sphere radius
selection SmartArray<T> @param selection

intersectsRay(ray, selection) void

Intersects ray

Parameters

Name Type Description
ray Ray @param ray
selection SmartArray<T> @param selection

createInnerBlocks() void