Class VREventScroll

  • All Implemented Interfaces:

    public class VREventScroll
    extends Struct
    Used for simulated mouse wheel scroll.

    Member documentation

    • xdelta – movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
    • viewportscale – for scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1]


     struct VREvent_Scroll_t {
         float xdelta;
         float ydelta;
         uint32_t unused;
         float viewportscale;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • VREventScroll

        public VREventScroll​(java.nio.ByteBuffer container)
        Creates a VREventScroll 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.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • xdelta

        public float xdelta()
        Returns the value of the xdelta field.
      • ydelta

        public float ydelta()
        Returns the value of the ydelta field.
      • unused

        public int unused()
        Returns the value of the unused field.
      • viewportscale

        public float viewportscale()
        Returns the value of the viewportscale field.
      • create

        public static VREventScroll create​(long address)
        Returns a new VREventScroll instance for the specified memory address.
      • createSafe

        public static VREventScroll createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static VREventScroll.Buffer create​(long address,
                                                  int capacity)
        Create a VREventScroll.Buffer instance at the specified memory.
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        public static VREventScroll.Buffer createSafe​(long address,
                                                      int capacity)
        Like create, but returns null if address is NULL.
      • nxdelta

        public static float nxdelta​(long struct)
        Unsafe version of xdelta().
      • nydelta

        public static float nydelta​(long struct)
        Unsafe version of ydelta().
      • nunused

        public static int nunused​(long struct)
        Unsafe version of unused().
      • nviewportscale

        public static float nviewportscale​(long struct)
        Unsafe version of viewportscale().