Hide menu
Loading...
Searching...
No Matches
MeshBVH

Bounding volume hierarchy for mesh primitives.

Extends

Constructors

Constructor

new MeshBVH(meshShape): MeshBVH

Creates an empty BVH associated with the provided mesh shape.

Parameters

meshShape

MeshShape

Mesh shape.

Returns

MeshBVH

Overrides

BaseBVH.constructor

Properties

meshShape

readonly meshShape: MeshShape

Mesh shape.

Methods

build()

static build(meshShape, groups?, options?): MeshBVH | null

Builds BVH for the provided mesh shape.

Parameters

meshShape

MeshShape

Mesh shape.

groups?

MeshShapePrimitivesGroup[]

Optional primitive groups.

options?

BVHBuildOptions

Optional build options.

Returns

MeshBVH | null


build()

build(groups?, options?): boolean

Builds BVH for this mesh shape.

Parameters

groups?

MeshShapePrimitivesGroup[]

Optional primitive groups.

options?

BVHBuildOptions

Optional build options.

Returns

boolean


traverse()

traverse(intersects, intersect): void

Traverses BVH and calls intersect for primitives whose node bounds satisfy intersects.

Parameters

intersects

(box) => boolean

Node bounds predicate.

intersect

(primitive) => void

Primitive callback.

Returns

void

Inherited from

BaseBVH.traverse