Selecting
The ▚ Select tool rail (shortcut V). Pick a shape — box or lasso — and drag on screen to enclose a range. Esc cancels the drag; Esc again (or "Clear selection") clears the selection.
A selection is a "predicate", not a "list of points"
This is the single most important property of selection in oniyanma.
What's kept as the result of selecting is not a set of point IDs. It's the condition itself — "points inside this shape (box / prism)". As a consequence:
- Moving the camera doesn't change the selection. A lasso is drawn on screen, but the instant it's confirmed it's converted into a concave prism in world space. Changing viewpoint keeps the same points selected
- The selection survives LOD dropping and reloading points, because it's just the predicate being re-evaluated
- Handing a selection to someone else selects exactly the same points on their screen too. This is why "look here" doesn't become a verbal coordinate description in collaborating
- That the same selection returns the same result is pinned by tests. Point-in-polygon for concave shapes, rejecting points behind the camera (w ≤ 0), and invariance to camera movement are all covered by regression tests
Reading the selection count
The panel shows "Selection (resident) n points". This n is resident-based — that is, the number of points satisfying the condition among the LOD sample currently on screen. It's not a count from scanning every point in the source.
Move closer and LOD gets finer, so n grows for the same range even though nothing else changed. Don't treat "how many points are in this range" as an exact value. The count returned by an edit's dry run uses the same basis.
Selecting from a command
| Command | What it does |
|---|---|
selectBox | Select with an AABB in the aligned frame. min / max must be within getState().alignedBounds |
selectAll | Select everything loaded (⌘A) |
clearSelection | Clear it (Esc) |
zoomToSelection | Move the camera in until the selection fits (⇧2) |
querySelection | The current selection's point count and AABB |
queryBoxCount | Count points inside a given box without selecting them |
selectBox takes coordinates in the aligned (scene) frame, not real coordinates. Get the overall bounds first, then build a box within them.
const { alignedBounds: b } = oniyanma.getState()
// select a slab covering the top 20%
const zTop = b[5] - (b[5] - b[2]) * 0.2
await oniyanma.execute('selectBox', { min: [b[0], b[1], zTop], max: [b[3], b[4], b[5]] })The distinction between coordinate systems is summarized in the reference overview.
What you can do after selecting
- Non-destructive editing — hide, delete, reclassify, recolor
- Exporting — CSV / GeoJSON
- Filing findings — record a finding that carries a location
- Collaborating — share the selection with someone in the same room