public void setView(double x, double y, double z, double xRot, double yRot) {
        cameraPosition.set(x, y, z);

        orientationMatrix.setIdentity();
        orientationMatrix.rotate(-yRot, Vector3.Y_POS);
        orientationMatrix.rotate(-xRot, Vector3.X_POS);

        forward.set(Vector3.Z_NEG);
        right.set(Vector3.X_POS);
        up.set(Vector3.Y_POS);

        orientationMatrix.apply(forward);
        orientationMatrix.apply(right);
        orientationMatrix.apply(up);

        viewMatrix.setIdentity();
        lookAt(viewMatrix, cameraPosition, cameraPosition.copy().add(forward), up);
        viewMatrix.transpose();
    }
Calculates a view matrix based on camera position, x rotation, and y rotation.
core/src/main/java/mrtjp/projectred/redui/PVMMatrix.java