Class XrFrustumf

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
Direct Known Subclasses:
XrFrustumfKHR

public class XrFrustumf extends Struct<XrFrustumf> implements NativeResource

 struct XrFrustumf {
     {@link XrPosef XrPosef} pose;
     {@link XrFovf XrFovf} fov;
     float nearZ;
     float farZ;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int POSE
      The struct member offsets.
    • FOV

      public static final int FOV
      The struct member offsets.
    • NEARZ

      public static final int NEARZ
      The struct member offsets.
    • FARZ

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

    • XrFrustumf

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

      public XrPosef pose()
      Returns:
      a XrPosef view of the pose field.
    • fov

      public XrFovf fov()
      Returns:
      a XrFovf view of the fov field.
    • nearZ

      public float nearZ()
      Returns:
      the value of the nearZ field.
    • farZ

      public float farZ()
      Returns:
      the value of the farZ field.
    • pose

      public XrFrustumf pose(XrPosef value)
      Copies the specified XrPosef to the pose field.
    • pose

      public XrFrustumf pose(Consumer<XrPosef> consumer)
      Passes the pose field to the specified Consumer.
    • fov

      public XrFrustumf fov(XrFovf value)
      Copies the specified XrFovf to the fov field.
    • fov

      public XrFrustumf fov(Consumer<XrFovf> consumer)
      Passes the fov field to the specified Consumer.
    • nearZ

      public XrFrustumf nearZ(float value)
      Sets the specified value to the nearZ field.
    • farZ

      public XrFrustumf farZ(float value)
      Sets the specified value to the farZ field.
    • set

      public XrFrustumf set(XrPosef pose, XrFovf fov, float nearZ, float farZ)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrPosef npose(long struct)
      Unsafe version of pose().
    • nfov

      public static XrFovf nfov(long struct)
      Unsafe version of fov().
    • nnearZ

      public static float nnearZ(long struct)
      Unsafe version of nearZ().
    • nfarZ

      public static float nfarZ(long struct)
      Unsafe version of farZ().
    • npose

      public static void npose(long struct, XrPosef value)
      Unsafe version of pose.
    • nfov

      public static void nfov(long struct, XrFovf value)
      Unsafe version of fov.
    • nnearZ

      public static void nnearZ(long struct, float value)
      Unsafe version of nearZ.
    • nfarZ

      public static void nfarZ(long struct, float value)
      Unsafe version of farZ.