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