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 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); }
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)); }