import type { TSLBoolNode, TSLFloatNode, TSLMat4Node, TSLNode, TSLStorageNode, TSLUintNode, TSLVec2Node, TSLVec3Node } from '../../../types/tsl.cjs'; export type SPHGridVectorNode = TSLVec2Node | TSLVec3Node; export type SPHGridCellNode = TSLNode<'ivec2'> | TSLNode<'ivec3'>; export interface SPHSpatialGridBuffers { cellHashes: TSLStorageNode<'uint'>; particleIds: TSLStorageNode<'uint'>; cell_offsets: TSLStorageNode<'uint'>; cellCursors: TSLStorageNode<'uint'>; candidateVisits: TSLStorageNode<'uint'> | null; } export interface SPHSpatialGridUniforms { grid_cell_size: TSLVec3Node; grid_resolution: TSLVec3Node; count_cells: TSLUintNode; domainDimensions: TSLVec3Node; domainMatrix: TSLMat4Node; particleCount: TSLUintNode; max_particles: TSLUintNode; delta?: TSLFloatNode | null; } export interface SPHSpatialGrid { lookupAlgorithm: 'global' | 'workgroup'; lookupWorkgroupSize: number; gridCellCount: number; buffers: SPHSpatialGridBuffers; ubos: SPHSpatialGridUniforms; positionToCellCoords(position: SPHGridVectorNode, cellSize: SPHGridVectorNode, gridResolution: SPHGridVectorNode, domainDimensions: SPHGridVectorNode): SPHGridCellNode; cellKeyToHash(cellCoordinates: SPHGridCellNode, gridResolution: SPHGridVectorNode): TSLUintNode; } export type SPHSpatialLookupCallback = (position: TSLVec3Node, velocity: TSLVec3Node, particleIndex: TSLUintNode, particlePosition: TSLVec3Node, distanceSquared: TSLFloatNode) => void; export interface SPHSpatialLookupFunction { (simulation: unknown, index: TSLUintNode, callback: SPHSpatialLookupCallback): void; } export type SPHWorkgroupVisit = (particleIndex: TSLUintNode, position: TSLVec3Node, distanceSquared: TSLFloatNode) => void; export type SPHWorkgroupTraverse = (visit: SPHWorkgroupVisit) => void; export type SPHWorkgroupSpatialCallback = (active: TSLBoolNode, particleIndex: TSLUintNode, position: TSLVec3Node, velocity: TSLVec3Node, traverse: SPHWorkgroupTraverse) => void; export interface SPHWorkgroupSpatialForEachFunction { (simulation: unknown, callback: SPHWorkgroupSpatialCallback): void; } export declare function requireSPHComputeFunction unknown>(value: unknown, label: string): TFunction;