Bound drillPick's work, pick before styles, and put changed thresholds behind a capability

The query contract now says picks answer against the scene as drawn before
effects, and that a drillPick limit bounds the work as well as the answer:
the renderer stops at `limit` hits and looks through at most
max(limit, 16) things under the pointer. The Cesium query port passes that
depth to Cesium's drill (a pick looking under something unpickable stays
unbounded), a click's drill caches one pass per depth, and the stub counts
unpickable items toward the depth.

CameraPose says fovy and aspectRatio describe the nearest centred
perspective frustum, the exact projection being in matrices().

A changed listener's own threshold is now the capability
cameraChangeThreshold; without it every listener fires at 0.5. The Cesium
and stub cameras have it, measured per listener without touching Cesium's
shared percentageChanged.

Conformance: draw.drillPick checks limit 0, never the surface, nothing over
the bare globe, an unpickable cover, nearest first and a bounded prefix;
query.pickBeforeStyles picks an icon under a mirroring style; the threshold
trace is skipped without its capability.
This commit is contained in:
Sameh Khamis committed 2026-11-08 12:37:04 -08:00
1 parent 481df0b093
commit 45302e9fbf
19 files changed
+260 -40

No files matched your search

+9
View File
@@ -42,6 +42,9 @@ optional, so a renderer written before it still conforms:
target's east-north-up frame, or the identity. `setView` keeps that frame
while it places a world pose. A share link's follow offset is
re-expressed in it, satellites included.
- `camera.on('changed', cb, { threshold })` measures each listener by its
own threshold under the capability `cameraChangeThreshold`; a renderer
without it fires every `changed` listener at 0.5.
- A line item's `depthFailDash` (`{ length, pattern16? }`) dashes the parts
behind the surface in `depthFailColor`, as the Draw tool's rubber band is.
A renderer that predates it draws those parts solid.
@@ -72,6 +75,12 @@ The rules that hold everywhere:
its documentation names first. A required member that names a capability
always exists, and without the capability it answers null or empty.
Quality support is listed by `quality.knobs()`, not by capabilities.
- **Picks see the scene before effects.** A style that moves pixels does not
move what is picked, so the application maps a pointer through its own
style first
(`src/input/sensorPick.js`). A bounded `drillPick` (`limit`) also bounds
its work: it looks through at most `max(limit, 16)` things under the
pointer.
- **Heights are physical.** All heights are metres above the ellipsoid,
unexaggerated. Only drawing follows exaggerated terrain.
- **Listeners** run in subscription order. A listener removed during