Class XrActionStateFloat

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

public class XrActionStateFloat extends org.lwjgl.system.Struct<XrActionStateFloat> implements org.lwjgl.system.NativeResource
Floating point 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

GetActionStateFloat

Layout


 struct XrActionStateFloat {
     XrStructureType type();
     void * next();
     float 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

    • XrActionStateFloat

      public XrActionStateFloat(ByteBuffer container)
      Creates a XrActionStateFloat 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<XrActionStateFloat>
    • 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 float currentState()
      the current 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 XrActionStateFloat type(int value)
      Sets the specified value to the type() field.
    • type$Default

      public XrActionStateFloat type$Default()
      Sets the TYPE_ACTION_STATE_FLOAT value to the type() field.
    • next

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

      public XrActionStateFloat currentState(float value)
      Sets the specified value to the currentState() field.
    • changedSinceLastSync

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

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

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

      public XrActionStateFloat set(int type, long next, float 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 XrActionStateFloat malloc()
      Returns a new XrActionStateFloat instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrActionStateFloat.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrActionStateFloat.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 float 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, float 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.