Package org.lwjgl.openxr
Class XrSceneComponentMSFT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrSceneComponentMSFT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrSceneComponentMSFT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceScene component.Description
The runtime must set
parentIdto either zero or a validXrUuidMSFTthat corresponds to a scene component of typeSCENE_COMPONENT_TYPE_OBJECT_MSFTthat exists in theXrSceneMSFT.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, andSCENE_COMPONENT_TYPE_COLLIDER_MESH_MSFT. Those child scene components would be alternative representations of the same wall.Valid Usage (Implicit)
- The
XR_MSFT_scene_understandingextension must be enabled prior to usingXrSceneComponentMSFT componentTypemust be a validXrSceneComponentTypeMSFTvalue
See Also
XrSceneComponentsMSFT,XrUuidMSFTLayout
struct XrSceneComponentMSFT { XrSceneComponentTypeMSFTcomponentType();XrUuidMSFTid();XrUuidMSFTparentId(); XrTimeupdateTime(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrSceneComponentMSFT.BufferAn array ofXrSceneComponentMSFTstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCOMPONENTTYPE
ID
PARENTIDThe struct member offsets.static intSIZEOFThe struct size in bytes.static intUPDATETIMEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrSceneComponentMSFT(java.nio.ByteBuffer container)Creates aXrSceneComponentMSFTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrSceneComponentMSFTcalloc()Returns a newXrSceneComponentMSFTinstance allocated withmemCalloc.static XrSceneComponentMSFT.Buffercalloc(int capacity)Returns a newXrSceneComponentMSFT.Bufferinstance allocated withmemCalloc.static XrSceneComponentMSFT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrSceneComponentMSFT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrSceneComponentMSFTcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrSceneComponentMSFTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcomponentType()theXrSceneComponentTypeMSFTof the scene component.XrSceneComponentMSFTcomponentType(int value)Sets the specified value to thecomponentType()field.static XrSceneComponentMSFTcreate()Returns a newXrSceneComponentMSFTinstance allocated withBufferUtils.static XrSceneComponentMSFT.Buffercreate(int capacity)Returns a newXrSceneComponentMSFT.Bufferinstance allocated withBufferUtils.static XrSceneComponentMSFTcreate(long address)Returns a newXrSceneComponentMSFTinstance for the specified memory address.static XrSceneComponentMSFT.Buffercreate(long address, int capacity)Create aXrSceneComponentMSFT.Bufferinstance at the specified memory.static XrSceneComponentMSFTcreateSafe(long address)static XrSceneComponentMSFT.BuffercreateSafe(long address, int capacity)XrUuidMSFTid()theXrUuidMSFTof the scene component.XrSceneComponentMSFTid(java.util.function.Consumer<XrUuidMSFT> consumer)Passes theid()field to the specifiedConsumer.XrSceneComponentMSFTid(XrUuidMSFT value)Copies the specifiedXrUuidMSFTto theid()field.static XrSceneComponentMSFTmalloc()Returns a newXrSceneComponentMSFTinstance allocated withmemAlloc.static XrSceneComponentMSFT.Buffermalloc(int capacity)Returns a newXrSceneComponentMSFT.Bufferinstance allocated withmemAlloc.static XrSceneComponentMSFT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrSceneComponentMSFT.Bufferinstance allocated on the specifiedMemoryStack.static XrSceneComponentMSFTmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrSceneComponentMSFTinstance allocated on the specifiedMemoryStack.static intncomponentType(long struct)Unsafe version ofcomponentType().static voidncomponentType(long struct, int value)Unsafe version ofcomponentType.static XrUuidMSFTnid(long struct)Unsafe version ofid().static voidnid(long struct, XrUuidMSFT value)Unsafe version ofid.static XrUuidMSFTnparentId(long struct)Unsafe version ofparentId().static voidnparentId(long struct, XrUuidMSFT value)Unsafe version ofparentId.static longnupdateTime(long struct)Unsafe version ofupdateTime().static voidnupdateTime(long struct, long value)Unsafe version ofupdateTime.XrUuidMSFTparentId()theXrUuidMSFTof the parent scene object.XrSceneComponentMSFTparentId(java.util.function.Consumer<XrUuidMSFT> consumer)Passes theparentId()field to the specifiedConsumer.XrSceneComponentMSFTparentId(XrUuidMSFT value)Copies the specifiedXrUuidMSFTto theparentId()field.XrSceneComponentMSFTset(int componentType, XrUuidMSFT id, XrUuidMSFT parentId, long updateTime)Initializes this struct with the specified values.XrSceneComponentMSFTset(XrSceneComponentMSFT src)Copies the specified struct data to this struct.intsizeof()longupdateTime()theXrTimethat this scene component was last updated.XrSceneComponentMSFTupdateTime(long value)Sets the specified value to theupdateTime()field.
-
-
-
Constructor Detail
-
XrSceneComponentMSFT
public XrSceneComponentMSFT(java.nio.ByteBuffer container)
Creates aXrSceneComponentMSFTinstance at the current position of the specifiedByteBuffercontainer. 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
componentType
public int componentType()
theXrSceneComponentTypeMSFTof the scene component.
-
id
public XrUuidMSFT id()
theXrUuidMSFTof the scene component.
-
parentId
public XrUuidMSFT parentId()
theXrUuidMSFTof the parent scene object. If the scene component does not have a parent, thenparentIdwill be equal to zero.
-
updateTime
public long updateTime()
theXrTimethat this scene component was last updated.
-
componentType
public XrSceneComponentMSFT componentType(int value)
Sets the specified value to thecomponentType()field.
-
id
public XrSceneComponentMSFT id(XrUuidMSFT value)
Copies the specifiedXrUuidMSFTto theid()field.
-
id
public XrSceneComponentMSFT id(java.util.function.Consumer<XrUuidMSFT> consumer)
Passes theid()field to the specifiedConsumer.
-
parentId
public XrSceneComponentMSFT parentId(XrUuidMSFT value)
Copies the specifiedXrUuidMSFTto theparentId()field.
-
parentId
public XrSceneComponentMSFT parentId(java.util.function.Consumer<XrUuidMSFT> consumer)
Passes theparentId()field to the specifiedConsumer.
-
updateTime
public XrSceneComponentMSFT updateTime(long value)
Sets the specified value to theupdateTime()field.
-
set
public XrSceneComponentMSFT set(int componentType, XrUuidMSFT id, XrUuidMSFT parentId, long updateTime)
Initializes this struct with the specified values.
-
set
public XrSceneComponentMSFT set(XrSceneComponentMSFT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrSceneComponentMSFT malloc()
Returns a newXrSceneComponentMSFTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrSceneComponentMSFT calloc()
Returns a newXrSceneComponentMSFTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrSceneComponentMSFT create()
Returns a newXrSceneComponentMSFTinstance allocated withBufferUtils.
-
create
public static XrSceneComponentMSFT create(long address)
Returns a newXrSceneComponentMSFTinstance for the specified memory address.
-
createSafe
@Nullable public static XrSceneComponentMSFT createSafe(long address)
-
malloc
public static XrSceneComponentMSFT.Buffer malloc(int capacity)
Returns a newXrSceneComponentMSFT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrSceneComponentMSFT.Buffer calloc(int capacity)
Returns a newXrSceneComponentMSFT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrSceneComponentMSFT.Buffer create(int capacity)
Returns a newXrSceneComponentMSFT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrSceneComponentMSFT.Buffer create(long address, int capacity)
Create aXrSceneComponentMSFT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrSceneComponentMSFT.Buffer createSafe(long address, int capacity)
-
malloc
public static XrSceneComponentMSFT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrSceneComponentMSFTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrSceneComponentMSFT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrSceneComponentMSFTinstance allocated on the specifiedMemoryStackand 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 newXrSceneComponentMSFT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrSceneComponentMSFT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrSceneComponentMSFT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ncomponentType
public static int ncomponentType(long struct)
Unsafe version ofcomponentType().
-
nid
public static XrUuidMSFT nid(long struct)
Unsafe version ofid().
-
nparentId
public static XrUuidMSFT nparentId(long struct)
Unsafe version ofparentId().
-
nupdateTime
public static long nupdateTime(long struct)
Unsafe version ofupdateTime().
-
ncomponentType
public static void ncomponentType(long struct, int value)Unsafe version ofcomponentType.
-
nid
public static void nid(long struct, XrUuidMSFT value)Unsafe version ofid.
-
nparentId
public static void nparentId(long struct, XrUuidMSFT value)Unsafe version ofparentId.
-
nupdateTime
public static void nupdateTime(long struct, long value)Unsafe version ofupdateTime.
-
-