Class XrActionStateVector2f

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrActionStateVector2f>
org.lwjgl.openxr.XrActionStateVector2f
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrActionStateVector2f extends org.lwjgl.system.Struct<XrActionStateVector2f> implements org.lwjgl.system.NativeResource
2D float vector action state.
Description

When multiple input sources are bound to this action, the currentState follows the previously defined rule to resolve ambiguity.

Valid Usage (Implicit)
See Also

XrVector2f, GetActionStateVector2f

Layout


 struct XrActionStateVector2f {
     XrStructureType type();
     void * next();
     XrVector2f currentState();
     XrBool32 changedSinceLastSync();
     XrTime lastChangeTime();
     XrBool32 isActive();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • CURRENTSTATE

      public static final int CURRENTSTATE
      The struct member offsets.
    • CHANGEDSINCELASTSYNC

      public static final int CHANGEDSINCELASTSYNC
      The struct member offsets.
    • LASTCHANGETIME

      public static final int LASTCHANGETIME
      The struct member offsets.
    • ISACTIVE

      public static final int ISACTIVE
      The struct member offsets.
  • Constructor Details

    • XrActionStateVector2f

      public XrActionStateVector2f(ByteBuffer container)
      Creates a XrActionStateVector2f 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrActionStateVector2f>
    • type

      public int type()
      the XrStructureType of this structure.
    • next

      public long next()
      NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR.
    • currentState

      public XrVector2f currentState()
      the current XrVector2f state of the Action.
    • changedSinceLastSync

      public boolean changedSinceLastSync()
      TRUE if the value of currentState is different than it was before the most recent call to SyncActions.
    • lastChangeTime

      public long lastChangeTime()
      the XrTime associated with the most recent change to this action’s state.
    • isActive

      public boolean isActive()
      TRUE if and only if there exists an input source that is contributing to the current state of this action.
    • type

      public XrActionStateVector2f type(int value)
      Sets the specified value to the type() field.
    • type$Default

      public XrActionStateVector2f type$Default()
      Sets the TYPE_ACTION_STATE_VECTOR2F value to the type() field.
    • next

      public XrActionStateVector2f next(long value)
      Sets the specified value to the next() field.
    • currentState

      public XrActionStateVector2f currentState(XrVector2f value)
      Copies the specified XrVector2f to the currentState() field.
    • currentState

      public XrActionStateVector2f currentState(Consumer<XrVector2f> consumer)
      Passes the currentState() field to the specified Consumer.
    • changedSinceLastSync

      public XrActionStateVector2f changedSinceLastSync(boolean value)
      Sets the specified value to the changedSinceLastSync() field.
    • lastChangeTime

      public XrActionStateVector2f lastChangeTime(long value)
      Sets the specified value to the lastChangeTime() field.
    • isActive

      public XrActionStateVector2f isActive(boolean value)
      Sets the specified value to the isActive() field.
    • set

      public XrActionStateVector2f set(int type, long next, XrVector2f currentState, boolean changedSinceLastSync, long lastChangeTime, boolean isActive)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static XrActionStateVector2f malloc()
      Returns a new XrActionStateVector2f instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XrActionStateVector2f calloc()
      Returns a new XrActionStateVector2f instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XrActionStateVector2f create()
      Returns a new XrActionStateVector2f instance allocated with BufferUtils.
    • create

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

      public static @Nullable XrActionStateVector2f createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrActionStateVector2f.Buffer malloc(int capacity)
      Returns a new XrActionStateVector2f.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XrActionStateVector2f.Buffer calloc(int capacity)
      Returns a new XrActionStateVector2f.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrActionStateVector2f.Buffer create(int capacity)
      Returns a new XrActionStateVector2f.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

      public static @Nullable XrActionStateVector2f.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrActionStateVector2f malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrActionStateVector2f instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XrActionStateVector2f calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrActionStateVector2f instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static XrActionStateVector2f.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrActionStateVector2f.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XrActionStateVector2f.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrActionStateVector2f.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • ncurrentState

      public static XrVector2f ncurrentState(long struct)
      Unsafe version of currentState().
    • nchangedSinceLastSync

      public static int nchangedSinceLastSync(long struct)
      Unsafe version of changedSinceLastSync().
    • nlastChangeTime

      public static long nlastChangeTime(long struct)
      Unsafe version of lastChangeTime().
    • nisActive

      public static int nisActive(long struct)
      Unsafe version of isActive().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • ncurrentState

      public static void ncurrentState(long struct, XrVector2f value)
      Unsafe version of currentState.
    • nchangedSinceLastSync

      public static void nchangedSinceLastSync(long struct, int value)
      Unsafe version of changedSinceLastSync.
    • nlastChangeTime

      public static void nlastChangeTime(long struct, long value)
      Unsafe version of lastChangeTime.
    • nisActive

      public static void nisActive(long struct, int value)
      Unsafe version of isActive.