Exemplo n.º 1
0
 public override int cleanArtifacts(out Voxel simplified, VoxelHolder head, byte level, byte maxLevel, int x, int y, int z)
 {
     simplified = null;
     if (level < maxLevel)
         return 0;
     Voxel[,,] array = new Voxel[3, 3, 3];
     head.putInArray(ref array, new Index(level), (uint)x -1, (uint)y -1, (uint)z -1, (uint)x +2, (uint)y +2, (uint)z +2);
     bool solid = isSolid();
     foreach(Voxel vox in array) {
         if (vox != null && vox.isSolid() != solid)
             return 0;
     }
     simplified = solid? full : empty;
     return 1;
 }