};
@Override
public Mat4 calcMatrix() {
Mat4 mat = new Mat4(1.0f);
// Remember: these transforms are in reverse order.
// In this space, we are facing in the correct direction. Which means that the camera point
// is directly behind us by the radius number of units.
mat = Glm.translate(mat, new Vec3(0.0f, 0.0f, -m_currView.radius));
// Rotate the world to look in the right direction..
Quaternion fullRotation = Glm.angleAxis(m_currView.degSpinRotation, new Vec3(0.0f, 0.0f, 1.0f)).mul(m_currView.orient);
mat.mul(Glm.matCast(fullRotation));
// Translate the world by the negation of the lookat point, placing the origin at the lookat point.
mat = Glm.translate(mat, Vec3.negate(m_currView.targetPos));
return mat;