예제 #1
0
 public void SetBottomMargin(HeightmapMargin margin)
 {
     AssertMarginHasProperLength(margin, WorkingWidth);
     for (int i = 0; i < Width; i++)
     {
         _array[i, 0] = margin.MarginValues[i];
     }
 }
예제 #2
0
 public void SetLeftMargin(HeightmapMargin margin)
 {
     AssertMarginHasProperLength(margin, WorkingHeight);
     for (int i = 0; i < Height; i++)
     {
         _array[0, i] = margin.MarginValues[i];
     }
 }
예제 #3
0
 private void AssertMarginHasProperLength(HeightmapMargin margin, int workingLength)
 {
     Preconditions.Assert(margin.WorkingLength == workingLength,
                          "Cant set margin. It has wrong length. Old working length " + workingLength + " new working length " +
                          margin.WorkingLength);
 }