splat-transform API Reference - v2.0.5
    Preparing search index...

    Function findClusterVoxelFlood

    • Find the connected component of occupied voxels reachable from a seed position via 6-connected voxel-level flood fill. Returns the set of block linear indices that contain at least one reachable voxel, the visited grid, and the resolved seed position.

      If the seed voxel is not occupied, finds the nearest occupied voxel first.

      Parameters

      • buffer: BlockMaskBuffer

        Block mask buffer with voxelization results.

      • nx: number

        Grid dimension X in voxels.

      • ny: number

        Grid dimension Y in voxels.

      • nz: number

        Grid dimension Z in voxels.

      • seedIx: number

        Seed voxel X coordinate.

      • seedIy: number

        Seed voxel Y coordinate.

      • seedIz: number

        Seed voxel Z coordinate.

      Returns {
          ccSet: Set<number>;
          resolvedSeed: { ix: number; iy: number; iz: number };
          visited: SparseVoxelGrid;
      }

      Object with ccSet, visited grid, and the resolved seed, or null if no occupied voxel found.