예제 #1
0
 // I/F
 public void ForEach(Action<IntVector3> action)
 {
     for (int z = -radius; z < radius; z++)
     {
         for (int y = -radius; y < radius; y++)
         {
             for (int x = -radius; x < radius; x++)
             {
                 var point = new IntVector3(x, y, z);
                 var lengthSquared = point.LengthSquared();
                 if (lengthSquared <= radiusSquared)
                     action(point);
             }
         }
     }
 }
예제 #2
0
 // I/F
 public void ForEach(Action <IntVector3> action)
 {
     for (int z = -radius; z < radius; z++)
     {
         for (int y = -radius; y < radius; y++)
         {
             for (int x = -radius; x < radius; x++)
             {
                 var point         = new IntVector3(x, y, z);
                 var lengthSquared = point.LengthSquared();
                 if (lengthSquared <= radiusSquared)
                 {
                     action(point);
                 }
             }
         }
     }
 }