import type { SplatData } from '../core/splat-data'; import { type SelectionVolume } from './selection-volume'; /** * Splits a {@link SplatData} into the part inside a {@link SelectionVolume} * and the rest, so the selected region can live as its own independently * transformed (and therefore independently animated) object. * * Both halves keep the source's local frame - separation does not bake any * transform. Register them as `MergedSplatMesh` or `UnifiedSplatMesh` sources * for one global sort while they are posed independently. Separate * `SplatMesh` draw calls sort only within each mesh and can misblend where * their Gaussian footprints overlap. */ export interface SplatPartition { /** The splats whose centers passed the volume test. */ readonly inside: SplatData; /** Everything else. */ readonly outside: SplatData; /** Source indices of {@link inside}'s splats, ascending. */ readonly insideIndices: Uint32Array; } /** * Partitions `data` by a selection. * * `selection` is either a volume (each splat center is tested) or an already * computed ascending index list, e.g. from {@link selectInData} - passing the * list avoids re-testing when a host previews a selection before separating. * * Per-splat arrays (positions, colors, covariances, SH) are gathered by index; * a SOG SH palette is shared by reference between the halves (it is immutable * and per-splat `labels` keep it valid for any subset). Streamed-only fields * (`radTree`, `frontierParent`, `radShCodebook`) do not survive a partition - * their index topology is meaningless on a subset - so they are dropped; * partitioning is for fully resident data. An empty or all-inclusive selection * is valid and yields a zero-count half. */ export declare function partitionSplatData(data: SplatData, selection: SelectionVolume | Uint32Array): SplatPartition;