Tool refactoring

This commit is contained in:
2023-03-22 18:54:22 -07:00
parent ecee996893
commit 7b9c6576af
38 changed files with 355 additions and 1921 deletions

View File

@ -18,12 +18,12 @@ void SphereMesh::createSphere(
// Create vertices
int32_t c = 0;
for (int32_t i = 0; i <= stacks; i++) {
float_t phi = M_PI * i / stacks;
float_t phi = MATH_PI * i / stacks;
float_t cosPhi = cos(phi);
float_t sinPhi = sin(phi);
for (int32_t j = 0; j <= slices; j++) {
float_t theta = 2 * M_PI * j / slices;
float_t theta = 2 * MATH_PI * j / slices;
float_t cosTheta = cos(theta);
float_t sinTheta = sin(theta);

View File

@ -5,6 +5,7 @@
#pragma once
#include "display/mesh/Mesh.hpp"
#include "util/mathutils.hpp"
namespace Dawn {
class SphereMesh {

View File

@ -19,7 +19,7 @@ bool_t CapsuleCollider::performRaycast(
return raytestCapsule(
ray,
{
(struct PhysicsCapsule){
.height = this->height,
.radius = this->radius,
.origin = this->transform->getWorldPosition()