|
inlineconstexpr |
Callable object computing a quaternion from its rotation_matrix representation.
This function returns a quaternion associated to the input rotation matrix m. If m is not a proper rotation 3x3 rotation matrix (i.e an orthogonal matrix with determinant 1) the result is undefined.
Defined in header
Parameters
m
the rotation matrix. The actual implementation assumes that m[i][j] will return the ith line and jth column element of the matrix (indices starting from 0).
The computation method is inspired from the article: "Accurate Computation of Quaternions from Rotation Matrices", by Soheil Sarabandi and Federico Thomas Institut de Robotica i Informatica Industrial (CSIC-UPC) Llorens Artigas 4-6, 08028 Barcelona, Spain.
Return value
an unitary quaternion representing the rotation