OrientationSensor Class
An orientation sensor (https://w3c.github.io/orientation-sensor/#orientationsensor-interface): the orientation of the device, as a unit quaternion. The base of AbsoluteOrientationSensor and RelativeOrientationSensor.
public abstract class OrientationSensor : Sensor- Inheritance
SensorOrientationSensor
Properties
| Name | Description |
|---|---|
| Quaternion | Gets the components (x, y, z, w) of the unit quaternion of the orientation of the device, or null. It is the same list while the reading does not change. |
Quaternion
MotionSensors.csGets the components (x, y, z, w) of the unit quaternion of the orientation of the device, or null. It is the same list while the reading does not change.
public IReadOnlyList<double>? Quaternion { get; }Methods
| Name | Description |
|---|---|
| PopulateMatrix(object?) | Writes the rotation matrix of the orientation of the device to a matrix (https://w3c.github.io/orientation-sensor/#dom-orientationsensor-populatematrix): a Float32Array or a Float64Array of at least 16 elements (a Single or Double array from .NET), or a DomMatrix. Throws a TypeErrorException when the array is too short, and a NotReadableError DomException when the sensor has no reading. |
PopulateMatrix(object?)
MotionSensors.csWrites the rotation matrix of the orientation of the device to a matrix (https://w3c.github.io/orientation-sensor/#dom-orientationsensor-populatematrix): a Float32Array or a Float64Array of at least 16 elements (a Single or Double array from .NET), or a DomMatrix. Throws a TypeErrorException when the array is too short, and a NotReadableError DomException when the sensor has no reading.