//Returns boxes of a and b respectively
 BoundingRect[] GetCameraDrawBoxes()
 {
     BoundingRect[] rects = new BoundingRect[2];
     rects[0].Min = new Vector2(0, -1.0f);
     rects[0].Max = Vector2.One;
     rects[1].Min = Vector2.One * -1;
     rects[1].Max = new Vector2(0, 1.0f);
     if (swapCameras)
     {
         Vector2 temp = rects[1].Min;
         rects[1].Min = rects[0].Min;
         rects[0].Min = temp;
         temp = rects[1].Max;
         rects[1].Max = rects[0].Max;
         rects[0].Max = temp;
     }
     return rects;
 }
 public FloodFillStruct(int arg)
 {
     visitedPixels = new SortedList<int, int>();
     rect = new BoundingRect();
     rect.Min = Vector2.One * float.PositiveInfinity;
     rect.Max = Vector2.One * float.NegativeInfinity;
 }
 Vector4[] ComputeBoundsDistances(BoundingRect[] bounds)
 {
     Vector4[] dists = new Vector4[bounds.Length];
     for (int i = 0; i < dists.Length; i++)
     {
         dists[i] = new Vector4(bounds[i].Min.X + 1.0f, bounds[i].Min.Y + 1.0f,
             1.0f - bounds[i].Max.X, 1.0f - bounds[i].Max.Y);
         if (i - 1 >= 0)
         {
             dists[i].X = dists[i - 1].Z;
             dists[i].Y = dists[i - 1].W;
         }
         if (i + 1 < bounds.Length)
         {
             dists[i].Z = Math.Abs(bounds[i + 1].Min.X - bounds[i].Max.X);
             dists[i].W = Math.Abs(bounds[i + 1].Min.Y - bounds[i].Max.Y);
         }
     }
     return dists;
 }