SensorManager.GetRotationMatrixFromVector(Single[], Single[]) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Helper function to convert a rotation vector to a rotation matrix.
[Android.Runtime.Register("getRotationMatrixFromVector", "([F[F)V", "")]
public static void GetRotationMatrixFromVector (float[]? R, float[]? rotationVector);
[<Android.Runtime.Register("getRotationMatrixFromVector", "([F[F)V", "")>]
static member GetRotationMatrixFromVector : single[] * single[] -> unit
- R
- Single[]
an array of floats in which to store the rotation matrix
- rotationVector
- Single[]
the rotation vector to convert
- Attributes
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:
/ 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:
/ 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 /
Java documentation for android.hardware.SensorManager.getRotationMatrixFromVector(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.
Tuote | Versiot |
---|---|
.NET for Android | .NET for Android API 34, .NET for Android API 35 |