public float GetRealQuadHeight() { float scaleFactor = 1.0f; if (IsScaling) { Vector3 realScaleAxis = _scaleAxisUp * TotalDragScaleUp; Vector2 screenScaleAxis = Vector3Ex.ConvertDirTo2D(ScaleDragOrigin, ScaleDragOrigin + realScaleAxis, Gizmo.GetWorkCamera()); scaleFactor = screenScaleAxis.magnitude / (LookAndFeel.QuadHeight * LookAndFeel.Scale * 0.5f) * Mathf.Sign(TotalDragScaleUp); } return(LookAndFeel.QuadHeight * LookAndFeel.Scale * scaleFactor); }
public float GetRealLength() { float scaleFactor = 1.0f; if (IsScaling) { Vector3 realScaleAxis = _scaleAxis * TotalDragScale; Vector2 screenScaleAxis = Vector3Ex.ConvertDirTo2D(ScaleDragOrigin, ScaleDragOrigin + realScaleAxis, Gizmo.GetWorkCamera()); scaleFactor = (screenScaleAxis.magnitude / (LookAndFeel.Length * LookAndFeel.Scale)) * Mathf.Sign(TotalDragScale); } return(LookAndFeel.Length * LookAndFeel.Scale * scaleFactor); }
public float GetRealCircleRadius() { float scaleFactor = 1.0f; if (IsScaling) { float maxTotalDragScale = TotalDragScaleRight; if (Mathf.Abs(TotalDragScaleRight) < Mathf.Abs(TotalDragScaleUp)) { maxTotalDragScale = TotalDragScaleUp; } Vector3 realScaleAxis = _scaleAxisUp * maxTotalDragScale; Vector2 screenScaleAxis = Vector3Ex.ConvertDirTo2D(ScaleDragOrigin, ScaleDragOrigin + realScaleAxis, Gizmo.GetWorkCamera()); scaleFactor = (screenScaleAxis.magnitude / (LookAndFeel.CircleRadius * LookAndFeel.Scale)) * Mathf.Sign(maxTotalDragScale); } return(LookAndFeel.CircleRadius * LookAndFeel.Scale * scaleFactor); }