public void Show(TCircle circle, Color color) { m_type = EGraphType.Circle; m_circle = circle; m_color = color; isShow = true; }
public TCircle LimitInside(TCircle tagert) { Vector2 delta = tagert.center - center; float dr = radius - tagert.radius; TCircle result = tagert; result.center = center + delta.normalized * Mathf.Min(delta.magnitude, dr); return(result); }
public TCircle LimitInside(TCircle circle) { float newWidth = Mathf.Max(0, width - circle.radius * 2); float newHeight = Mathf.Max(0, height - circle.radius * 2); TRect newRect = new TRect(x, y, newWidth, newHeight); Vector2 circlePos = newRect.LimitInside(circle.center); return(new TCircle(circlePos, circle.radius)); }
public static void DrawCircle(TCircle circle, Color color, string drawOncePerFrameKey = null) { if (ins == null || !CheckDrawCount(drawOncePerFrameKey)) { return; } var item = ins.CreateGraph(); if (item != null) { item.Show(circle, color); } }
public void DrawScreenCircle(TCircle circle, Color color, int smooth = 50) { DrawScreenEllipse(circle.center, circle.radius, circle.radius, color, smooth); }
public bool IsOverLapWith(TCircle circle) { return((radius + circle.radius) * (radius + circle.radius) > (center - circle.center).sqrMagnitude); }
public static TCircle Lerp(TCircle a, TCircle b, float t) { return(new TCircle(Vector2.Lerp(a.center, b.center, t), Mathf.Lerp(a.radius, b.radius, t))); }
private void D_C(TCircle c, Color color) { GizmosPro.DrawCircle(c, color); }
public bool IsOverLapWith(TCircle circle) { return(IsOverLapWith(new TEllipse(circle.boundingRect))); }
public TEllipse(TCircle circle) : this(circle.center.x, circle.center.y, circle.radius, circle.radius) { }