Exemplo n.º 1
0
 private static void Clear(VoxelCell[,,] voxelSpace)
 {
     foreach (var coordinates in DiscreteBounds.Of(voxelSpace))
     {
         voxelSpace.At(coordinates) = new VoxelCell(Vertex.MaxValue, new Vector());
     }
 }
Exemplo n.º 2
0
        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);
        }