Class XrSceneComponentMSFT

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrSceneComponentMSFT>
org.lwjgl.openxr.XrSceneComponentMSFT
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrSceneComponentMSFT extends org.lwjgl.system.Struct<XrSceneComponentMSFT> implements org.lwjgl.system.NativeResource
Scene component.
Description

The runtime must set parentId to either zero or a valid XrUuidMSFT that corresponds to a scene component of type SCENE_COMPONENT_TYPE_OBJECT_MSFT that exists in the XrSceneMSFT.

Note

The parent scene object is intended to allow scene components to be grouped. For example, the scene object for a wall might have multiple scene component children like SCENE_COMPONENT_TYPE_PLANE_MSFT, SCENE_COMPONENT_TYPE_VISUAL_MESH_MSFT, and SCENE_COMPONENT_TYPE_COLLIDER_MESH_MSFT. Those child scene components would be alternative representations of the same wall.

Valid Usage (Implicit)
See Also

XrSceneComponentsMSFT, XrUuidMSFT

Layout


 struct XrSceneComponentMSFT {
     XrSceneComponentTypeMSFT componentType();
     XrUuidMSFT id();
     XrUuidMSFT parentId();
     XrTime updateTime();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int COMPONENTTYPE
      The struct member offsets.
    • ID

      public static final int ID
      The struct member offsets.
    • PARENTID

      public static final int PARENTID
      The struct member offsets.
    • UPDATETIME

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

    • XrSceneComponentMSFT

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

      public int componentType()
      the XrSceneComponentTypeMSFT of the scene component.
    • id

      public XrUuidMSFT id()
      the XrUuidMSFT of the scene component.
    • parentId

      public XrUuidMSFT parentId()
      the XrUuidMSFT of the parent scene object. If the scene component does not have a parent, then parentId will be equal to zero.
    • updateTime

      public long updateTime()
      the XrTime that this scene component was last updated.
    • componentType

      public XrSceneComponentMSFT componentType(int value)
      Sets the specified value to the componentType() field.
    • id

      public XrSceneComponentMSFT id(XrUuidMSFT value)
      Copies the specified XrUuidMSFT to the id() field.
    • id

      public XrSceneComponentMSFT id(Consumer<XrUuidMSFT> consumer)
      Passes the id() field to the specified Consumer.
    • parentId

      public XrSceneComponentMSFT parentId(XrUuidMSFT value)
      Copies the specified XrUuidMSFT to the parentId() field.
    • parentId

      public XrSceneComponentMSFT parentId(Consumer<XrUuidMSFT> consumer)
      Passes the parentId() field to the specified Consumer.
    • updateTime

      public XrSceneComponentMSFT updateTime(long value)
      Sets the specified value to the updateTime() field.
    • set

      public XrSceneComponentMSFT set(int componentType, XrUuidMSFT id, XrUuidMSFT parentId, long updateTime)
      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 XrSceneComponentMSFT malloc()
      Returns a new XrSceneComponentMSFT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ncomponentType(long struct)
      Unsafe version of componentType().
    • nid

      public static XrUuidMSFT nid(long struct)
      Unsafe version of id().
    • nparentId

      public static XrUuidMSFT nparentId(long struct)
      Unsafe version of parentId().
    • nupdateTime

      public static long nupdateTime(long struct)
      Unsafe version of updateTime().
    • ncomponentType

      public static void ncomponentType(long struct, int value)
      Unsafe version of componentType.
    • nid

      public static void nid(long struct, XrUuidMSFT value)
      Unsafe version of id.
    • nparentId

      public static void nparentId(long struct, XrUuidMSFT value)
      Unsafe version of parentId.
    • nupdateTime

      public static void nupdateTime(long struct, long value)
      Unsafe version of updateTime.