Fixed math problem and display submeshes in editor panel

This commit is contained in:
a.pilote
2022-07-16 21:49:17 -04:00
parent 7d9e5b07b5
commit dbec248d8a
8 changed files with 78 additions and 20 deletions
-2
View File
@@ -202,7 +202,5 @@ namespace Nuake
}
}
}
}
}
+12
View File
@@ -0,0 +1,12 @@
#include "src/Core/Maths.h"
using namespace Nuake;
Quat Nuake::QuatFromEuler(float x, float y, float z)
{
// Taken from: https://gamedev.stackexchange.com/questions/13436/glm-euler-angles-to-quaternion
Quat QuatAroundX = Quat(x, Vector3(1.0, 0.0, 0.0));
Quat QuatAroundY = Quat(y, Vector3(0.0, 1.0, 0.0));
Quat QuatAroundZ = Quat(z, Vector3(0.0, 0.0, 1.0));
return QuatAroundX * QuatAroundY * QuatAroundZ;
}
+1
View File
@@ -6,6 +6,7 @@
#include <src/Vendors/glm/ext/vector_float2.hpp>
#include <src/Vendors/glm/ext/matrix_float4x4.hpp>
#include <glm/gtx/quaternion.hpp>
namespace Nuake
{
// Type definitions