Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrScenePlaneMSFT

extends Struct<XrScenePlaneMSFT>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Scene plane.
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)
See Also

XrExtent2Df, XrScenePlanesMSFT

Layout


struct XrScenePlaneMSFT {
    XrScenePlaneAlignmentTypeMSFT alignment;
    XrExtent2Df size;
    uint64_t meshBufferId;
    XrBool32 supportsIndicesUint16;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNMENT

The struct member offsets.

public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
MESHBUFFERID

The struct member offsets.

public static final int
SIZE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
SUPPORTSINDICESUINT16

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
XrScenePlaneMSFT(long address, ByteBuffer container)

public
XrScenePlaneMSFT(ByteBuffer container)

Creates a XrScenePlaneMSFT instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public int
alignment()

the alignment type of the plane specified by XrScenePlaneAlignmentTypeMSFT.

public XrScenePlaneMSFT
alignment(int value)

Sets the specified value to the alignment field.

public static XrScenePlaneMSFT
calloc()

Returns a new XrScenePlaneMSFT instance allocated with memCalloc.

public static XrScenePlaneMSFT.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new XrScenePlaneMSFT.Buffer instance allocated with memCalloc.

public static XrScenePlaneMSFT
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrScenePlaneMSFT instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static XrScenePlaneMSFT.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrScenePlaneMSFT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected XrScenePlaneMSFT
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static XrScenePlaneMSFT
create()

Returns a new XrScenePlaneMSFT instance allocated with BufferUtils.

public static XrScenePlaneMSFT
create(long address)

Returns a new XrScenePlaneMSFT instance for the specified memory address.

public static XrScenePlaneMSFT.Buffer
create(int
the buffer capacity
capacity
)

Returns a new XrScenePlaneMSFT.Buffer instance allocated with BufferUtils.

public static XrScenePlaneMSFT.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a XrScenePlaneMSFT.Buffer instance at the specified memory.

public static XrScenePlaneMSFT
createSafe(long address)

Like create, but returns null if address is NULL.

public static XrScenePlaneMSFT.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static XrScenePlaneMSFT
malloc()

Returns a new XrScenePlaneMSFT instance allocated with memAlloc.

public static XrScenePlaneMSFT.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new XrScenePlaneMSFT.Buffer instance allocated with memAlloc.

public static XrScenePlaneMSFT
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrScenePlaneMSFT instance allocated on the specified MemoryStack.

public static XrScenePlaneMSFT.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrScenePlaneMSFT.Buffer instance allocated on the specified MemoryStack.

public long
meshBufferId()

the uint64_t identifier that specifies the scene mesh buffer of this plane’s triangle mesh.

public XrScenePlaneMSFT
meshBufferId(long value)

Sets the specified value to the meshBufferId field.

public static int
nalignment(long struct)

Unsafe version of alignment.

public static void
nalignment(long struct, int value)

Unsafe version of alignment.

public static long
nmeshBufferId(long struct)

Unsafe version of meshBufferId.

public static void
nmeshBufferId(long struct, long value)

Unsafe version of meshBufferId.

public static XrExtent2Df
nsize(long struct)

Unsafe version of size.

public static void
nsize(long struct, XrExtent2Df value)

Unsafe version of size.

public static int
nsupportsIndicesUint16(long struct)

Unsafe version of supportsIndicesUint16.

public static void
nsupportsIndicesUint16(long struct, int value)

Unsafe version of supportsIndicesUint16.

public XrScenePlaneMSFT
set(int alignment, XrExtent2Df size, long meshBufferId, boolean supportsIndicesUint16)

Initializes this struct with the specified values.

public XrScenePlaneMSFT

Returns:

this struct
set
(XrScenePlaneMSFT
the source struct
src
)

Copies the specified struct data to this struct.

public XrExtent2Df
size()

the 2D size of the plane’s extent, where size::width is the width of the plane along the X axis, and size::height is the height of the plane along the Y axis.

public XrScenePlaneMSFT
size(XrExtent2Df value)

Copies the specified XrExtent2Df to the size field.

public XrScenePlaneMSFT
size(Consumer<XrExtent2Df> consumer)

Passes the size field to the specified Consumer.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public boolean
supportsIndicesUint16()

TRUE if the mesh supports reading 16-bit unsigned indices.

public XrScenePlaneMSFT
supportsIndicesUint16(boolean value)

Sets the specified value to the supportsIndicesUint16 field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNMENTback to summary
public static final int ALIGNMENT

The struct member offsets.

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

MESHBUFFERIDback to summary
public static final int MESHBUFFERID

The struct member offsets.

SIZEback to summary
public static final int SIZE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

SUPPORTSINDICESUINT16back to summary
public static final int SUPPORTSINDICESUINT16

The struct member offsets.

Constructor Detail

XrScenePlaneMSFTback to summary
protected XrScenePlaneMSFT(long address, ByteBuffer container)
XrScenePlaneMSFTback to summary
public XrScenePlaneMSFT(ByteBuffer container)

Creates a XrScenePlaneMSFT 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 Detail

alignmentback to summary
public int alignment()

the alignment type of the plane specified by XrScenePlaneAlignmentTypeMSFT.

Annotations
@NativeType:XrScenePlaneAlignmentTypeMSFT
alignmentback to summary
public XrScenePlaneMSFT alignment(int value)

Sets the specified value to the alignment field.

callocback to summary
public static XrScenePlaneMSFT calloc()

Returns a new XrScenePlaneMSFT instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static XrScenePlaneMSFT.Buffer calloc(int capacity)

Returns a new XrScenePlaneMSFT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static XrScenePlaneMSFT calloc(MemoryStack stack)

Returns a new XrScenePlaneMSFT instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static XrScenePlaneMSFT.Buffer calloc(int capacity, MemoryStack stack)

Returns a new XrScenePlaneMSFT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected XrScenePlaneMSFT create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static XrScenePlaneMSFT create()

Returns a new XrScenePlaneMSFT instance allocated with BufferUtils.

createback to summary
public static XrScenePlaneMSFT create(long address)

Returns a new XrScenePlaneMSFT instance for the specified memory address.

createback to summary
public static XrScenePlaneMSFT.Buffer create(int capacity)

Returns a new XrScenePlaneMSFT.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static XrScenePlaneMSFT.Buffer create(long address, int capacity)

Create a XrScenePlaneMSFT.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static XrScenePlaneMSFT createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static XrScenePlaneMSFT.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static XrScenePlaneMSFT malloc()

Returns a new XrScenePlaneMSFT instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static XrScenePlaneMSFT.Buffer malloc(int capacity)

Returns a new XrScenePlaneMSFT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static XrScenePlaneMSFT malloc(MemoryStack stack)

Returns a new XrScenePlaneMSFT instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static XrScenePlaneMSFT.Buffer malloc(int capacity, MemoryStack stack)

Returns a new XrScenePlaneMSFT.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

meshBufferIdback to summary
public long meshBufferId()

the uint64_t identifier that specifies the scene mesh buffer of this plane’s triangle mesh. If meshBufferId is zero then this plane does not have a mesh. The triangles in a planar mesh are coplanar.

Annotations
@NativeType:uint64_t
meshBufferIdback to summary
public XrScenePlaneMSFT meshBufferId(long value)

Sets the specified value to the meshBufferId field.

nalignmentback to summary
public static int nalignment(long struct)

Unsafe version of alignment.

nalignmentback to summary
public static void nalignment(long struct, int value)

Unsafe version of alignment.

nmeshBufferIdback to summary
public static long nmeshBufferId(long struct)

Unsafe version of meshBufferId.

nmeshBufferIdback to summary
public static void nmeshBufferId(long struct, long value)

Unsafe version of meshBufferId.

nsizeback to summary
public static XrExtent2Df nsize(long struct)

Unsafe version of size.

nsizeback to summary
public static void nsize(long struct, XrExtent2Df value)

Unsafe version of size.

nsupportsIndicesUint16back to summary
public static int nsupportsIndicesUint16(long struct)

Unsafe version of supportsIndicesUint16.

nsupportsIndicesUint16back to summary
public static void nsupportsIndicesUint16(long struct, int value)

Unsafe version of supportsIndicesUint16.

setback to summary
public XrScenePlaneMSFT set(int alignment, XrExtent2Df size, long meshBufferId, boolean supportsIndicesUint16)

Initializes this struct with the specified values.

setback to summary
public XrScenePlaneMSFT set(XrScenePlaneMSFT src)

Copies the specified struct data to this struct.

Parameters
src:XrScenePlaneMSFT

the source struct

Returns:XrScenePlaneMSFT

this struct

sizeback to summary
public XrExtent2Df size()

the 2D size of the plane’s extent, where size::width is the width of the plane along the X axis, and size::height is the height of the plane along the Y axis.

sizeback to summary
public XrScenePlaneMSFT size(XrExtent2Df value)

Copies the specified XrExtent2Df to the size field.

sizeback to summary
public XrScenePlaneMSFT size(Consumer<XrExtent2Df> consumer)

Passes the size field to the specified Consumer.

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
supportsIndicesUint16back to summary
public boolean supportsIndicesUint16()

TRUE if the mesh supports reading 16-bit unsigned indices.

Annotations
@NativeType:XrBool32
supportsIndicesUint16back to summary
public XrScenePlaneMSFT supportsIndicesUint16(boolean value)

Sets the specified value to the supportsIndicesUint16 field.

org.lwjgl.openxr back to summary

public Class XrScenePlaneMSFT.Buffer

extends StructBuffer<XrScenePlaneMSFT, XrScenePlaneMSFT.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of XrScenePlaneMSFT structs.

Field Summary

Modifier and TypeField and Description
private static final XrScenePlaneMSFT

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new XrScenePlaneMSFT.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the XrScenePlaneMSFT#alignment field.
alignment
()

public XrScenePlaneMSFT.Buffer
alignment(int value)

Sets the specified value to the XrScenePlaneMSFT#alignment field.

protected XrScenePlaneMSFT
public long

Returns:

the value of the XrScenePlaneMSFT#meshBufferId field.
meshBufferId
()

public XrScenePlaneMSFT.Buffer
meshBufferId(long value)

Sets the specified value to the XrScenePlaneMSFT#meshBufferId field.

protected XrScenePlaneMSFT.Buffer
public XrExtent2Df

Returns:

a XrExtent2Df view of the XrScenePlaneMSFT#size field.
size
()

public XrScenePlaneMSFT.Buffer
size(XrExtent2Df value)

Copies the specified XrExtent2Df to the XrScenePlaneMSFT#size field.

public XrScenePlaneMSFT.Buffer
size(Consumer<XrExtent2Df> consumer)

Passes the XrScenePlaneMSFT#size field to the specified Consumer.

public boolean
public XrScenePlaneMSFT.Buffer
supportsIndicesUint16(boolean value)

Sets the specified value to the XrScenePlaneMSFT#supportsIndicesUint16 field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final XrScenePlaneMSFT ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new XrScenePlaneMSFT.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by XrScenePlaneMSFT#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

alignmentback to summary
public int alignment()
Returns:int

the value of the XrScenePlaneMSFT#alignment field.

Annotations
@NativeType:XrScenePlaneAlignmentTypeMSFT
alignmentback to summary
public XrScenePlaneMSFT.Buffer alignment(int value)

Sets the specified value to the XrScenePlaneMSFT#alignment field.

getElementFactoryback to summary
protected XrScenePlaneMSFT getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
meshBufferIdback to summary
public long meshBufferId()
Returns:long

the value of the XrScenePlaneMSFT#meshBufferId field.

Annotations
@NativeType:uint64_t
meshBufferIdback to summary
public XrScenePlaneMSFT.Buffer meshBufferId(long value)

Sets the specified value to the XrScenePlaneMSFT#meshBufferId field.

selfback to summary
protected XrScenePlaneMSFT.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
sizeback to summary
public XrExtent2Df size()
Returns:XrExtent2Df

a XrExtent2Df view of the XrScenePlaneMSFT#size field.

sizeback to summary
public XrScenePlaneMSFT.Buffer size(XrExtent2Df value)

Copies the specified XrExtent2Df to the XrScenePlaneMSFT#size field.

sizeback to summary
public XrScenePlaneMSFT.Buffer size(Consumer<XrExtent2Df> consumer)

Passes the XrScenePlaneMSFT#size field to the specified Consumer.

supportsIndicesUint16back to summary
public boolean supportsIndicesUint16()
Returns:boolean

the value of the XrScenePlaneMSFT#supportsIndicesUint16 field.

Annotations
@NativeType:XrBool32
supportsIndicesUint16back to summary
public XrScenePlaneMSFT.Buffer supportsIndicesUint16(boolean value)

Sets the specified value to the XrScenePlaneMSFT#supportsIndicesUint16 field.