Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #4
0
 public bool Intersects(ref CCBoundingBoxI rect)
 {
     return !(MaxX < rect.MinX || rect.MaxX < MinX || MaxY < rect.MinY || rect.MaxY < MinY);
 }
Exemple #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);
 }
Exemple #6
0
 public bool Intersects(ref CCBoundingBoxI rect)
 {
     return(!(MaxX < rect.MinX || rect.MaxX < MinX || MaxY < rect.MinY || rect.MaxY < MinY));
 }