/** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * @author Tadej Satler * * Selecting voxels with the polygons drawn over the viewport — shared by the volume tools. */ import { Vec3 } from '../../mol-math/linear-algebra.js'; import { Volume } from '../../mol-model/volume.js'; import { RuntimeContext } from '../../mol-task/index.js'; import { PreparedMask } from './view-projection.js'; import type { ViewMask } from './types.js'; /** * True when `pos` projects inside every view's polygon, honouring each view's `inverted` flag. * A voxel belongs to the selection only if it survives all of them. */ export declare function passesAllViews(pos: Vec3, prepared: readonly PreparedMask[], out?: [number, number]): boolean; /** * Marks every candidate voxel selected by `masks` with `1` in `out` (untouched voxels keep * their current value, so clear it first when recomputing). With `invert`, the candidates the * views reject are marked instead. Returns the number of voxels selected. * * Integer grid coordinates are projected, not cell centres, because the rendered isosurface * places grid index `i` at coordinate `i` — a half-voxel offset here shows up as speckle when * the result is read back to color that surface. */ export declare function selectByViews(volume: Volume, candidates: Int32Array, masks: readonly ViewMask[], out: Uint8Array, ctx: RuntimeContext, invert?: boolean): Promise;