Skip to content

Class: Octree

Constructors

Properties

Methods

Constructors

constructor

new Octree(size, index?, parent?, level?): Octree

Parameters

NameTypeDefault value
sizeBoundingBoxundefined
indexnumber0
parentOctreenull
levelnumber0

Returns

Octree

Defined in

src/core/tree/octree/Octree.ts:26

Properties

entities

Readonly entities: Map<string, OctreeEntity>

Defined in

src/core/tree/octree/Octree.ts:16


box

Readonly box: BoundingBox

Defined in

src/core/tree/octree/Octree.ts:17


subTrees

Readonly subTrees: Octree[] = []

Defined in

src/core/tree/octree/Octree.ts:18


parent

Readonly parent: Octree

Defined in

src/core/tree/octree/Octree.ts:19


level

Readonly level: number

Defined in

src/core/tree/octree/Octree.ts:20


maxSplitLevel

Static Readonly maxSplitLevel: 6

Defined in

src/core/tree/octree/Octree.ts:21


index

Readonly index: number

Defined in

src/core/tree/octree/Octree.ts:23


uuid

Readonly uuid: string

Defined in

src/core/tree/octree/Octree.ts:24


__rayCastTempVector

__rayCastTempVector: Vector3

Defined in

src/core/tree/octree/Octree.ts:84

Methods

tryInsertEntity

tryInsertEntity(entity): boolean

Parameters

NameType
entityOctreeEntity

Returns

boolean

Defined in

src/core/tree/octree/Octree.ts:35


rayCasts

rayCasts(ray, ret): boolean

Parameters

NameType
rayRay
retOctreeEntity[]

Returns

boolean

Defined in

src/core/tree/octree/Octree.ts:85


frustumCasts

frustumCasts(frustum, ret): boolean

Parameters

NameType
frustumFrustum
retOctreeEntity[]

Returns

boolean

Defined in

src/core/tree/octree/Octree.ts:98


getRenderNode

getRenderNode(frustum, ret): boolean

Parameters

NameType
frustumFrustum
retCollectInfo

Returns

boolean

Defined in

src/core/tree/octree/Octree.ts:115


boxCasts

boxCasts(box, ret): boolean

Parameters

NameType
boxBoundingBox
retOctreeEntity[]

Returns

boolean

Defined in

src/core/tree/octree/Octree.ts:147


clean

clean(): this

Returns

this

Defined in

src/core/tree/octree/Octree.ts:160

Released under the MIT License