- R
- an array of floats in which to store the rotation matrix
- rotationVector
- the rotation vector to convert
Helper function to convert a rotation vector to a rotation matrix. Given a rotation vector (presumably from a ROTATION_VECTOR sensor), returns a 9 or 16 element rotation matrix in the array R. R must have length 9 or 16. If R.length == 9, the following matrix is returned:
java Example
/ R[ 0] R[ 1] R[ 2] \ | R[ 3] R[ 4] R[ 5] | \ R[ 6] R[ 7] R[ 8] /
java Example
/ R[ 0] R[ 1] R[ 2] 0 \ | R[ 4] R[ 5] R[ 6] 0 | | R[ 8] R[ 9] R[10] 0 | \ 0 0 0 1 /