makeViewMatrix function
Constructs a new OpenGL view matrix.
cameraPosition
specifies the position of the camera.
cameraFocusPosition
specifies the position the camera is focused on.
upDirection
specifies the direction of the up vector (usually, +Y).
Implementation
Matrix4 makeViewMatrix(
Vector3 cameraPosition, Vector3 cameraFocusPosition, Vector3 upDirection) {
final r = Matrix4.zero();
setViewMatrix(r, cameraPosition, cameraFocusPosition, upDirection);
return r;
}