Class XrBoxf

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

public class XrBoxf extends org.lwjgl.system.Struct<XrBoxf> implements org.lwjgl.system.NativeResource
Describe a scene oriented box.
Description

The runtime must return ERROR_VALIDATION_FAILURE if width, height or depth values are negative.

See Also

XrExtent3Df, XrPosef

Layout


 struct XrBoxf {
     XrPosef center();
     XrExtent3Df extents();
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of XrBoxf 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 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
    XrBoxf(ByteBuffer container)
    Creates a XrBoxf instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static XrBoxf
    Returns a new XrBoxf instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new XrBoxf.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrBoxf.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static XrBoxf
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrBoxf instance allocated on the specified MemoryStack and initializes all its bits to zero.
    an XrPosef defining the center position and orientation of the oriented bounding box bound within the reference frame of the corresponding XrSpace.
    center(Consumer<XrPosef> consumer)
    Passes the center() field to the specified Consumer.
    center(XrPosef value)
    Copies the specified XrPosef to the center() field.
    static XrBoxf
    Returns a new XrBoxf instance allocated with BufferUtils.
    create(int capacity)
    Returns a new XrBoxf.Buffer instance allocated with BufferUtils.
    static XrBoxf
    create(long address)
    Returns a new XrBoxf instance for the specified memory address.
    create(long address, int capacity)
    Create a XrBoxf.Buffer instance at the specified memory.
    static @Nullable XrBoxf
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable XrBoxf.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    an XrExtent3Df defining the edge-to-edge length of the box along each dimension with center as the center.
    Passes the extents() field to the specified Consumer.
    Copies the specified XrExtent3Df to the extents() field.
    static XrBoxf
    Returns a new XrBoxf instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new XrBoxf.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrBoxf.Buffer instance allocated on the specified MemoryStack.
    static XrBoxf
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrBoxf instance allocated on the specified MemoryStack.
    static XrPosef
    ncenter(long struct)
    Unsafe version of center().
    static void
    ncenter(long struct, XrPosef value)
    Unsafe version of center.
    nextents(long struct)
    Unsafe version of extents().
    static void
    nextents(long struct, XrExtent3Df value)
    Unsafe version of extents.
    set(XrBoxf src)
    Copies the specified struct data to this struct.
    set(XrPosef center, XrExtent3Df extents)
    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.
    • CENTER

      public static final int CENTER
      The struct member offsets.
    • EXTENTS

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

    • XrBoxf

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

      public XrPosef center()
      an XrPosef defining the center position and orientation of the oriented bounding box bound within the reference frame of the corresponding XrSpace.
    • extents

      public XrExtent3Df extents()
      an XrExtent3Df defining the edge-to-edge length of the box along each dimension with center as the center.
    • center

      public XrBoxf center(XrPosef value)
      Copies the specified XrPosef to the center() field.
    • center

      public XrBoxf center(Consumer<XrPosef> consumer)
      Passes the center() field to the specified Consumer.
    • extents

      public XrBoxf extents(XrExtent3Df value)
      Copies the specified XrExtent3Df to the extents() field.
    • extents

      public XrBoxf extents(Consumer<XrExtent3Df> consumer)
      Passes the extents() field to the specified Consumer.
    • set

      public XrBoxf set(XrPosef center, XrExtent3Df extents)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrPosef ncenter(long struct)
      Unsafe version of center().
    • nextents

      public static XrExtent3Df nextents(long struct)
      Unsafe version of extents().
    • ncenter

      public static void ncenter(long struct, XrPosef value)
      Unsafe version of center.
    • nextents

      public static void nextents(long struct, XrExtent3Df value)
      Unsafe version of extents.