Class XrRaycastInfoANDROID

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrRaycastInfoANDROID extends Struct<XrRaycastInfoANDROID> implements NativeResource

 struct XrRaycastInfoANDROID {
     XrStructureType type;
     void const * next;
     uint32_t maxResults;
     uint32_t trackerCount;
     XrTrackableTrackerANDROID const * trackers;
     XrVector3f origin;
     XrVector3f trajectory;
     XrSpace space;
     XrTime time;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • MAXRESULTS

      public static final int MAXRESULTS
      The struct member offsets.
    • TRACKERCOUNT

      public static final int TRACKERCOUNT
      The struct member offsets.
    • TRACKERS

      public static final int TRACKERS
      The struct member offsets.
    • ORIGIN

      public static final int ORIGIN
      The struct member offsets.
    • TRAJECTORY

      public static final int TRAJECTORY
      The struct member offsets.
    • SPACE

      public static final int SPACE
      The struct member offsets.
    • TIME

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

    • XrRaycastInfoANDROID

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

      public int type()
      Returns:
      the value of the type field.
    • next

      public long next()
      Returns:
      the value of the next field.
    • maxResults

      public int maxResults()
      Returns:
      the value of the maxResults field.
    • trackerCount

      public int trackerCount()
      Returns:
      the value of the trackerCount field.
    • trackers

      public PointerBuffer trackers()
      Returns:
      a PointerBuffer view of the data pointed to by the trackers field.
    • origin

      public XrVector3f origin()
      Returns:
      a XrVector3f view of the origin field.
    • trajectory

      public XrVector3f trajectory()
      Returns:
      a XrVector3f view of the trajectory field.
    • space

      public long space()
      Returns:
      the value of the space field.
    • time

      public long time()
      Returns:
      the value of the time field.
    • type

      public XrRaycastInfoANDROID type(int value)
      Sets the specified value to the type field.
    • type$Default

      public XrRaycastInfoANDROID type$Default()
      Sets the TYPE_RAYCAST_INFO_ANDROID value to the type field.
    • next

      public XrRaycastInfoANDROID next(long value)
      Sets the specified value to the next field.
    • maxResults

      public XrRaycastInfoANDROID maxResults(int value)
      Sets the specified value to the maxResults field.
    • trackers

      public XrRaycastInfoANDROID trackers(PointerBuffer value)
      Sets the address of the specified PointerBuffer to the trackers field.
    • origin

      public XrRaycastInfoANDROID origin(XrVector3f value)
      Copies the specified XrVector3f to the origin field.
    • origin

      public XrRaycastInfoANDROID origin(Consumer<XrVector3f> consumer)
      Passes the origin field to the specified Consumer.
    • trajectory

      public XrRaycastInfoANDROID trajectory(XrVector3f value)
      Copies the specified XrVector3f to the trajectory field.
    • trajectory

      public XrRaycastInfoANDROID trajectory(Consumer<XrVector3f> consumer)
      Passes the trajectory field to the specified Consumer.
    • space

      public XrRaycastInfoANDROID space(XrSpace value)
      Sets the specified value to the space field.
    • time

      public XrRaycastInfoANDROID time(long value)
      Sets the specified value to the time field.
    • set

      public XrRaycastInfoANDROID set(int type, long next, int maxResults, PointerBuffer trackers, XrVector3f origin, XrVector3f trajectory, XrSpace space, long time)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • nmaxResults

      public static int nmaxResults(long struct)
      Unsafe version of maxResults().
    • ntrackerCount

      public static int ntrackerCount(long struct)
      Unsafe version of trackerCount().
    • ntrackers

      public static PointerBuffer ntrackers(long struct)
      Unsafe version of trackers.
    • norigin

      public static XrVector3f norigin(long struct)
      Unsafe version of origin().
    • ntrajectory

      public static XrVector3f ntrajectory(long struct)
      Unsafe version of trajectory().
    • nspace

      public static long nspace(long struct)
      Unsafe version of space().
    • ntime

      public static long ntime(long struct)
      Unsafe version of time().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • nmaxResults

      public static void nmaxResults(long struct, int value)
      Unsafe version of maxResults.
    • ntrackerCount

      public static void ntrackerCount(long struct, int value)
      Sets the specified value to the trackerCount field of the specified struct.
    • ntrackers

      public static void ntrackers(long struct, PointerBuffer value)
      Unsafe version of trackers.
    • norigin

      public static void norigin(long struct, XrVector3f value)
      Unsafe version of origin.
    • ntrajectory

      public static void ntrajectory(long struct, XrVector3f value)
      Unsafe version of trajectory.
    • nspace

      public static void nspace(long struct, XrSpace value)
      Unsafe version of space.
    • ntime

      public static void ntime(long struct, long value)
      Unsafe version of time.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate