Class VRControllerState

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VRControllerState
    extends Struct
    implements NativeResource
    Holds all the state of a controller at one moment in time.

    Member documentation

    • unPacketNum – If packet num matches that on your prior call, then the controller state hasn't been changed since your last call and there is no need to process it.
    • ulButtonPressed – bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask
    • rAxis[5] – axis data for the controller's analog inputs


     struct VRControllerState_t {
         uint32_t unPacketNum;
         uint64_t ulButtonPressed;
         uint64_t ulButtonTouched;
         VRControllerAxis_t rAxis[5];
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • VRControllerState

        public VRControllerState​(java.nio.ByteBuffer container)
        Creates a VRControllerState instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.