Yea
This commit is contained in:
@@ -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();
|
||||
|
@@ -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) +
|
||||
|
Reference in New Issue
Block a user