1, 数据矩阵的存储区别:
Eigen是按列存储的, glm是按行存储的;
glm::mat4 m1(1);
glm::mat4 m0(0);
m1[2][3] = 23;
m1[3][2] = 32;
Eigen::Matrix4f Result = Eigen::Matrix4f::Identity();
Result(1,2) = 12;
Result(2,3) = 23;
Result(2,1) = 21;
Result(3,2) = 32;
cout << "Result(1) =\n" << Result << std::endl;
Eigen::Matrix4f Result1 = Eigen::Matrix4f::Zero();
cout << "Result1 =\n" << Result1 << endl;
Eigen::Matrix4f Result2 = Eigen::Matrix4f::Ones();
cout << "Result2 =\n" << Result2 << endl;
2, 数据矩阵的重载*运算符的区别(很重要,不好懂):
glm::vec3 eye(0.0f, 0.0f, 1.0f);
glm::vec3 center(0.0f, 0.0f, 0.0f);
glm::vec3 up(0.0f,1.0f, 0.0f);
glm::mat