This commit is contained in:
2024-01-11 14:49:08 -05:00
parent 79b2ac2637
commit fa0c5e5de9
2 changed files with 3 additions and 3 deletions

View File

@@ -47,8 +47,9 @@ public:
void render() override {
glColor3f(0.75,0.75,0.75);
glPushMatrix();
//glRotatef(-angle.x,1.0f, 0.0f, 0.0f);
//glRotatef(-angle.y,0.0f, 1.0f, 0.0f);
//glRotatef(angle.x,1.0f, 0.0f, 0.0f);
//glRotatef(angle.y,0.0f, 1.0f, 0.0f);
//glRotatef(angle.z,0.0f, 0.0f, 1.0f);
glTranslatef(position.x ,position.y,position.z);
geometry.draw();
glPopMatrix();

View File

@@ -59,7 +59,6 @@ void VertexArray::rotate(LinearAlgebra::Vector3 angle) {
LinearAlgebra::Vector3 angleRad = LinearAlgebra::Vector3(Math::Radians(angle.x), Math::Radians(angle.y), Math::Radians(angle.z));
for (auto& vertex : vertices) {
// Apply 3D rotation matrices
LinearAlgebra::Vector3 vert;
vert.z = -vertex.x * std::sin(angleRad.y) +
vertex.y * std::sin(angleRad.x) * std::cos(angleRad.y) +