Class representing a single Daydream controller. Create a Controller using
getController(). Optionally register for events with
Controller.EventListener. Update the controller's state using
update() and then read
the public fields as needed.
|class||Controller.BatteryLevels||Constants that represent the controller battery level.|
|class||Controller.ConnectionStates||Constants that represent the controller's states.|
|class||Controller.EventListener||Listens for various classes of events related to the Controller.|
|public boolean||appButtonState||True if the user currently holding down the APP button.|
|public int||batteryLevelBucket||The current battery level bucket.|
|public boolean||clickButtonState||True if the user is currently holding the CLICK button down.|
|public boolean||homeButtonState||True if the user is currently holding down the HOME button.|
|public boolean||isCharging||True if the controller is currently being charged.|
|public boolean||isTouching||True if the user is currently touching the touchpad.|
|public final Orientation||orientation||The controller's orientation in Start Space as a quaternion.|
|public final float||position||The controller's position for use with elbow model.|
|public long||timestamp||The time in nanosecond at when the last update occurred.|
|public final PointF||touch||The point on the touch pad that the user interacted with.|
|public boolean||volumeDownButtonState||True if the user is currently holding the VOLUME DOWN button.|
|public boolean||volumeUpButtonState||True if the user is currently holding down the VOLUME UP button.|
public boolean appButtonState
True if the user currently holding down the APP button.
public int batteryLevelBucket
The current battery level bucket.
This is a value from
Controller.BatteryLevels and not the percent.
public boolean clickButtonState
True if the user is currently holding the CLICK button down.
public boolean homeButtonState
True if the user is currently holding down the HOME button.
public boolean isCharging
True if the controller is currently being charged.
public boolean isTouching
True if the user is currently touching the touchpad.
public final Orientation orientation
The controller's orientation in Start Space as a quaternion.
public final float position
The controller's position for use with elbow model.
public long timestamp
The time in nanosecond at when the last update occurred. This value is set via
update() calls and represents when the last event was received from the hardware.
public final PointF touch
The point on the touch pad that the user interacted with. Each value will range from [0, 1]. The x value of the touch point aligns with the controller's x-axis and the y value aligns with the controller's z-axis. This is initially (0, 0) until an event is received.
public boolean volumeDownButtonState
True if the user is currently holding the VOLUME DOWN button.
public boolean volumeUpButtonState
True if the user is currently holding down the VOLUME UP button.
public void setEventListener (Controller.EventListener listener)
Controller.EventListener for this Controller.
public void update ()
Update this Controller's state with the latest data from the hardware.