<aside> ℹ️ This feature was introduced in xeokit-sdk v2.5
</aside>
In xeokit-sdk v2.4.2, we have added components that enable interactive picking of a Viewer's
Entities
using a 2D box drawn on the canvas with mouse input.
ObjectsKdTree3
- Automatically indexes a Viewer
's Entities
in a 3D k-d tree to support fast collision detection with 3D World-space axis-aligned boundaries (AABBs) and frustums.MarqueePicker
- Picks a Viewer
's Entities
with a canvas-space 2D marquee box.MarqueePickerMouseControl
- Controls a MarqueePicker
with mouse input.In the example below, we:
Viewer
, arrange the Camera
XKTLoaderPlugin
to load BIM model,ObjectsKdTree3
to automatically index the Viewer's
Entities
for fast spatial lookup,MarqueePicker
to pick Entities
in the Viewer
, using the ObjectsKdTree3
to accelerate pickingMarqueePickerMouseControl
to perform the marquee-picking with the MarqueePicker
, using mouse input to draw the marquee box on the Viewer's
canvas.When the MarqueePickerMouseControl
is active:
Entities
.Entities
that intersect the box.