private static void Clear(VoxelCell[,,] voxelSpace) { foreach (var coordinates in DiscreteBounds.Of(voxelSpace)) { voxelSpace.At(coordinates) = new VoxelCell(Vertex.MaxValue, new Vector()); } }
public static VoxelCell[,,] Build(Face[] faces, DiscreteBounds bounds) { var voxelSpace = new VoxelCell[bounds.Width, bounds.Height, bounds.Depth]; Clear(voxelSpace); Add(voxelSpace, faces); Propagate(voxelSpace); return(voxelSpace); }