欧拉角转换为方向向量是如何计算的?
例如 OpenGL实现FPS相机时,【www.learnopengl.com]给出的从欧拉角计算出相机front朝向的代码为:
void updateCameraVectors()
{
// Calculate the new Front vector
glm::vec3 front;
front.x = cos(glm::radians(this->Yaw)) * cos(glm::radians(this->Pitch));
front.y = sin(glm::radians(this->Pitch));
front.z = sin(glm::radians(this->Yaw)) * cos(glm::radians(this->Pitch));
this->Front = glm::normalize(front);
// Also re-calculate the Right and Up vector
...
}
这里的front是怎么推导出来的? 从哪里可以获取这个公式的推导?
请提供具体的链接地址,不要宽泛的指向wiki。