SensorManager.GetAngleChange(Single[], Single[], Single[]) Method

Definition

Helper function to compute the angle change between two rotation matrices.

[Android.Runtime.Register("getAngleChange", "([F[F[F)V", "")]
public static void GetAngleChange (float[]? angleChange, float[]? R, float[]? prevR);
[<Android.Runtime.Register("getAngleChange", "([F[F[F)V", "")>]
static member GetAngleChange : single[] * single[] * single[] -> unit

Parameters

angleChange
Single[]

an an array of floats (z, x, and y) in which the angle change (in radians) is stored

R
Single[]

current rotation matrix

prevR
Single[]

previous rotation matrix

Attributes

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 intrinsic 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

/  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

/  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]  /

See #getOrientation for more detailed definition of the output.

Java documentation for android.hardware.SensorManager.getAngleChange(float[], float[], float[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to