diff --git a/X10D.Unity/src/DebugEx/DebugEx.Circle.cs b/X10D.Unity/src/DebugEx/DebugEx.Circle.cs
index 5b55d88..dd27e20 100644
--- a/X10D.Unity/src/DebugEx/DebugEx.Circle.cs
+++ b/X10D.Unity/src/DebugEx/DebugEx.Circle.cs
@@ -1,4 +1,4 @@
-using UnityEngine;
+using UnityEngine;
using X10D.Drawing;
using X10D.Numerics;
using X10D.Unity.Numerics;
@@ -13,10 +13,10 @@ public static partial class DebugEx
///
/// The center point of the circle.
/// The radius of the circle.
- /// The number of sides to generate.
- public static void DrawCircle(Vector2 center, float radius, int sides)
+ /// The number of segments to generate.
+ public static void DrawCircle(Vector2 center, float radius, int segments)
{
- DrawCircle(center, radius, sides, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle(center, radius, segments, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -24,11 +24,11 @@ public static partial class DebugEx
///
/// The center point of the circle.
/// The radius of the circle.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
- public static void DrawCircle(Vector2 center, float radius, int sides, in Color color)
+ public static void DrawCircle(Vector2 center, float radius, int segments, in Color color)
{
- DrawCircle(center, radius, sides, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle(center, radius, segments, color, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -36,14 +36,14 @@ public static partial class DebugEx
///
/// The center point of the circle.
/// The radius of the circle.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
///
- public static void DrawCircle(Vector2 center, float radius, int sides, in Color color, float duration)
+ public static void DrawCircle(Vector2 center, float radius, int segments, in Color color, float duration)
{
- DrawCircle(center, radius, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawCircle(center, radius, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
@@ -51,7 +51,7 @@ public static partial class DebugEx
///
/// The center point of the circle.
/// The radius of the circle.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
@@ -60,9 +60,9 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the circle be obscured by objects closer to the camera.
///
- public static void DrawCircle(Vector2 center, float radius, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawCircle(Vector2 center, float radius, int segments, in Color color, float duration, bool depthTest)
{
- DrawCircle(center, radius, sides, Vector2.zero, color, duration, depthTest);
+ DrawCircle(center, radius, segments, Vector2.zero, color, duration, depthTest);
}
///
@@ -70,7 +70,7 @@ public static partial class DebugEx
///
/// The center point of the circle.
/// The radius of the circle.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
/// The color of the circle.
///
@@ -80,90 +80,90 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the circle be obscured by objects closer to the camera.
///
- public static void DrawCircle(Vector2 center, float radius, int sides, in Vector3 offset, in Color color, float duration,
+ public static void DrawCircle(Vector2 center, float radius, int segments, in Vector3 offset, in Color color, float duration,
bool depthTest)
{
- DrawCircle(new CircleF(center.ToSystemVector(), radius), sides, offset, color, duration, depthTest);
+ DrawCircle(new CircleF(center.ToSystemVector(), radius), segments, offset, color, duration, depthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
- public static void DrawCircle(in Circle circle, int sides)
+ /// The number of segments to generate.
+ public static void DrawCircle(in Circle circle, int segments)
{
- DrawCircle((CircleF)circle, sides, Vector2.zero, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle((CircleF)circle, segments, Vector2.zero, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
- public static void DrawCircle(in Circle circle, int sides, in Vector3 offset)
+ public static void DrawCircle(in Circle circle, int segments, in Vector3 offset)
{
- DrawCircle((CircleF)circle, sides, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle((CircleF)circle, segments, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
- public static void DrawCircle(in Circle circle, int sides, in Color color)
+ public static void DrawCircle(in Circle circle, int segments, in Color color)
{
- DrawCircle((CircleF)circle, sides, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle((CircleF)circle, segments, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
/// The color of the circle.
- public static void DrawCircle(in Circle circle, int sides, in Vector3 offset, in Color color)
+ public static void DrawCircle(in Circle circle, int segments, in Vector3 offset, in Color color)
{
- DrawCircle((CircleF)circle, sides, offset, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle((CircleF)circle, segments, offset, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color and duration.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
///
- public static void DrawCircle(in Circle circle, int sides, in Color color, float duration)
+ public static void DrawCircle(in Circle circle, int segments, in Color color, float duration)
{
- DrawCircle((CircleF)circle, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawCircle((CircleF)circle, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color and duration.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
///
- public static void DrawCircle(in Circle circle, int sides, in Vector3 offset, in Color color, float duration)
+ public static void DrawCircle(in Circle circle, int segments, in Vector3 offset, in Color color, float duration)
{
- DrawCircle((CircleF)circle, sides, offset, color, duration, DefaultDepthTest);
+ DrawCircle((CircleF)circle, segments, offset, color, duration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color and duration.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
@@ -172,16 +172,16 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the circle be obscured by objects closer to the camera.
///
- public static void DrawCircle(in Circle circle, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawCircle(in Circle circle, int segments, in Color color, float duration, bool depthTest)
{
- DrawCircle((CircleF)circle, sides, Vector2.zero, color, duration, depthTest);
+ DrawCircle((CircleF)circle, segments, Vector2.zero, color, duration, depthTest);
}
///
/// Draws a circle.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
/// The color of the circle.
///
@@ -191,89 +191,89 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the circle be obscured by objects closer to the camera.
///
- public static void DrawCircle(in Circle circle, int sides, in Vector3 offset, in Color color, float duration, bool depthTest)
+ public static void DrawCircle(in Circle circle, int segments, in Vector3 offset, in Color color, float duration, bool depthTest)
{
- DrawCircle((CircleF)circle, sides, offset, color, duration, depthTest);
+ DrawCircle((CircleF)circle, segments, offset, color, duration, depthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
- public static void DrawCircle(in CircleF circle, int sides)
+ /// The number of segments to generate.
+ public static void DrawCircle(in CircleF circle, int segments)
{
- DrawCircle(circle, sides, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle(circle, segments, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
- public static void DrawCircle(in CircleF circle, int sides, in Vector3 offset)
+ public static void DrawCircle(in CircleF circle, int segments, in Vector3 offset)
{
- DrawCircle(circle, sides, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle(circle, segments, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
- public static void DrawCircle(in CircleF circle, int sides, in Color color)
+ public static void DrawCircle(in CircleF circle, int segments, in Color color)
{
- DrawCircle(circle, sides, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle(circle, segments, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
/// The color of the circle.
- public static void DrawCircle(in CircleF circle, int sides, in Vector3 offset, in Color color)
+ public static void DrawCircle(in CircleF circle, int segments, in Vector3 offset, in Color color)
{
- DrawCircle(circle, sides, offset, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawCircle(circle, segments, offset, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color and duration.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
///
- public static void DrawCircle(in CircleF circle, int sides, in Color color, float duration)
+ public static void DrawCircle(in CircleF circle, int segments, in Color color, float duration)
{
- DrawCircle(circle, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawCircle(circle, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color and duration.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
///
- public static void DrawCircle(in CircleF circle, int sides, in Vector3 offset, in Color color, float duration)
+ public static void DrawCircle(in CircleF circle, int segments, in Vector3 offset, in Color color, float duration)
{
- DrawCircle(circle, sides, offset, color, duration, DefaultDepthTest);
+ DrawCircle(circle, segments, offset, color, duration, DefaultDepthTest);
}
///
/// Draws a circle with the specified color and duration.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the circle.
///
/// The duration of the circle's visibility, in seconds. If 0 is passed, the circle is visible for a single frame.
@@ -282,16 +282,16 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the circle be obscured by objects closer to the camera.
///
- public static void DrawCircle(in CircleF circle, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawCircle(in CircleF circle, int segments, in Color color, float duration, bool depthTest)
{
- DrawCircle(circle, sides, Vector2.zero, color, duration, depthTest);
+ DrawCircle(circle, segments, Vector2.zero, color, duration, depthTest);
}
///
/// Draws a circle.
///
/// The circle to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the circle.
/// The color of the circle.
///
@@ -301,15 +301,15 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the circle be obscured by objects closer to the camera.
///
- public static void DrawCircle(in CircleF circle, int sides, in Vector3 offset, in Color color, float duration, bool depthTest)
+ public static void DrawCircle(in CircleF circle, int segments, in Vector3 offset, in Color color, float duration, bool depthTest)
{
- DrawPolyhedron(CreateCircle(circle.Radius, sides, Vector3.zero), offset, color, duration, depthTest);
+ DrawPolyhedron(CreateCircle(circle.Radius, segments, Vector3.zero), offset, color, duration, depthTest);
}
- private static Polyhedron CreateCircle(float radius, int sides, in Vector3 axis)
+ private static Polyhedron CreateCircle(float radius, int segments, in Vector3 axis)
{
const float max = 2.0f * MathF.PI;
- float step = max / sides;
+ float step = max / segments;
var points = new List();
for (var theta = 0f; theta < max; theta += step)
diff --git a/X10D.Unity/src/DebugEx/DebugEx.Ellipse.cs b/X10D.Unity/src/DebugEx/DebugEx.Ellipse.cs
index f5f87e2..0e19e69 100644
--- a/X10D.Unity/src/DebugEx/DebugEx.Ellipse.cs
+++ b/X10D.Unity/src/DebugEx/DebugEx.Ellipse.cs
@@ -1,4 +1,4 @@
-using UnityEngine;
+using UnityEngine;
using X10D.Drawing;
namespace X10D.Unity;
@@ -10,10 +10,10 @@ public static partial class DebugEx
///
/// The center point of the ellipse.
/// The radius of the ellipse.
- /// The number of sides to generate.
- public static void DrawEllipse(Vector2 center, Vector2 radius, int sides)
+ /// The number of segments to generate.
+ public static void DrawEllipse(Vector2 center, Vector2 radius, int segments)
{
- DrawEllipse(center, radius.x, radius.y, sides, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(center, radius.x, radius.y, segments, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -21,11 +21,11 @@ public static partial class DebugEx
///
/// The center point of the ellipse.
/// The radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
- public static void DrawEllipse(Vector2 center, Vector2 radius, int sides, in Color color)
+ public static void DrawEllipse(Vector2 center, Vector2 radius, int segments, in Color color)
{
- DrawEllipse(center, radius.x, radius.y, sides, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(center, radius.x, radius.y, segments, color, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -33,14 +33,14 @@ public static partial class DebugEx
///
/// The center point of the ellipse.
/// The radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
///
- public static void DrawEllipse(Vector2 center, Vector2 radius, int sides, in Color color, float duration)
+ public static void DrawEllipse(Vector2 center, Vector2 radius, int segments, in Color color, float duration)
{
- DrawEllipse(center, radius.x, radius.y, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawEllipse(center, radius.x, radius.y, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
@@ -48,7 +48,7 @@ public static partial class DebugEx
///
/// The center point of the ellipse.
/// The radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
@@ -57,9 +57,9 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(Vector2 center, Vector2 radius, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawEllipse(Vector2 center, Vector2 radius, int segments, in Color color, float duration, bool depthTest)
{
- DrawEllipse(center, radius.x, radius.y, sides, Vector2.zero, color, duration, depthTest);
+ DrawEllipse(center, radius.x, radius.y, segments, Vector2.zero, color, duration, depthTest);
}
///
@@ -67,7 +67,7 @@ public static partial class DebugEx
///
/// The center point of the ellipse.
/// The radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
///
@@ -77,10 +77,10 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(Vector2 center, Vector2 radius, int sides, Vector2 offset, in Color color, float duration,
+ public static void DrawEllipse(Vector2 center, Vector2 radius, int segments, Vector2 offset, in Color color, float duration,
bool depthTest)
{
- DrawEllipse(new EllipseF(center.x, center.y, radius.x, radius.y), sides, offset, color, duration, depthTest);
+ DrawEllipse(new EllipseF(center.x, center.y, radius.x, radius.y), segments, offset, color, duration, depthTest);
}
///
@@ -89,10 +89,10 @@ public static partial class DebugEx
/// The center point of the ellipse.
/// The horizontal radius of the ellipse.
/// The vertical radius of the ellipse.
- /// The number of sides to generate.
- public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int sides)
+ /// The number of segments to generate.
+ public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int segments)
{
- DrawEllipse(center, radiusX, radiusY, sides, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(center, radiusX, radiusY, segments, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -101,11 +101,11 @@ public static partial class DebugEx
/// The center point of the ellipse.
/// The horizontal radius of the ellipse.
/// The vertical radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
- public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int sides, in Color color)
+ public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int segments, in Color color)
{
- DrawEllipse(center, radiusX, radiusY, sides, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(center, radiusX, radiusY, segments, color, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -114,14 +114,14 @@ public static partial class DebugEx
/// The center point of the ellipse.
/// The horizontal radius of the ellipse.
/// The vertical radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
///
- public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int sides, in Color color, float duration)
+ public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int segments, in Color color, float duration)
{
- DrawEllipse(center, radiusX, radiusY, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawEllipse(center, radiusX, radiusY, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
@@ -130,7 +130,7 @@ public static partial class DebugEx
/// The center point of the ellipse.
/// The horizontal radius of the ellipse.
/// The vertical radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
@@ -139,10 +139,10 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int sides, in Color color, float duration,
+ public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int segments, in Color color, float duration,
bool depthTest)
{
- DrawEllipse(center, radiusX, radiusY, sides, Vector2.zero, color, duration, depthTest);
+ DrawEllipse(center, radiusX, radiusY, segments, Vector2.zero, color, duration, depthTest);
}
///
@@ -151,7 +151,7 @@ public static partial class DebugEx
/// The center point of the ellipse.
/// The horizontal radius of the ellipse.
/// The vertical radius of the ellipse.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
///
@@ -161,90 +161,90 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int sides, Vector2 offset, in Color color,
+ public static void DrawEllipse(Vector2 center, float radiusX, float radiusY, int segments, Vector2 offset, in Color color,
float duration, bool depthTest)
{
- DrawEllipse(new EllipseF(center.x, center.y, radiusX, radiusY), sides, offset, color, duration, depthTest);
+ DrawEllipse(new EllipseF(center.x, center.y, radiusX, radiusY), segments, offset, color, duration, depthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
- public static void DrawEllipse(Ellipse ellipse, int sides)
+ /// The number of segments to generate.
+ public static void DrawEllipse(Ellipse ellipse, int segments)
{
- DrawEllipse((EllipseF)ellipse, sides, Vector2.zero, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse((EllipseF)ellipse, segments, Vector2.zero, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
- public static void DrawEllipse(Ellipse ellipse, int sides, Vector2 offset)
+ public static void DrawEllipse(Ellipse ellipse, int segments, Vector2 offset)
{
- DrawEllipse((EllipseF)ellipse, sides, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse((EllipseF)ellipse, segments, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
- public static void DrawEllipse(Ellipse ellipse, int sides, in Color color)
+ public static void DrawEllipse(Ellipse ellipse, int segments, in Color color)
{
- DrawEllipse((EllipseF)ellipse, sides, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse((EllipseF)ellipse, segments, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
- public static void DrawEllipse(Ellipse ellipse, int sides, Vector2 offset, in Color color)
+ public static void DrawEllipse(Ellipse ellipse, int segments, Vector2 offset, in Color color)
{
- DrawEllipse((EllipseF)ellipse, sides, offset, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse((EllipseF)ellipse, segments, offset, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color and duration.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
///
- public static void DrawEllipse(Ellipse ellipse, int sides, in Color color, float duration)
+ public static void DrawEllipse(Ellipse ellipse, int segments, in Color color, float duration)
{
- DrawEllipse((EllipseF)ellipse, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawEllipse((EllipseF)ellipse, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color and duration.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
///
- public static void DrawEllipse(Ellipse ellipse, int sides, Vector2 offset, in Color color, float duration)
+ public static void DrawEllipse(Ellipse ellipse, int segments, Vector2 offset, in Color color, float duration)
{
- DrawEllipse((EllipseF)ellipse, sides, offset, color, duration, DefaultDepthTest);
+ DrawEllipse((EllipseF)ellipse, segments, offset, color, duration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color and duration.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
@@ -253,16 +253,16 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(Ellipse ellipse, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawEllipse(Ellipse ellipse, int segments, in Color color, float duration, bool depthTest)
{
- DrawEllipse((EllipseF)ellipse, sides, Vector2.zero, color, duration, depthTest);
+ DrawEllipse((EllipseF)ellipse, segments, Vector2.zero, color, duration, depthTest);
}
///
/// Draws an ellipse.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
///
@@ -272,89 +272,89 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(Ellipse ellipse, int sides, Vector2 offset, in Color color, float duration, bool depthTest)
+ public static void DrawEllipse(Ellipse ellipse, int segments, Vector2 offset, in Color color, float duration, bool depthTest)
{
- DrawEllipse((EllipseF)ellipse, sides, offset, color, duration, depthTest);
+ DrawEllipse((EllipseF)ellipse, segments, offset, color, duration, depthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
- public static void DrawEllipse(EllipseF ellipse, int sides)
+ /// The number of segments to generate.
+ public static void DrawEllipse(EllipseF ellipse, int segments)
{
- DrawEllipse(ellipse, sides, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(ellipse, segments, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
- public static void DrawEllipse(EllipseF ellipse, int sides, Vector2 offset)
+ public static void DrawEllipse(EllipseF ellipse, int segments, Vector2 offset)
{
- DrawEllipse(ellipse, sides, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(ellipse, segments, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
- public static void DrawEllipse(EllipseF ellipse, int sides, in Color color)
+ public static void DrawEllipse(EllipseF ellipse, int segments, in Color color)
{
- DrawEllipse(ellipse, sides, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(ellipse, segments, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
- public static void DrawEllipse(EllipseF ellipse, int sides, Vector2 offset, in Color color)
+ public static void DrawEllipse(EllipseF ellipse, int segments, Vector2 offset, in Color color)
{
- DrawEllipse(ellipse, sides, offset, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawEllipse(ellipse, segments, offset, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color and duration.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
///
- public static void DrawEllipse(EllipseF ellipse, int sides, in Color color, float duration)
+ public static void DrawEllipse(EllipseF ellipse, int segments, in Color color, float duration)
{
- DrawEllipse(ellipse, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawEllipse(ellipse, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color and duration.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
///
- public static void DrawEllipse(EllipseF ellipse, int sides, Vector2 offset, in Color color, float duration)
+ public static void DrawEllipse(EllipseF ellipse, int segments, Vector2 offset, in Color color, float duration)
{
- DrawEllipse(ellipse, sides, offset, color, duration, DefaultDepthTest);
+ DrawEllipse(ellipse, segments, offset, color, duration, DefaultDepthTest);
}
///
/// Draws an ellipse with the specified color and duration.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the ellipse.
///
/// The duration of the ellipse's visibility, in seconds. If 0 is passed, the ellipse is visible for a single frame.
@@ -363,16 +363,16 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(EllipseF ellipse, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawEllipse(EllipseF ellipse, int segments, in Color color, float duration, bool depthTest)
{
- DrawEllipse(ellipse, sides, Vector2.zero, color, duration, depthTest);
+ DrawEllipse(ellipse, segments, Vector2.zero, color, duration, depthTest);
}
///
/// Draws an ellipse.
///
/// The ellipse to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the ellipse.
/// The color of the ellipse.
///
@@ -382,16 +382,16 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the ellipse be obscured by objects closer to the camera.
///
- public static void DrawEllipse(EllipseF ellipse, int sides, Vector2 offset, in Color color, float duration, bool depthTest)
+ public static void DrawEllipse(EllipseF ellipse, int segments, Vector2 offset, in Color color, float duration, bool depthTest)
{
- DrawPolygon(CreateEllipse(ellipse.HorizontalRadius, ellipse.VerticalRadius, sides), offset, color, duration, depthTest);
+ DrawPolygon(CreateEllipse(ellipse.HorizontalRadius, ellipse.VerticalRadius, segments), offset, color, duration,
+ depthTest);
}
-
- private static PolygonF CreateEllipse(float radiusX, float radiusY, int sides)
+ private static PolygonF CreateEllipse(float radiusX, float radiusY, int segments)
{
const float max = 2.0f * MathF.PI;
- float step = max / sides;
+ float step = max / segments;
var points = new List();
for (var theta = 0f; theta < max; theta += step)
diff --git a/X10D.Unity/src/DebugEx/DebugEx.Sphere.cs b/X10D.Unity/src/DebugEx/DebugEx.Sphere.cs
index 333b5d1..496c17a 100644
--- a/X10D.Unity/src/DebugEx/DebugEx.Sphere.cs
+++ b/X10D.Unity/src/DebugEx/DebugEx.Sphere.cs
@@ -1,4 +1,4 @@
-using UnityEngine;
+using UnityEngine;
using X10D.Drawing;
using X10D.Unity.Numerics;
@@ -11,10 +11,10 @@ public static partial class DebugEx
///
/// The center point of the sphere.
/// The radius of the sphere.
- /// The number of sides to generate.
- public static void DrawSphere(Vector3 center, float radius, int sides)
+ /// The number of segments to generate.
+ public static void DrawSphere(Vector3 center, float radius, int segments)
{
- DrawSphere(center, radius, sides, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawSphere(center, radius, segments, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -22,11 +22,11 @@ public static partial class DebugEx
///
/// The center point of the sphere.
/// The radius of the sphere.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the sphere.
- public static void DrawSphere(Vector3 center, float radius, int sides, in Color color)
+ public static void DrawSphere(Vector3 center, float radius, int segments, in Color color)
{
- DrawSphere(center, radius, sides, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawSphere(center, radius, segments, color, DefaultDrawDuration, DefaultDepthTest);
}
///
@@ -34,14 +34,14 @@ public static partial class DebugEx
///
/// The center point of the sphere.
/// The radius of the sphere.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the sphere.
///
/// The duration of the sphere's visibility, in seconds. If 0 is passed, the sphere is visible for a single frame.
///
- public static void DrawSphere(Vector3 center, float radius, int sides, in Color color, float duration)
+ public static void DrawSphere(Vector3 center, float radius, int segments, in Color color, float duration)
{
- DrawSphere(center, radius, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawSphere(center, radius, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
@@ -49,7 +49,7 @@ public static partial class DebugEx
///
/// The center point of the sphere.
/// The radius of the sphere.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the sphere.
///
/// The duration of the sphere's visibility, in seconds. If 0 is passed, the sphere is visible for a single frame.
@@ -58,9 +58,9 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the sphere be obscured by objects closer to the camera.
///
- public static void DrawSphere(Vector3 center, float radius, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawSphere(Vector3 center, float radius, int segments, in Color color, float duration, bool depthTest)
{
- DrawSphere(center, radius, sides, Vector2.zero, color, duration, depthTest);
+ DrawSphere(center, radius, segments, Vector2.zero, color, duration, depthTest);
}
///
@@ -68,7 +68,7 @@ public static partial class DebugEx
///
/// The center point of the sphere.
/// The radius of the sphere.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the sphere.
/// The color of the sphere.
///
@@ -78,90 +78,90 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the sphere be obscured by objects closer to the camera.
///
- public static void DrawSphere(Vector3 center, float radius, int sides, Vector2 offset, in Color color, float duration,
+ public static void DrawSphere(Vector3 center, float radius, int segments, Vector2 offset, in Color color, float duration,
bool depthTest)
{
- DrawSphere(new Sphere(center.ToSystemVector(), radius), sides, offset, color, duration, depthTest);
+ DrawSphere(new Sphere(center.ToSystemVector(), radius), segments, offset, color, duration, depthTest);
}
///
/// Draws a sphere with the specified color.
///
/// The sphere to draw.
- /// The number of sides to generate.
- public static void DrawSphere(Sphere sphere, int sides)
+ /// The number of segments to generate.
+ public static void DrawSphere(Sphere sphere, int segments)
{
- DrawSphere(sphere, sides, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawSphere(sphere, segments, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a sphere with the specified color.
///
/// The sphere to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the sphere.
- public static void DrawSphere(Sphere sphere, int sides, Vector2 offset)
+ public static void DrawSphere(Sphere sphere, int segments, Vector2 offset)
{
- DrawSphere(sphere, sides, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
+ DrawSphere(sphere, segments, offset, Color.white, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a sphere with the specified color.
///
/// The sphere to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the sphere.
- public static void DrawSphere(Sphere sphere, int sides, in Color color)
+ public static void DrawSphere(Sphere sphere, int segments, in Color color)
{
- DrawSphere(sphere, sides, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawSphere(sphere, segments, Vector2.zero, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a sphere with the specified color.
///
/// The sphere to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the sphere.
/// The color of the sphere.
- public static void DrawSphere(Sphere sphere, int sides, Vector2 offset, in Color color)
+ public static void DrawSphere(Sphere sphere, int segments, Vector2 offset, in Color color)
{
- DrawSphere(sphere, sides, offset, color, DefaultDrawDuration, DefaultDepthTest);
+ DrawSphere(sphere, segments, offset, color, DefaultDrawDuration, DefaultDepthTest);
}
///
/// Draws a sphere with the specified color and duration.
///
/// The sphere to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the sphere.
///
/// The duration of the sphere's visibility, in seconds. If 0 is passed, the sphere is visible for a single frame.
///
- public static void DrawSphere(Sphere sphere, int sides, in Color color, float duration)
+ public static void DrawSphere(Sphere sphere, int segments, in Color color, float duration)
{
- DrawSphere(sphere, sides, Vector2.zero, color, duration, DefaultDepthTest);
+ DrawSphere(sphere, segments, Vector2.zero, color, duration, DefaultDepthTest);
}
///
/// Draws a sphere with the specified color and duration.
///
/// The sphere to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the sphere.
/// The color of the sphere.
///
/// The duration of the sphere's visibility, in seconds. If 0 is passed, the sphere is visible for a single frame.
///
- public static void DrawSphere(Sphere sphere, int sides, Vector2 offset, in Color color, float duration)
+ public static void DrawSphere(Sphere sphere, int segments, Vector2 offset, in Color color, float duration)
{
- DrawSphere(sphere, sides, offset, color, duration, DefaultDepthTest);
+ DrawSphere(sphere, segments, offset, color, duration, DefaultDepthTest);
}
///
/// Draws a sphere with the specified color and duration.
///
/// The sphere to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The color of the sphere.
///
/// The duration of the sphere's visibility, in seconds. If 0 is passed, the sphere is visible for a single frame.
@@ -170,16 +170,16 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the sphere be obscured by objects closer to the camera.
///
- public static void DrawSphere(Sphere sphere, int sides, in Color color, float duration, bool depthTest)
+ public static void DrawSphere(Sphere sphere, int segments, in Color color, float duration, bool depthTest)
{
- DrawSphere(sphere, sides, Vector2.zero, color, duration, depthTest);
+ DrawSphere(sphere, segments, Vector2.zero, color, duration, depthTest);
}
///
/// Draws a sphere.
///
/// The sphere to draw.
- /// The number of sides to generate.
+ /// The number of segments to generate.
/// The drawing offset of the sphere.
/// The color of the sphere.
///
@@ -189,10 +189,10 @@ public static partial class DebugEx
/// if depth test should be applied; otherwise, . Passing
/// will have the sphere be obscured by objects closer to the camera.
///
- public static void DrawSphere(Sphere sphere, int sides, in Vector3 offset, in Color color, float duration, bool depthTest)
+ public static void DrawSphere(Sphere sphere, int segments, in Vector3 offset, in Color color, float duration, bool depthTest)
{
- DrawPolyhedron(CreateCircle(sphere.Radius, sides, Vector3.zero), offset, color, duration, depthTest);
- DrawPolyhedron(CreateCircle(sphere.Radius, sides, Vector3.left), offset, color, duration, depthTest);
- DrawPolyhedron(CreateCircle(sphere.Radius, sides, Vector3.up), offset, color, duration, depthTest);
+ DrawPolyhedron(CreateCircle(sphere.Radius, segments, Vector3.zero), offset, color, duration, depthTest);
+ DrawPolyhedron(CreateCircle(sphere.Radius, segments, Vector3.left), offset, color, duration, depthTest);
+ DrawPolyhedron(CreateCircle(sphere.Radius, segments, Vector3.up), offset, color, duration, depthTest);
}
}