es.ucm.look.ar.util
Class DeviceOrientation

java.lang.Object
  extended by es.ucm.look.ar.util.DeviceOrientation

public class DeviceOrientation
extends java.lang.Object

A class holding device's orientation


Field Summary
 float azimuth
          Device azimuth ( y coordinate )
 float pitch
          Device pitch ( x coordinate )
 float roll
          Device roll ( z coordinate )
 
Method Summary
static DeviceOrientation getDeviceOrientation(Context c)
           
 float[] getRotationMatrix()
          Returns the matrix rotation for the current device orientation
 void onAccuracyChanged(Sensor sensor, int accuracy)
           
 void onSensorChanged(SensorEvent event)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

azimuth

public float azimuth
Device azimuth ( y coordinate )


pitch

public float pitch
Device pitch ( x coordinate )


roll

public float roll
Device roll ( z coordinate )

Method Detail

getDeviceOrientation

public static DeviceOrientation getDeviceOrientation(Context c)

getRotationMatrix

public float[] getRotationMatrix()
Returns the matrix rotation for the current device orientation

Returns:
the matrix rotation for the current device orientation

onAccuracyChanged

public void onAccuracyChanged(Sensor sensor,
                              int accuracy)

onSensorChanged

public void onSensorChanged(SensorEvent event)