Class DeviceOrientationEvent

java.lang.Object
org.vaadin.firitin.devicemotion.DeviceOrientationEvent

public class DeviceOrientationEvent extends Object
Represents a device orientation event containing the physical orientation of the device. The orientation is expressed as rotation angles around three axes.
Author:
mstahv
  • Constructor Details

    • DeviceOrientationEvent

      public DeviceOrientationEvent()
  • Method Details

    • getAlpha

      public Double getAlpha()
      Returns:
      rotation around the Z axis, in degrees, ranging from 0 to 360 (can be null if not available)
    • getBeta

      public Double getBeta()
      Returns:
      rotation around the X axis, in degrees, ranging from -180 to 180 (can be null if not available)
    • getGamma

      public Double getGamma()
      Returns:
      rotation around the Y axis, in degrees, ranging from -90 to 90 (can be null if not available)
    • getAbsolute

      public Boolean getAbsolute()
      Returns:
      true if the orientation is provided as the difference between the device coordinate frame and the Earth coordinate frame; false if the orientation is provided relative to an arbitrary coordinate frame (can be null if not available)
    • getWebkitCompassHeading

      public Double getWebkitCompassHeading()
      Returns:
      compass heading in degrees from 0-360 (iOS Safari specific property, can be null if not available)
    • getWebkitCompassAccuracy

      public Double getWebkitCompassAccuracy()
      Returns:
      accuracy of the compass heading in degrees (iOS Safari specific property, can be null if not available). A value of -1 indicates that the compass heading is unreliable.
    • toString

      public String toString()
      Overrides:
      toString in class Object