CLASSES
TagsA - Z

Octree

Description

class Octree

Constructor

new Octree(creationFunc, maxBlockCapacity, maxDepth)

Parameters

Name Type Description
creationFunc (entry: T, block: OctreeBlock<T>) => void
optional maxBlockCapacity number
optional maxDepth number

Members

maxDepth : number

blocks : Array<OctreeBlock<T>>

dynamicContent : T[]

static CreationFuncForMeshes : (entry: AbstractMesh, block: OctreeBlock<AbstractMesh>) => void

static CreationFuncForSubMeshes : (entry: SubMesh, block: OctreeBlock<SubMesh>) => void

Methods

update(worldMin, worldMax, entries) void

Parameters

Name Type Description
worldMin Vector3
worldMax Vector3
entries T[]

addMesh(entry) void

Parameters

Name Type Description
entry T

select(frustumPlanes, allowDuplicate) SmartArray<T>

Parameters

Name Type Description
frustumPlanes Plane[]
optional allowDuplicate boolean

intersects(sphereCenter, sphereRadius, allowDuplicate) SmartArray<T>

Parameters

Name Type Description
sphereCenter Vector3
sphereRadius number
optional allowDuplicate boolean

intersectsRay(ray) SmartArray<T>

Parameters

Name Type Description
ray Ray