Class XrFrameState

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrFrameState extends Struct<XrFrameState> implements NativeResource

 struct XrFrameState {
     XrStructureType type;
     void * next;
     XrTime predictedDisplayTime;
     XrDuration predictedDisplayPeriod;
     XrBool32 shouldRender;
 }
  • 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.
    • PREDICTEDDISPLAYTIME

      public static final int PREDICTEDDISPLAYTIME
      The struct member offsets.
    • PREDICTEDDISPLAYPERIOD

      public static final int PREDICTEDDISPLAYPERIOD
      The struct member offsets.
    • SHOULDRENDER

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

    • XrFrameState

      public XrFrameState(ByteBuffer container)
      Creates a XrFrameState 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<XrFrameState>
    • type

      public int type()
      Returns:
      the value of the type field.
    • next

      public long next()
      Returns:
      the value of the next field.
    • predictedDisplayTime

      public long predictedDisplayTime()
      Returns:
      the value of the predictedDisplayTime field.
    • predictedDisplayPeriod

      public long predictedDisplayPeriod()
      Returns:
      the value of the predictedDisplayPeriod field.
    • shouldRender

      public boolean shouldRender()
      Returns:
      the value of the shouldRender field.
    • type

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

      public XrFrameState type$Default()
      Sets the TYPE_FRAME_STATE value to the type field.
    • next

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

      Prepends the specified XrSecondaryViewConfigurationFrameStateMSFT value to the next chain.
    • predictedDisplayTime

      public XrFrameState predictedDisplayTime(long value)
      Sets the specified value to the predictedDisplayTime field.
    • predictedDisplayPeriod

      public XrFrameState predictedDisplayPeriod(long value)
      Sets the specified value to the predictedDisplayPeriod field.
    • shouldRender

      public XrFrameState shouldRender(boolean value)
      Sets the specified value to the shouldRender field.
    • set

      public XrFrameState set(int type, long next, long predictedDisplayTime, long predictedDisplayPeriod, boolean shouldRender)
      Initializes this struct with the specified values.
    • set

      public XrFrameState set(XrFrameState src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrFrameState.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrFrameState.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().
    • npredictedDisplayTime

      public static long npredictedDisplayTime(long struct)
      Unsafe version of predictedDisplayTime().
    • npredictedDisplayPeriod

      public static long npredictedDisplayPeriod(long struct)
      Unsafe version of predictedDisplayPeriod().
    • nshouldRender

      public static int nshouldRender(long struct)
      Unsafe version of shouldRender().
    • 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.
    • npredictedDisplayTime

      public static void npredictedDisplayTime(long struct, long value)
      Unsafe version of predictedDisplayTime.
    • npredictedDisplayPeriod

      public static void npredictedDisplayPeriod(long struct, long value)
      Unsafe version of predictedDisplayPeriod.
    • nshouldRender

      public static void nshouldRender(long struct, int value)
      Unsafe version of shouldRender.