/**
 * @import { BoundingBox } from '../../core/shape/bounding-box.js'
 * @import { GraphicsDevice } from '../../platform/graphics/graphics-device.js'
 * @import { GraphNode } from '../graph-node.js'
 * @import { GSplatResource } from '../gsplat/gsplat-resource.js'
 * @import { GSplatResourceBase } from '../gsplat/gsplat-resource-base.js'
 * @import { GSplatOctreeResource } from './gsplat-octree.resource.js'
 * @import { ScopeId } from '../../platform/graphics/scope-id.js'
 * @import { Texture } from '../../platform/graphics/texture.js'
 * @import { Vec2 } from '../../core/math/vec2.js'
 */
/**
 * Class representing a placement of a gsplat resource.
 *
 * @ignore
 */
export class GSplatPlacement {
    /**
     * Create a new GSplatPlacement.
     *
     * @param {GSplatResource|null} resource - The resource of the splat.
     * @param {GraphNode} node - The node that the gsplat is linked to.
     * @param {number} [lodIndex] - The LOD index for this placement.
     * @param {Map<string, {scopeId: ScopeId, data: *}>|null} [parameters] - Per-instance shader parameters.
     * @param {GSplatPlacement|null} [parentPlacement] - Parent placement for shader config delegation.
     * @param {number|null} [id] - Unique identifier for picking. If not provided, inherits from parentPlacement.
     */
    constructor(resource: GSplatResource | null, node: GraphNode, lodIndex?: number, parameters?: Map<string, {
        scopeId: ScopeId;
        data: any;
    }> | null, parentPlacement?: GSplatPlacement | null, id?: number | null);
    /**
     * The resource of the splat..
     *
     * @type {GSplatResource|GSplatOctreeResource|null}
     */
    resource: GSplatResource | GSplatOctreeResource | null;
    /**
     * The node that the gsplat is linked to.
     *
     * @type {GraphNode}
     */
    node: GraphNode;
    /**
     * Map of intervals for octree nodes using this placement.
     * Key is octree node index, value is Vec2 representing start and end index (inclusive).
     *
     * @type {Map<number, Vec2>}
     */
    intervals: Map<number, Vec2>;
    /**
     * Unique identifier for this placement. Used by the picking system and available
     * for custom shader effects.
     */
    id: number;
    /**
     * Unique allocation identifier for persistent work buffer allocation tracking.
     *
     * @type {number}
     */
    allocId: number;
    /**
     * The LOD index for this placement.
     */
    lodIndex: number;
    /**
     * Base distance for the first LOD transition (LOD 0 to LOD 1).
     *
     * @private
     */
    private _lodBaseDistance;
    /**
     * Geometric multiplier between successive LOD distance thresholds.
     * Distance for LOD level i is: lodBaseDistance * lodMultiplier^i.
     *
     * @private
     */
    private _lodMultiplier;
    /**
     * @type {number}
     */
    set lodBaseDistance(value: number);
    get lodBaseDistance(): number;
    /**
     * Flag indicating LOD parameters have changed and LOD needs re-evaluation.
     */
    lodDirty: boolean;
    /**
     * @type {number}
     */
    set lodMultiplier(value: number);
    get lodMultiplier(): number;
    /**
     * Minimum allowed LOD index (inclusive). Clamped to the asset's valid range at use.
     *
     * @private
     */
    private _lodRangeMin;
    /**
     * Maximum allowed LOD index (inclusive). Clamped to the asset's valid range at use.
     *
     * @private
     */
    private _lodRangeMax;
    /**
     * @type {number}
     */
    set lodRangeMin(value: number);
    get lodRangeMin(): number;
    /**
     * @type {number}
     */
    set lodRangeMax(value: number);
    get lodRangeMax(): number;
    /**
     * The axis-aligned bounding box for this placement, in local space.
     * Null means use resource.aabb as fallback.
     *
     * @type {BoundingBox|null}
     */
    _aabb: BoundingBox | null;
    /**
     * Per-instance shader parameters. Reference to the component's parameters Map.
     *
     * @type {Map<string, {scopeId: ScopeId, data: *}>|null}
     */
    parameters: Map<string, {
        scopeId: ScopeId;
        data: any;
    }> | null;
    /**
     * Optional streams for instance-level textures.
     *
     * @type {GSplatStreams|null}
     * @private
     */
    private _streams;
    /**
     * Monotonically increasing counter, bumped whenever this placement's splats need to be
     * re-copied to the work buffer (parameter or modifier changes, or an explicit one-shot update
     * request). Each consumer (a per-camera {@link GSplatInfo}) remembers the value it last
     * copied at, so a single request re-copies every consumer of a shared placement exactly once,
     * and child placements (octree files, environment) fan out from their parent's counter.
     *
     * @type {number}
     * @ignore
     */
    dirtyVersion: number;
    /**
     * Work buffer update mode (see WORKBUFFER_UPDATE_*). WORKBUFFER_UPDATE_ONCE is not stored as a
     * mode - it is converted into a single {@link dirtyVersion} bump.
     *
     * @type {number}
     * @private
     */
    private _workBufferUpdate;
    /**
     * Custom work buffer modifier code for this placement (object with code and pre-computed hash).
     *
     * @type {{ code: string, hash: number }|null}
     * @private
     */
    private _workBufferModifier;
    /**
     * Parent placement. Used by octree file placements to inherit workBufferModifier and
     * parameters from the component's placement.
     *
     * @type {GSplatPlacement|null}
     * @ignore
     */
    parentPlacement: GSplatPlacement | null;
    /**
     * Destroys this placement and releases all resources.
     */
    destroy(): void;
    /**
     * Sets the work buffer modifier for this placement. Triggers work buffer re-render.
     * Must provide all three functions: modifySplatCenter, modifySplatRotationScale, modifySplatColor.
     *
     * @type {{ code: string, hash: number }|null}
     */
    set workBufferModifier(value: {
        code: string;
        hash: number;
    } | null);
    /**
     * Gets the work buffer modifier for this placement.
     * Delegates to parent placement if available (for octree file placements).
     *
     * @type {{ code: string, hash: number }|null}
     */
    get workBufferModifier(): {
        code: string;
        hash: number;
    } | null;
    /**
     * Sets the work buffer update mode (see WORKBUFFER_UPDATE_*). WORKBUFFER_UPDATE_ONCE is turned
     * into a single {@link dirtyVersion} bump so every consumer re-copies once, rather than being
     * stored as a persistent mode.
     *
     * @type {number}
     */
    set workBufferUpdate(value: number);
    /**
     * Gets the work buffer update mode.
     *
     * @type {number}
     */
    get workBufferUpdate(): number;
    /**
     * Marks the placement as needing a one-time re-copy to the work buffer by all of its
     * consumers.
     */
    markDirty(): void;
    /**
     * Sets a custom AABB for this placement. Pass null to use resource.aabb as fallback.
     *
     * @param {BoundingBox|null} aabb - The bounding box to set, or null to clear.
     */
    set aabb(aabb: BoundingBox | null);
    /**
     * Gets the AABB for this placement. Returns custom AABB if set, otherwise resource.aabb.
     *
     * @returns {BoundingBox} The bounding box.
     */
    get aabb(): BoundingBox;
    /**
     * Computes the LOD distance threshold for a given level using the geometric progression.
     *
     * @param {number} level - The LOD level index.
     * @returns {number} The distance threshold for the given LOD level.
     */
    getLodDistance(level: number): number;
    /**
     * Gets an instance-level texture by name. Creates the streams container on first access
     * if the format has instance streams defined.
     *
     * @param {string} name - The name of the texture to get.
     * @param {GraphicsDevice} device - The graphics device (required for lazy initialization).
     * @returns {Texture|undefined} The texture, or undefined if not found.
     */
    getInstanceTexture(name: string, device: GraphicsDevice): Texture | undefined;
    /**
     * Gets the instance streams container, or null if not initialized.
     * Delegates to parent placement if available (for octree file placements).
     *
     * @type {GSplatStreams|null}
     * @ignore
     */
    get streams(): GSplatStreams | null;
    /**
     * Ensures instance streams container exists if format has instance streams.
     *
     * @param {GraphicsDevice} device - The graphics device.
     * @ignore
     */
    ensureInstanceStreams(device: GraphicsDevice): void;
}
import type { GSplatResource } from '../gsplat/gsplat-resource.js';
import type { GSplatOctreeResource } from './gsplat-octree.resource.js';
import type { GraphNode } from '../graph-node.js';
import type { Vec2 } from '../../core/math/vec2.js';
import type { BoundingBox } from '../../core/shape/bounding-box.js';
import type { ScopeId } from '../../platform/graphics/scope-id.js';
import type { GraphicsDevice } from '../../platform/graphics/graphics-device.js';
import type { Texture } from '../../platform/graphics/texture.js';
import { GSplatStreams } from '../gsplat/gsplat-streams.js';
