Class XrFovf

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrFovf extends Struct<XrFovf> implements NativeResource

 struct XrFovf {
     float angleLeft;
     float angleRight;
     float angleUp;
     float angleDown;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ANGLELEFT
      The struct member offsets.
    • ANGLERIGHT

      public static final int ANGLERIGHT
      The struct member offsets.
    • ANGLEUP

      public static final int ANGLEUP
      The struct member offsets.
    • ANGLEDOWN

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

    • XrFovf

      public XrFovf(ByteBuffer container)
      Creates a XrFovf 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<XrFovf>
    • angleLeft

      public float angleLeft()
      Returns:
      the value of the angleLeft field.
    • angleRight

      public float angleRight()
      Returns:
      the value of the angleRight field.
    • angleUp

      public float angleUp()
      Returns:
      the value of the angleUp field.
    • angleDown

      public float angleDown()
      Returns:
      the value of the angleDown field.
    • angleLeft

      public XrFovf angleLeft(float value)
      Sets the specified value to the angleLeft field.
    • angleRight

      public XrFovf angleRight(float value)
      Sets the specified value to the angleRight field.
    • angleUp

      public XrFovf angleUp(float value)
      Sets the specified value to the angleUp field.
    • angleDown

      public XrFovf angleDown(float value)
      Sets the specified value to the angleDown field.
    • set

      public XrFovf set(float angleLeft, float angleRight, float angleUp, float angleDown)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static float nangleLeft(long struct)
      Unsafe version of angleLeft().
    • nangleRight

      public static float nangleRight(long struct)
      Unsafe version of angleRight().
    • nangleUp

      public static float nangleUp(long struct)
      Unsafe version of angleUp().
    • nangleDown

      public static float nangleDown(long struct)
      Unsafe version of angleDown().
    • nangleLeft

      public static void nangleLeft(long struct, float value)
      Unsafe version of angleLeft.
    • nangleRight

      public static void nangleRight(long struct, float value)
      Unsafe version of angleRight.
    • nangleUp

      public static void nangleUp(long struct, float value)
      Unsafe version of angleUp.
    • nangleDown

      public static void nangleDown(long struct, float value)
      Unsafe version of angleDown.