Reworked DebugDraw System #294

Merged
Pycorax merged 9 commits from SP3-1-DebugDraw into main 2022-12-16 02:21:32 +08:00
2 changed files with 52 additions and 0 deletions
Showing only changes of commit 77a164cefb - Show all commits

View File

@ -47,6 +47,26 @@ namespace SHADE
SHDebugDraw::Line(Convert::ToNative(from), Convert::ToNative(to), Convert::ToNative(color));
}
void Gizmos::DrawCube(Vector3 center, Vector3 extents)
{
DrawCube(center, extents, defaultColor);
}
void Gizmos::DrawCube(Vector3 center, Vector3 extents, SHADE::Color color)
{
SHDebugDraw::Cube(Convert::ToNative(center), Convert::ToNative(extents), Convert::ToNative(color));
}
void Gizmos::DrawSphere(Vector3 center, float radius)
{
DrawSphere(center, radius, defaultColor);
}
void Gizmos::DrawSphere(Vector3 center, float radius, SHADE::Color color)
{
SHDebugDraw::Sphere(Convert::ToNative(center), SHVec3(radius, radius, radius), Convert::ToNative(color));
}
void Gizmos::DrawWireCube(Vector3 center, Vector3 extents)
{
DrawWireCube(center, extents, defaultColor);

View File

@ -56,6 +56,38 @@ namespace SHADE
/// <param name="color">Colour of the line.</param>
static void DrawLine(Vector3 from, Vector3 to, SHADE::Color color);
/// <summary>
/// Renders a cube centered around the position specified in world
/// space.
/// Uses <see cref="Gizmos.Color">Color</see> to render.
/// </summary>
/// <param name="center">Position where the cube wil be centered at.</param>
/// <param name="extents">Size of the rendered cube.</param>
static void DrawCube(Vector3 center, Vector3 extents);
/// <summary>
/// Renders a cube centered around the position specified in world
/// space.
/// </summary>
/// <param name="center">Position where the cube wil be centered at.</param>
/// <param name="extents">Size of the rendered cube.</param>
/// <param name="color">Colour of the cube.</param>
static void DrawCube(Vector3 center, Vector3 extents, SHADE::Color color);
/// <summary>
/// Renders a sphere centered around the position specified in world
/// space.
/// Uses <see cref="Gizmos.Color">Color</see> to render.
/// </summary>
/// <param name="center">Position where the sphere wil be centered at.</param>
/// <param name="radius">Radius of the rendered sphere.</param>
static void DrawSphere(Vector3 center, float radius);
/// <summary>
/// Renders a sphere centered around the position specified in world
/// space.
/// </summary>
/// <param name="center">Position where the sphere wil be centered at.</param>
/// <param name="radius">Radius of the rendered sphere.</param>
/// <param name="color">Colour of the sphere.</param>
static void DrawSphere(Vector3 center, float radius, SHADE::Color color);
/// <summary>
/// Renders a wireframe cube centered around the position specified in world
/// space.
/// Uses <see cref="Gizmos.Color">Color</see> to render.