Class XrSpherefKHR

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrSpherefKHR extends XrSpheref

 struct XrSpherefKHR {
     {@link XrPosef XrPosef} center;
     float radius;
 }
  • Constructor Details

    • XrSpherefKHR

      public XrSpherefKHR(ByteBuffer container)
      Creates a XrSpherefKHR 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

    • center

      public XrSpherefKHR center(XrPosef value)
      Copies the specified XrPosef to the center field.
      Overrides:
      center in class XrSpheref
    • center

      public XrSpherefKHR center(Consumer<XrPosef> consumer)
      Passes the center field to the specified Consumer.
      Overrides:
      center in class XrSpheref
    • radius

      public XrSpherefKHR radius(float value)
      Sets the specified value to the radius field.
      Overrides:
      radius in class XrSpheref
    • set

      public XrSpherefKHR set(XrPosef center, float radius)
      Initializes this struct with the specified values.
      Overrides:
      set in class XrSpheref
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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