Model
translate rotation scale
View Matrix
lookat Matrix
lookAt(eye, target, up) 构造的是 view 矩阵,它把世界空间变换到相机空间:
它的构造步骤:
cpp
Vector3f f = normalize(target - eye); // 前
Vector3f s = normalize(cross(f, up)); // 右
Vector3f u = cross(s, f); // 上然后矩阵是:
注意:
- 符号