Android.Hardware.SensorManager.GetAngleChange Method
Helper function to compute the angle change between two rotation matrices.

Syntax

[Android.Runtime.Register("getAngleChange", "([F[F[F)V", "")]
public static void GetAngleChange (float[] angleChange, float[] R, float[] prevR)

Parameters

angleChange
an an array of floats (z, x, and y) in which the angle change is stored
R
current rotation matrix
prevR
previous rotation matrix

Remarks

Helper function to compute the angle change between two rotation matrices. Given a current rotation matrix (R) and a previous rotation matrix (prevR) computes the rotation around the z,x, and y axes which transforms prevR to R. outputs a 3 element vector containing the z,x, and y angle change at indexes 0, 1, and 2 respectively.

Each input matrix is either as a 3x3 or 4x4 row-major matrix depending on the length of the passed array:

If the array length is 9, then the array elements represent this matrix

java Example

   /  R[ 0]   R[ 1]   R[ 2]   \
   |  R[ 3]   R[ 4]   R[ 5]   |
   \  R[ 6]   R[ 7]   R[ 8]   /

If the array length is 16, then the array elements represent this matrix

java Example

   /  R[ 0]   R[ 1]   R[ 2]   R[ 3]  \
   |  R[ 4]   R[ 5]   R[ 6]   R[ 7]  |
   |  R[ 8]   R[ 9]   R[10]   R[11]  |
   \  R[12]   R[13]   R[14]   R[15]  /

[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