import {ObjectsKdTree3} from '@xeokit/xeokit-sdk/src/extras/collision/ObjectsKdTree3.js'
ObjectsKdTree3
Automatically indexes a Viewer's Entitys in a 3D k-d tree to support fast collision detection with 3D World-space axis-aligned boundaries (AABBs) and frustums.
See MarqueePicker for usage example.
An ObjectsKdTree3 is configured with a Viewer, and will then automatically keep itself populated with k-d nodes that contain the Viewer's Entitys.
We can then traverse the k-d nodes, starting at ObjectsKdTree3#root, to find the contained Entities.
Constructor Summary
Public Constructor | ||
public |
constructor(cfg: *) Creates an ObjectsKdTree3. |
Member Summary
Public Members | ||
public get |
root: * Gets the root ObjectsKdTree3 node. |
|
public |
viewer: * |
Method Summary
Public Methods | ||
public |
destroy() Destroys this ObjectsKdTree3. |