public class DeviceGyroscopeOrientation extends DeviceOrientation
DeviceOrientation, DeviceCompassOrientation
,
Serialized FormAZIMUTH_INDEX, PITCH_INDEX, ROLL_INDEX, YAW_INDEX
Constructor and Description |
---|
DeviceGyroscopeOrientation() |
Modifier and Type | Method and Description |
---|---|
DeviceCompassOrientation |
getCompassOrientation() |
float[] |
getOrientation() |
boolean |
isGyroOrientationDefined() |
void |
prepareForOrientationObtaining()
Restart to status initial of obtaining orientation process
|
void |
renewOrientationWithCompass(OrientationSensorListener listener)
Enables the Compass Orientation to renew the current value of orientation vector using the listener
|
void |
sensorManager(ESensorType sensorType,
float[] sample,
long timestampSample,
OrientationSensorListener listener)
Called when sensor values have changed by the listener parameter
|
void |
setCompassOrientation(DeviceCompassOrientation compassOrientation) |
void |
setGyroMatrix(float[] gyroMatrix) |
void |
setGyroOrientationDefined(boolean isGyroOrientationDefined) |
getAzimuth, getPitch, getRoll, getSensors, getYaw, setAzimuth, setOrientation, setPitch, setRoll, setSensors, setYaw
public float[] getOrientation()
getOrientation
in class DeviceOrientation
public void setGyroMatrix(float[] gyroMatrix)
public DeviceCompassOrientation getCompassOrientation()
public void setCompassOrientation(DeviceCompassOrientation compassOrientation)
public boolean isGyroOrientationDefined()
public void setGyroOrientationDefined(boolean isGyroOrientationDefined)
public void prepareForOrientationObtaining()
public void sensorManager(ESensorType sensorType, float[] sample, long timestampSample, OrientationSensorListener listener)
DeviceOrientation
sensorManager
in class DeviceOrientation
sensorType
- sensor type of SensorManager in Android API 2.2sample
- SensorEvent values in Android API 2.2timestampSample
- SensorEvent timestamp in Android API 2.2public void renewOrientationWithCompass(OrientationSensorListener listener)
listener:
- listener that update the orientation vector