-1
我嘗試使用glm時出現錯誤。 glm的一些功能工作。但是我不能使用所有重載和四元數相關的東西。glm:無法使用從quaternion.hppMat4
1>src\foo.cpp(369): error C2039: 'toMat4': is not a member of 'glm'
1> d:\..\glm\glm\gtc\type_ptr.inl(35): note: see declaration of 'glm'
1>src\foo.cpp(369): error C3861: 'toMat4': identifier not found
與此:
#include <glm/glm.hpp> //vec3, vec4, ivec4, mat4
#include <glm/common.hpp> //vec3, vec4, ivec4, mat4
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/quaternion.hpp>
glm::mat4 t1 = glm::translate(glm::mat4x4(), -piv);
glm::mat4 rot = glm::toMat4(trafo.orientation);
glm::mat4 t2 = glm::translate(glm::mat4x4(), piv);
你使用最新的glm版本嗎?你使用哪種編譯器? 並且包含您不必包含任何其他內容。 –
我的回答對你有幫助嗎? – OutOfBound