Class XrSpheref

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

public class XrSpheref extends org.lwjgl.system.Struct<XrSpheref> implements org.lwjgl.system.NativeResource
Describe a sphere bounds.
Description

The runtime must return ERROR_VALIDATION_FAILURE if radius is not a finite positive value.

See Also

XrPosef

Layout


 struct XrSpheref {
     XrPosef center();
     float radius();
 }
  • Nested Class Summary

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

    Modifier and Type
    Method
    Description
    static XrSpheref
    Returns a new XrSpheref instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new XrSpheref.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrSpheref.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static XrSpheref
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrSpheref instance allocated on the specified MemoryStack and initializes all its bits to zero.
    an XrPosef representing the pose of the center of the sphere 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 XrSpheref
    Returns a new XrSpheref instance allocated with BufferUtils.
    create(int capacity)
    Returns a new XrSpheref.Buffer instance allocated with BufferUtils.
    static XrSpheref
    create(long address)
    Returns a new XrSpheref instance for the specified memory address.
    create(long address, int capacity)
    Create a XrSpheref.Buffer instance at the specified memory.
    static @Nullable XrSpheref
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable XrSpheref.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    static XrSpheref
    Returns a new XrSpheref instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new XrSpheref.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrSpheref.Buffer instance allocated on the specified MemoryStack.
    static XrSpheref
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrSpheref 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.
    static float
    nradius(long struct)
    Unsafe version of radius().
    static void
    nradius(long struct, float value)
    Unsafe version of radius.
    float
    the finite non-negative radius of the sphere.
    radius(float value)
    Sets the specified value to the radius() field.
    set(XrPosef center, float radius)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    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.
    • RADIUS

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

    • XrSpheref

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

      public XrPosef center()
      an XrPosef representing the pose of the center of the sphere within the reference frame of the corresponding XrSpace.
    • radius

      public float radius()
      the finite non-negative radius of the sphere.
    • center

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

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

      public XrSpheref radius(float value)
      Sets the specified value to the radius() field.
    • set

      public XrSpheref set(XrPosef center, float radius)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static float nradius(long struct)
      Unsafe version of radius().
    • ncenter

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

      public static void nradius(long struct, float value)
      Unsafe version of radius.