Files
ZeroVR/ZeroPacientVR/Assets/Octave3D World Builder/Scripts/Rendering/Objects/Object Pivot Points/CirclePivotPointRenderer.cs
T
2022-04-18 19:17:20 +03:00

21 lines
669 B
C#

#if UNITY_EDITOR
using UnityEngine;
namespace O3DWB
{
public class CirclePivotPointRenderer : IPivotPointRenderer
{
#region Public Methods
public void Render(Vector3 pivotPoint, Color fillColor, Color borderLineColor, float sizeInPixels)
{
Camera camera = SceneViewCamera.Camera;
Vector2 screenPoint = Vector3Extensions.WorldToScreenPoint(pivotPoint);
Circle2D circle = new Circle2D(screenPoint, sizeInPixels * 0.5f);
GizmosEx.Render2DFilledCircle(circle, fillColor);
GizmosEx.Render2DCircleBorderLines(circle, borderLineColor);
}
#endregion
}
}
#endif