Skip to main content

Type Alias: SlabDepthCoverage

SlabDepthCoverage: "overlapping" | "centerInside"

Which voxels along the normal a slab of a given thickness selects.

  • 'overlapping' - a voxel qualifies when its own box overlaps the slab. The slab is therefore widened by half a voxel on each side, and a plane halfway between two voxel layers selects both layers. A slab of this kind never under-counts, and two consecutive slabs share the voxels on the boundary between them.
  • 'centerInside' - a voxel qualifies when its centre lies inside the slab, with no widening, and the slab is never thinner than one voxel. Two consecutive slabs of this kind tile the normal: every voxel belongs to exactly one of them, and to one of them at least.

Defined in​

packages/core/src/utilities/voxelSlab/slabMembership.ts:113