Esempio n. 1
0
 public void SetLerp(CCBoundingBoxI a, CCBoundingBoxI b, float ratio)
 {
     MinX = CCMathHelper.Lerp(a.MinX, b.MinX, ratio);
     MinY = CCMathHelper.Lerp(a.MinY, b.MinY, ratio);
     MaxX = CCMathHelper.Lerp(a.MaxX, b.MaxX, ratio);
     MaxY = CCMathHelper.Lerp(a.MaxY, b.MaxY, ratio);
 }
Esempio n. 2
0
 public void ExpandToRect(ref CCBoundingBoxI r)
 {
     MinX = Math.Min(MinX, r.MinX);
     MinY = Math.Min(MinY, r.MinY);
     MaxX = Math.Max(MaxX, r.MaxX);
     MaxY = Math.Max(MaxY, r.MaxY);
 }
Esempio n. 3
0
 public void SetLerp(CCBoundingBoxI a, CCBoundingBoxI b, float ratio)
 {
     MinX = CCMathHelper.Lerp(a.MinX, b.MinX, ratio);
     MinY = CCMathHelper.Lerp(a.MinY, b.MinY, ratio);
     MaxX = CCMathHelper.Lerp(a.MaxX, b.MaxX, ratio);
     MaxY = CCMathHelper.Lerp(a.MaxY, b.MaxY, ratio);
 }
Esempio n. 4
0
 public bool Intersects(ref CCBoundingBoxI rect)
 {
     return !(MaxX < rect.MinX || rect.MaxX < MinX || MaxY < rect.MinY || rect.MaxY < MinY);
 }
Esempio n. 5
0
 public void ExpandToRect(ref CCBoundingBoxI r)
 {
     MinX = Math.Min(MinX, r.MinX);
     MinY = Math.Min(MinY, r.MinY);
     MaxX = Math.Max(MaxX, r.MaxX);
     MaxY = Math.Max(MaxY, r.MaxY);
 }
Esempio n. 6
0
 public bool Intersects(ref CCBoundingBoxI rect)
 {
     return(!(MaxX < rect.MinX || rect.MaxX < MinX || MaxY < rect.MinY || rect.MaxY < MinY));
 }