Pathfinding.RecastBBTree.ExpandToContain C# (CSharp) Method

ExpandToContain() static private method

static private ExpandToContain ( Rect r, Rect r2 ) : Rect
r UnityEngine.Rect
r2 UnityEngine.Rect
return UnityEngine.Rect
		static Rect ExpandToContain (Rect r, Rect r2) {
			float xMin = Mathf.Min(r.xMin, r2.xMin);
			float xMax = Mathf.Max(r.xMax, r2.xMax);
			float yMin = Mathf.Min(r.yMin, r2.yMin);
			float yMax = Mathf.Max(r.yMax, r2.yMax);

			return Rect.MinMaxRect(xMin, yMin, xMax, yMax);
		}

Usage Example

Ejemplo n.º 1
0
 // Token: 0x0600267F RID: 9855 RVA: 0x001AB000 File Offset: 0x001A9200
 private RecastBBTreeBox RemoveBox(RecastBBTreeBox c, RecastMeshObj mesh, Rect bounds, ref bool found)
 {
     if (!RecastBBTree.RectIntersectsRect(c.rect, bounds))
     {
         return(c);
     }
     if (c.mesh == mesh)
     {
         found = true;
         return(null);
     }
     if (c.mesh == null && !found)
     {
         c.c1 = this.RemoveBox(c.c1, mesh, bounds, ref found);
         if (c.c1 == null)
         {
             return(c.c2);
         }
         if (!found)
         {
             c.c2 = this.RemoveBox(c.c2, mesh, bounds, ref found);
             if (c.c2 == null)
             {
                 return(c.c1);
             }
         }
         if (found)
         {
             c.rect = RecastBBTree.ExpandToContain(c.c1.rect, c.c2.rect);
         }
     }
     return(c);
 }
All Usage Examples Of Pathfinding.RecastBBTree::ExpandToContain