enh(io): test orthogonality of matrices when reading from disk
Description
To avoid strange behavior in our transform chain. We should make sure that matrices loaded from disk (.trf or .json) are orthogonal.
Functional specifications
- Ensure that loaded matrices are orthogonal by adding a test, and reject matrices that didn't respect orthogonality.
- If non-orthogonal matrices are needed (we don't have this case for now) test can be disabled (?)
- Create a is_orthogonal method in geometry::data::matrix4 along with a unit test of this method
- Call this method in the session_reader (deserializer of matrix4)
- Call this method in the matrix4_trf_reader
Technical specifications
A simple test can be performed:
- Extract rotation part as R
- Compute transpose of R (R_t)
- Compute inverse of R (R^-1)
- Test if R_t == R^-1 Or Test that R*R_t = identity
Test plan
Update unit test of reader.