Class XrScenePlaneMSFT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
The size of a plane refers to the plane’s size in the x-y plane of the plane’s coordinate system. A plane with a position of {0,0,0}, rotation of {0,0,0,1} (no rotation), and an extent of {1,1} refers to a 1 meter x 1 meter plane centered at {0,0,0} with its front face normal vector pointing towards the +Z direction in the plane component’s space. For planes with an alignment of SCENE_PLANE_ALIGNMENT_TYPE_VERTICAL_MSFT, the +Y direction must point up away from the direction of gravity.
Note
OpenXR uses an X-Y plane with +Z as the plane normal but other APIs may use an X-Z plane with +Y as the plane normal. The X-Y plane can be converted to an X-Z plane by rotating -π/2 radians around the +X axis.
Valid Usage (Implicit)
- The
XR_MSFT_scene_understandingextension must be enabled prior to usingXrScenePlaneMSFT alignmentmust be a validXrScenePlaneAlignmentTypeMSFTvalue
See Also
XrExtent2Df, XrScenePlanesMSFT
Layout
struct XrScenePlaneMSFT {
XrScenePlaneAlignmentTypeMSFT alignment();
XrExtent2Df size();
uint64_t meshBufferId();
XrBool32 supportsIndicesUint16();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXrScenePlaneMSFT(ByteBuffer container) Creates aXrScenePlaneMSFTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintthe alignment type of the plane specified byXrScenePlaneAlignmentTypeMSFT.alignment(int value) Sets the specified value to thealignment()field.static XrScenePlaneMSFTcalloc()Returns a newXrScenePlaneMSFTinstance allocated withmemCalloc.static XrScenePlaneMSFT.Buffercalloc(int capacity) Returns a newXrScenePlaneMSFT.Bufferinstance allocated withmemCalloc.static XrScenePlaneMSFT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrScenePlaneMSFT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrScenePlaneMSFTcalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrScenePlaneMSFTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrScenePlaneMSFTcreate()Returns a newXrScenePlaneMSFTinstance allocated withBufferUtils.static XrScenePlaneMSFT.Buffercreate(int capacity) Returns a newXrScenePlaneMSFT.Bufferinstance allocated withBufferUtils.static XrScenePlaneMSFTcreate(long address) Returns a newXrScenePlaneMSFTinstance for the specified memory address.static XrScenePlaneMSFT.Buffercreate(long address, int capacity) Create aXrScenePlaneMSFT.Bufferinstance at the specified memory.static @Nullable XrScenePlaneMSFTcreateSafe(long address) static @Nullable XrScenePlaneMSFT.BuffercreateSafe(long address, int capacity) static XrScenePlaneMSFTmalloc()Returns a newXrScenePlaneMSFTinstance allocated withmemAlloc.static XrScenePlaneMSFT.Buffermalloc(int capacity) Returns a newXrScenePlaneMSFT.Bufferinstance allocated withmemAlloc.static XrScenePlaneMSFT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrScenePlaneMSFT.Bufferinstance allocated on the specifiedMemoryStack.static XrScenePlaneMSFTmalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrScenePlaneMSFTinstance allocated on the specifiedMemoryStack.longtheuint64_tidentifier that specifies the scene mesh buffer of this plane’s triangle mesh.meshBufferId(long value) Sets the specified value to themeshBufferId()field.static intnalignment(long struct) Unsafe version ofalignment().static voidnalignment(long struct, int value) Unsafe version ofalignment.static longnmeshBufferId(long struct) Unsafe version ofmeshBufferId().static voidnmeshBufferId(long struct, long value) Unsafe version ofmeshBufferId.static XrExtent2Dfnsize(long struct) Unsafe version ofsize().static voidnsize(long struct, XrExtent2Df value) Unsafe version ofsize.static intnsupportsIndicesUint16(long struct) Unsafe version ofsupportsIndicesUint16().static voidnsupportsIndicesUint16(long struct, int value) Unsafe version ofsupportsIndicesUint16.set(int alignment, XrExtent2Df size, long meshBufferId, boolean supportsIndicesUint16) Initializes this struct with the specified values.set(XrScenePlaneMSFT src) Copies the specified struct data to this struct.size()the 2D size of the plane’s extent, whereXrExtent2Df::widthis the width of the plane along the X axis, andXrExtent2Df::heightis the height of the plane along the Y axis.size(Consumer<XrExtent2Df> consumer) size(XrExtent2Df value) Copies the specifiedXrExtent2Dfto thesize()field.intsizeof()booleanTRUEif the mesh supports reading 16-bit unsigned indices.supportsIndicesUint16(boolean value) Sets the specified value to thesupportsIndicesUint16()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
ALIGNMENT
public static final int ALIGNMENTThe struct member offsets. -
SIZE
public static final int SIZEThe struct member offsets. -
MESHBUFFERID
public static final int MESHBUFFERIDThe struct member offsets. -
SUPPORTSINDICESUINT16
public static final int SUPPORTSINDICESUINT16The struct member offsets.
-
-
Constructor Details
-
XrScenePlaneMSFT
Creates aXrScenePlaneMSFTinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<XrScenePlaneMSFT>
-
alignment
public int alignment()the alignment type of the plane specified byXrScenePlaneAlignmentTypeMSFT. -
size
the 2D size of the plane’s extent, whereXrExtent2Df::widthis the width of the plane along the X axis, andXrExtent2Df::heightis the height of the plane along the Y axis. -
meshBufferId
public long meshBufferId()theuint64_tidentifier that specifies the scene mesh buffer of this plane’s triangle mesh. IfmeshBufferIdis zero then this plane does not have a mesh. The triangles in a planar mesh are coplanar. -
supportsIndicesUint16
public boolean supportsIndicesUint16()TRUEif the mesh supports reading 16-bit unsigned indices. -
alignment
Sets the specified value to thealignment()field. -
size
Copies the specifiedXrExtent2Dfto thesize()field. -
size
-
meshBufferId
Sets the specified value to themeshBufferId()field. -
supportsIndicesUint16
Sets the specified value to thesupportsIndicesUint16()field. -
set
public XrScenePlaneMSFT set(int alignment, XrExtent2Df size, long meshBufferId, boolean supportsIndicesUint16) 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
Returns a newXrScenePlaneMSFTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrScenePlaneMSFTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrScenePlaneMSFTinstance allocated withBufferUtils. -
create
Returns a newXrScenePlaneMSFTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrScenePlaneMSFT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrScenePlaneMSFT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrScenePlaneMSFT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrScenePlaneMSFT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrScenePlaneMSFTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrScenePlaneMSFTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newXrScenePlaneMSFT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newXrScenePlaneMSFT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nalignment
public static int nalignment(long struct) Unsafe version ofalignment(). -
nsize
Unsafe version ofsize(). -
nmeshBufferId
public static long nmeshBufferId(long struct) Unsafe version ofmeshBufferId(). -
nsupportsIndicesUint16
public static int nsupportsIndicesUint16(long struct) Unsafe version ofsupportsIndicesUint16(). -
nalignment
public static void nalignment(long struct, int value) Unsafe version ofalignment. -
nsize
Unsafe version ofsize. -
nmeshBufferId
public static void nmeshBufferId(long struct, long value) Unsafe version ofmeshBufferId. -
nsupportsIndicesUint16
public static void nsupportsIndicesUint16(long struct, int value) Unsafe version ofsupportsIndicesUint16.
-