16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 16:59:17 +02:00

Change Math3D::vector3 to glm::dvec3 in TCamera class

This commit is contained in:
docentYT
2026-04-26 18:12:47 +02:00
parent dcfd34908a
commit aa24c55d2d
6 changed files with 26 additions and 15 deletions

View File

@@ -26,6 +26,15 @@ void vector3::RotateY(double angle)
x = (cos(angle) * x + z * sin(angle));
z = (z * cos(angle) - sin(angle) * tx);
};
glm::vec3 RotateY(glm::vec3 v, float angle)
{
float s = sin(angle);
float c = cos(angle);
return glm::vec3(c * v.x + s * v.z, v.y, c * v.z - s * v.x);
}
void vector3::RotateZ(double angle)
{
double ty = y;

View File

@@ -14,6 +14,8 @@ http://mozilla.org/MPL/2.0/.
namespace Math3D
{
glm::vec3 RotateY(glm::vec3 v, float angle);
// Define this to have Math3D.cp generate a main which tests these classes
//#define TEST_MATH3D