コード例 #1
0
        public void Set(Point3l point, T value)
        {
            Contract.Requires(IsUncompressed);

            point = new Point3l(point.X - Bounds.X, point.Y - Bounds.Y, point.Z - Bounds.Z);
            long index = point.Y + point.X * Bounds.Height + point.Z * Bounds.Height * Bounds.Width;

            Uncompressed[index] = value;
            Compressed.Clear();
        }
コード例 #2
0
 public void Fill(T voxel)
 {
     if (IsUncompressed)
     {
         Compressed.Clear();
         for (int i = 0; i < Uncompressed.Length; ++i)
         {
             Uncompressed[i] = voxel;
         }
     }
     else
     {
         Compressed.Clear();
         long size = Bounds.Width * Bounds.Height * Bounds.Depth;
         for (int i = 0; i < size; ++i)
         {
             Compressed.Add(voxel);
         }
     }
 }