@Override
public void updateMatrices(float fov) {
prevViewProjectionMatrix.set(viewProjectionMatrix);
if (cachedPosition.equals(getPosition()) && cachedViewigDirection.equals(getViewingDirection())
&& cachedZFar == zFar && cachedZNear == zNear) {
return;
}
projectionMatrix = MatrixUtils.createOrthogonalProjectionMatrix(left, right, top, bottom, zNear, zFar);
viewMatrix = MatrixUtils.createViewMatrix(0f, 0.0f, 0f, viewingDirection.x, viewingDirection.y, viewingDirection.z, up.x, up.y, up.z);
normViewMatrix = MatrixUtils.createViewMatrix(0f, 0f, 0f, viewingDirection.x, viewingDirection.y, viewingDirection.z, up.x, up.y, up.z);
viewProjectionMatrix = MatrixUtils.calcViewProjectionMatrix(viewMatrix, projectionMatrix);
inverseViewProjectionMatrix.invert(viewProjectionMatrix);
cachedPosition.set(getPosition());
cachedViewigDirection.set(getViewingDirection());
cachedZFar = zFar;
cachedZNear = zNear;
updateFrustum();
}