Class XrFrustumf

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrFrustumf>
org.lwjgl.openxr.XrFrustumf
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
XrFrustumfKHR

public class XrFrustumf extends org.lwjgl.system.Struct<XrFrustumf> implements org.lwjgl.system.NativeResource
Describe a scene frustum.
Description

The runtime must return ERROR_VALIDATION_FAILURE if farZ is less than or equal to zero.

The runtime must return ERROR_VALIDATION_FAILURE if nearZ is less than zero.

See XrFovf for validity requirements on fov.

See Also

XrFovf, XrPosef

Layout


 struct XrFrustumf {
     XrPosef pose();
     XrFovf fov();
     float nearZ();
     float farZ();
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of XrFrustumf structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a XrFrustumf instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static XrFrustumf
    Returns a new XrFrustumf instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new XrFrustumf.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrFrustumf.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static XrFrustumf
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrFrustumf instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static XrFrustumf
    Returns a new XrFrustumf instance allocated with BufferUtils.
    create(int capacity)
    Returns a new XrFrustumf.Buffer instance allocated with BufferUtils.
    static XrFrustumf
    create(long address)
    Returns a new XrFrustumf instance for the specified memory address.
    create(long address, int capacity)
    Create a XrFrustumf.Buffer instance at the specified memory.
    static @Nullable XrFrustumf
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable XrFrustumf.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    float
    the positive distance of the far plane of the frustum bound along the -Z direction of the frustum space.
    farZ(float value)
    Sets the specified value to the farZ() field.
    fov()
    an XrFovf for the four sides of the frustum where angleLeft and angleRight are along the X axis and angleUp and angleDown are along the Y axis of the frustum space.
    fov(Consumer<XrFovf> consumer)
    Passes the fov() field to the specified Consumer.
    fov(XrFovf value)
    Copies the specified XrFovf to the fov() field.
    static XrFrustumf
    Returns a new XrFrustumf instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new XrFrustumf.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrFrustumf.Buffer instance allocated on the specified MemoryStack.
    static XrFrustumf
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrFrustumf instance allocated on the specified MemoryStack.
    float
    the positive distance of the near plane of the frustum bound along the -Z direction of the frustum space.
    nearZ(float value)
    Sets the specified value to the nearZ() field.
    static float
    nfarZ(long struct)
    Unsafe version of farZ().
    static void
    nfarZ(long struct, float value)
    Unsafe version of farZ.
    static XrFovf
    nfov(long struct)
    Unsafe version of fov().
    static void
    nfov(long struct, XrFovf value)
    Unsafe version of fov.
    static float
    nnearZ(long struct)
    Unsafe version of nearZ().
    static void
    nnearZ(long struct, float value)
    Unsafe version of nearZ.
    static XrPosef
    npose(long struct)
    Unsafe version of pose().
    static void
    npose(long struct, XrPosef value)
    Unsafe version of pose.
    an XrPosef defining the position and orientation of the tip of the frustum within the reference frame of the corresponding XrSpace.
    pose(Consumer<XrPosef> consumer)
    Passes the pose() field to the specified Consumer.
    pose(XrPosef value)
    Copies the specified XrPosef to the pose() field.
    Copies the specified struct data to this struct.
    set(XrPosef pose, XrFovf fov, float nearZ, float farZ)
    Initializes this struct with the specified values.
    int
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrFrustumf>
    • pose

      public XrPosef pose()
      an XrPosef defining the position and orientation of the tip of the frustum within the reference frame of the corresponding XrSpace.
    • fov

      public XrFovf fov()
      an XrFovf for the four sides of the frustum where angleLeft and angleRight are along the X axis and angleUp and angleDown are along the Y axis of the frustum space.
    • nearZ

      public float nearZ()
      the positive distance of the near plane of the frustum bound along the -Z direction of the frustum space.
    • farZ

      public float farZ()
      the positive distance of the far plane of the frustum bound along the -Z direction of the frustum space.
    • 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(org.lwjgl.system.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(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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.