Interface GCPressedStateInput


  • public interface GCPressedStateInput
    An object conforming to \c GCPressedStateInput represents the pressed state of an element, typically a button. API-Since: 16.0
    • Method Detail

      • isPressed

        boolean isPressed()
        Buttons are mostly used in a digital sense, thus we have a recommended method for checking for pressed state instead of interpreting the value. As a general guideline a button is pressed if the value exceeds 0. However there may be hysteresis applied to counter noisy input values, thus incidental values around the threshold value may not trigger a change in pressed state. Other buttons may support two-stage actuation, where the button reports a value between 0 and 1 but is only considered pressed when its value is greater than some threshold other than 0.
        See Also:
        pressedDidChangeHandler()
      • lastPressedStateLatency

        double lastPressedStateLatency()
        The interval (in seconds) between the timestamp of the last pressed state change and the current time. This should be treated as a lower bound of the event latency. It may not include (wired or wireless) transmission latency, or latency accrued on the device before the event was transmitted to the host.
      • lastPressedStateTimestamp

        double lastPressedStateTimestamp()
        The timestamp of the last pressed state change. This time interval is not relative to any specific point in time. You can subtract a previous timestamp from the current timestamp to determine the time (in seconds) between changes to the value.
      • sources

        @NotNull
        @NotNull NSSet<?> sources()
        An object describing the physical action(s) the user performs to manipulate this input. API-Since: 17.0