Android.Hardware.SensorManager.GetRotationMatrixFromVector Method
Helper function to convert a rotation vector to a rotation matrix.

Syntax

[Android.Runtime.Register("getRotationMatrixFromVector", "([F[F)V", "")]
public static void GetRotationMatrixFromVector (float[] R, float[] rotationVector)

Parameters

R
an array of floats in which to store the rotation matrix
rotationVector
the rotation vector to convert

Remarks

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]   /
If R.length == 16, the following matrix is returned:

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  /

[Android Documentation]

Requirements

Namespace: Android.Hardware
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 9