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

21 lines
662 B
C#

#if UNITY_EDITOR
using UnityEngine;
namespace O3DWB
{
public class SquarePivotPointRenderer : IPivotPointRenderer
{
#region Public Methods
public void Render(Vector3 pivotPoint, Color fillColor, Color borderLineColor, float sizeInPixels)
{
Camera camera = SceneViewCamera.Camera;
Vector2 screenPoint = Vector3Extensions.WorldToScreenPoint(pivotPoint);
Square2D square = new Square2D(screenPoint, sizeInPixels);
GizmosEx.Render2DFilledSquare(square, fillColor);
GizmosEx.Render2DSquareBorderLines(square, borderLineColor);
}
#endregion
}
}
#endif