public static Matrix4f matrixO2J(OVRMatrix4f from, Matrix4f to) {
        to.loadIdentity(); // For the additional columns (unless I'm badly misunderstanding matrices)

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 4; y++) {
                float val = from.M(x + y * 4); // TODO verify this
                to.set(x, y, val);
            }
        }

        to.transposeLocal(); // jME vs LibOVR coordinate spaces - Yay!

        return to;
    }
Copy the values from a LibOVR matrix into a jMonkeyEngine matrix.

@param from The matrix to copy from.
@param to   The matrix to copy to.
@return The {@code to} argument.
jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusVR.java