quat을 mat4로 변환하려고합니다.quaternion을 사용하여 매트릭스를
내 코드입니다 : 내가 프로그램을 실행하면
#include <iostream>
#include<glm/glm.hpp>
#include<glm/gtc/quaternion.hpp>
#include<glm/common.hpp>
using namespace std;
int main()
{
glm::mat4 MyMatrix=glm::mat4();
glm::quat myQuat;
myQuat=glm::quat(0.707107,0.707107,0.00,0.000);
glm::mat4 RotationMatrix = quaternion::toMat4(myQuat);
for(int i=0;i<4;++i)
{
for(int j=0;j<4;++j)
{
cout<<RotationMatrix[i][j]<<" ";
}
cout<<"\n";
}
return 0;
}
는 오류 표시 "오류 : '사원 수는'선언되지 않았습니다."
아무도 도와 줄 수 있습니까?
#include <glm/gtx/quaternion.hpp>
을 그리고 toMat4
의 네임 스페이스를 수정 :
#include <glm/gtx/quaternion.hpp>
합니까 필요하지 않습니다을'사원 수 : toMat4'는'GLM :: 사원 수 있어야합니다 :: toMat4'? – NathanOliver