Added C# Gizmos class interface
This commit is contained in:
parent
e89f5b4b9e
commit
41b7cb842c
|
@ -323,7 +323,7 @@ namespace SHADE
|
|||
static const SHMeshData SPHERE = SHPrimitiveGenerator::Sphere();
|
||||
for (const auto& idx : SPHERE.Indices)
|
||||
{
|
||||
spherePoints.emplace_back(SPHERE.VertexPositions[idx]);
|
||||
spherePoints.emplace_back(SPHERE.VertexPositions[idx] * radius);
|
||||
}
|
||||
}
|
||||
drawLineSet(storage, color, spherePoints.begin(), spherePoints.end());
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/************************************************************************************//*!
|
||||
\file Gizmos.cxx
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Nov 8, 2022
|
||||
\brief Contains the definition of the functions for the Convert managed static
|
||||
class.
|
||||
|
||||
Note: This file is written in C++17/CLI.
|
||||
|
||||
Copyright (C) 2022 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
// Precompiled Headers
|
||||
#include "SHpch.h"
|
||||
// Primary Header
|
||||
#include "Gizmos.hxx"
|
||||
// External Dependencies
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/************************************************************************************//*!
|
||||
\file Gizmos.hxx
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Nov 8, 2022
|
||||
\brief Contains the definition of the Gizmos static class and the
|
||||
declaration of its functions.
|
||||
|
||||
Note: This file is written in C++17/CLI.
|
||||
|
||||
Copyright (C) 2022 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
#pragma once
|
||||
|
||||
// Project Includes
|
||||
#include "Math/Vector3.hxx"
|
||||
#include "Graphics/Color.hxx"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides functions for implementing debug drawing.
|
||||
/// </summary>
|
||||
public value class Gizmos abstract sealed
|
||||
{
|
||||
public:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Debug Draw Functions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
static void DrawLine(Vector3 from, Vector3 to);
|
||||
static void DrawLine(Vector3 from, Vector3 to, Color color);
|
||||
static void DrawWireCube(Vector3 center, Vector3 extents);
|
||||
static void DrawWireCube(Vector3 center, Vector3 extents, Color color);
|
||||
static void DrawWireSphere(Vector3 center, float radius);
|
||||
static void DrawWireSphere(Vector3 center, float radius, Color color);
|
||||
|
||||
private:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Data Members */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
Color defaultColor;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue