示例#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);
 }
示例#2
0
 public void ExpandToRect(ref CCBoundingBoxI rect)
 {
     MinX = Math.Min(MinX, rect.MinX);
     MinY = Math.Min(MinY, rect.MinY);
     MaxX = Math.Max(MaxX, rect.MaxX);
     MaxY = Math.Max(MaxY, rect.MaxY);
 }
示例#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);
 }
示例#4
0
 public bool Intersects(ref CCBoundingBoxI rect)
 {
     return !(MaxX < rect.MinX || rect.MaxX < MinX || MaxY < rect.MinY || rect.MaxY < MinY);
 }
示例#5
0
 public void ExpandToRect(ref CCBoundingBoxI rect)
 {
     MinX = Math.Min(MinX, rect.MinX);
     MinY = Math.Min(MinY, rect.MinY);
     MaxX = Math.Max(MaxX, rect.MaxX);
     MaxY = Math.Max(MaxY, rect.MaxY);
 }
示例#6
0
 public bool Intersects(ref CCBoundingBoxI rect)
 {
     return(!(MaxX < rect.MinX || rect.MaxX < MinX || MaxY < rect.MinY || rect.MaxY < MinY));
 }