Efficient spatial searching and collision detection using 3D k-d trees, rays, and boundaries.
The KdTree3 provides a fast spatial search index that organizes 3D objects with axis-aligned boundaries,
allowing efficient queries for intersections with other objects, volumes, and rays.
Features
This module includes functions for building and searching KdTree3 instances:
Building KdTree3s:
createPrimsKdTree3 - Creates a KdTree3 containing primitives from geometry arrays, organized by their 3D boundaries.
createSceneObjectPrimsKdTree3 - Creates a KdTree3 containing primitives from SceneObjects, organized by their world-space boundaries.
createSceneObjectsKdTree3 - Creates a KdTree3 containing SceneObjects, organized by their world-space boundaries.
Searching KdTree3s:
searchKdTree3WithAABB - Finds objects intersecting a given 3D axis-aligned bounding box (AABB).
xeokit 3D Collision Utilities
Efficient spatial searching and collision detection using 3D k-d trees, rays, and boundaries.
The KdTree3 provides a fast spatial search index that organizes 3D objects with axis-aligned boundaries, allowing efficient queries for intersections with other objects, volumes, and rays.
Features
This module includes functions for building and searching
KdTree3
instances:Building KdTree3s:
KdTree3
containing primitives from geometry arrays, organized by their 3D boundaries.KdTree3
containing primitives fromSceneObjects
, organized by their world-space boundaries.KdTree3
containingSceneObjects
, organized by their world-space boundaries.Searching KdTree3s:
Use Cases
With these utilities, applications can implement:
Installation
Install the xeokit SDK:
Usage Example
Searching for SceneObjects intersecting a 3D world-space boundary: