@playcanvas/splat-transform
Version:
Library and CLI tool for 3D Gaussian splat format conversion and transformation
33 lines (32 loc) • 1.55 kB
TypeScript
import { BlockMaskBuffer } from './block-mask-buffer';
import type { Bounds } from '../data-table';
import { GpuVoxelization } from '../gpu';
import { type GaussianBVH } from '../spatial';
/**
* GPU-accelerated voxelization of Gaussian splat data into a block mask buffer.
*
* Uses double-buffered pipelining: the CPU prepares the next mega-dispatch
* (BVH queries + index copying) while the GPU executes the current one.
*
* @param bvh - Gaussian bounding volume hierarchy for spatial queries.
* @param gpuVoxelization - GPU voxelization pipeline with Gaussians already uploaded.
* @param gridBounds - Block-aligned grid bounds to voxelize within.
* @param voxelResolution - Size of each voxel in world units.
* @param opacityCutoff - Opacity threshold for solid voxels.
* @returns Block mask buffer containing voxelization results.
*/
declare const voxelizeToBuffer: (bvh: GaussianBVH, gpuVoxelization: GpuVoxelization, gridBounds: Bounds, voxelResolution: number, opacityCutoff: number) => Promise<BlockMaskBuffer>;
/**
* Align bounds to 4x4x4 block boundaries.
*
* @param minX - Scene minimum X
* @param minY - Scene minimum Y
* @param minZ - Scene minimum Z
* @param maxX - Scene maximum X
* @param maxY - Scene maximum Y
* @param maxZ - Scene maximum Z
* @param voxelResolution - Size of each voxel
* @returns Aligned bounds
*/
declare function alignGridBounds(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, voxelResolution: number): Bounds;
export { voxelizeToBuffer, alignGridBounds };