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

Definition

Helper function to convert a rotation vector to a normalized quaternion.

[Android.Runtime.Register("getQuaternionFromVector", "([F[F)V", "")]
public static void GetQuaternionFromVector (float[]? Q, float[]? rv);
[<Android.Runtime.Register("getQuaternionFromVector", "([F[F)V", "")>]
static member GetQuaternionFromVector : single[] * single[] -> unit

Parameters

Q
Single[]

an array of floats in which to store the computed quaternion

rv
Single[]

the rotation vector to convert

Attributes

Remarks

Helper function to convert a rotation vector to a normalized quaternion. Given a rotation vector (presumably from a ROTATION_VECTOR sensor), returns a normalized quaternion in the array Q. The quaternion is stored as [w, x, y, z]

Java documentation for android.hardware.SensorManager.getQuaternionFromVector(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