src/ui/canvas.cpp

changeset 96
165777a20dc7
parent 79
5fe2dd4e161a
child 100
43ce3672648a
equal deleted inserted replaced
95:06a1aef170aa 96:165777a20dc7
67 const float angle_x = std::abs(glm::dot(vector_x, cameraDirection)); 67 const float angle_x = std::abs(glm::dot(vector_x, cameraDirection));
68 const float angle_y = std::abs(glm::dot(vector_y, cameraDirection)); 68 const float angle_y = std::abs(glm::dot(vector_y, cameraDirection));
69 if (angle_x < angle_y) 69 if (angle_x < angle_y)
70 { 70 {
71 this->newStatusText("rotate by X axis"); 71 this->newStatusText("rotate by X axis");
72 this->gridMatrix = glm::rotate(this->gridMatrix, PIf / 2, glm::vec3{1, 0, 0}); 72 this->gridMatrix = glm::rotate(this->gridMatrix, PI<float> / 2, glm::vec3{1, 0, 0});
73 } 73 }
74 else 74 else
75 { 75 {
76 this->newStatusText("rotate by Y axis"); 76 this->newStatusText("rotate by Y axis");
77 this->gridMatrix = glm::rotate(this->gridMatrix, PIf / 2, glm::vec3{0, 1, 0}); 77 this->gridMatrix = glm::rotate(this->gridMatrix, PI<float> / 2, glm::vec3{0, 1, 0});
78 } 78 }
79 this->updateGridMatrix(); 79 this->updateGridMatrix();
80 this->update(); 80 this->update();
81 } 81 }
82 else 82 else

mercurial