public class DeviceOrientation
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
AZIMUTH_INDEX
orientation vector index of azimuth angle
|
static int |
PITCH_INDEX
orientation vector index of pitch angle
|
static int |
ROLL_INDEX
orientation vector index of roll angle
|
static int |
YAW_INDEX
orientation vector index of yaw angle
|
Constructor and Description |
---|
DeviceOrientation() |
Modifier and Type | Method and Description |
---|---|
float |
getAzimuth() |
float[] |
getOrientation() |
float |
getPitch() |
float |
getRoll() |
ESensorType[] |
getSensors() |
float |
getYaw() |
void |
sensorManager(ESensorType sensorType,
float[] sample,
long timestampSample,
OrientationSensorListener listener)
Called when sensor values have changed by the listener parameter
|
void |
setAzimuth(float azimuth) |
void |
setOrientation(float[] orientation) |
void |
setPitch(float angle) |
void |
setRoll(float angle) |
void |
setSensors(ESensorType[] sensors) |
void |
setYaw(float angle) |
public static final int AZIMUTH_INDEX
public static final int YAW_INDEX
public static final int PITCH_INDEX
public static final int ROLL_INDEX
public float[] getOrientation()
public void setOrientation(float[] orientation)
public float getAzimuth()
public void setAzimuth(float azimuth)
public float getYaw()
public void setYaw(float angle)
public float getPitch()
public void setPitch(float angle)
public float getRoll()
public void setRoll(float angle)
public ESensorType[] getSensors()
public void setSensors(ESensorType[] sensors)
public void sensorManager(ESensorType sensorType, float[] sample, long timestampSample, OrientationSensorListener listener)
sensorType
- sensor type of SensorManager in Android API 2.2sample
- SensorEvent values in Android API 2.2timestampSample
- SensorEvent timestamp in Android API 2.2listener
-