ShapeDraw utility class to split draw logic

This commit is contained in:
Xevion
2020-06-05 18:09:35 -05:00
parent d3f213717f
commit a79daf7ed7
3 changed files with 40 additions and 2 deletions

View File

@@ -1,3 +1,3 @@
fileFormatVersion: 2
guid: b50106a18d564518ba59ebb42e02f619
timeCreated: 1589861330
guid: 5a23673acb15433ea9f977712582464f
timeCreated: 1591398022

View File

@@ -0,0 +1,35 @@
using UnityEngine;
/// <summary>
/// A simple static utility class that assists with drawing shapes using the <c>LineRenderer</c> class.
/// </summary>
public class ShapeDraw {
/// <summary>
/// Draw a Arc aimed straight up with a certain angle width and radius.
/// Use <see cref="RotateLineRenderer"/> to point the Arc at a certain direction.
/// </summary>
/// <param name="lineRenderer">The LineRenderer to draw the Arc upon.</param>
/// <param name="angle">Angle of the Arc</param>
/// <param name="radius">Radius of the Arc</param>
/// <param name="vertexCount">Number of vertexes to be used in the arc, clamp minimum 3 </param>
/// <seealso cref="RotateLineRenderer"/>
public static void DrawArc(LineRenderer lineRenderer, float angle, float radius, int vertexCount) {
}
/// <summary>
/// Draw a Circle with a specific radius and number of vertexes (detail level)
/// </summary>
/// <param name="lineRenderer"></param>
public static void DrawCircle(LineRenderer lineRenderer) {
}
/// <summary>
///
/// </summary>
/// <param name="lineRenderer"></param>
public static void RotateLineRenderer(LineRenderer lineRenderer) {
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 09004a14b18b4662898d7e1cc0bc6f24
timeCreated: 1591398023