Use a clearer function

This commit is contained in:
Atlante45 2015-11-11 17:24:50 -08:00
parent e4897a8de7
commit 118d05d824
2 changed files with 2 additions and 1 deletions

View file

@ -201,7 +201,7 @@ float angleBetween(const glm::vec3& v1, const glm::vec3& v2) {
// Helper function return the rotation from the first vector onto the second
glm::quat rotationBetween(const glm::vec3& v1, const glm::vec3& v2) {
return glm::quat(glm::normalize(v1), glm::normalize(v2));
return glm::rotation(glm::normalize(v1), glm::normalize(v2));
}
bool isPointBehindTrianglesPlane(glm::vec3 point, glm::vec3 p0, glm::vec3 p1, glm::vec3 p2) {

View file

@ -16,6 +16,7 @@
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
// Bring the most commonly used GLM types into the default namespace
using glm::ivec2;