Class XrCompositionLayerQuad
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrCompositionLayerQuad
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrCompositionLayerQuad extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceQuad composition layer.Description
The
XrCompositionLayerQuadlayer is useful for user interface elements or 2D content rendered into the virtual world. The layer’sXrSwapchainSubImage::swapchain image is applied to a quad in the virtual world space. Only front face of the quad surface is visible; the back face is not visible and must not be drawn by the runtime. A quad layer has no thickness; it is a two-dimensional object positioned and oriented in 3D space. The position of a quad refers to the center of the quad within the givenXrSpace. The orientation of the quad refers to the orientation of the normal vector from the front face. The size of a quad refers to the quad’s size in thex-yplane of the givenXrSpace’s coordinate system. A quad with a position of {0,0,0}, rotation of {0,0,0,1} (no rotation), and a size of {1,1} refers to a 1 meter x 1 meter quad centered at {0,0,0} with its front face normal vector coinciding with the +z axis.Valid Usage (Implicit)
typemust beTYPE_COMPOSITION_LAYER_QUADnextmust beNULLor a valid pointer to the next structure in a structure chainlayerFlagsmust be 0 or a valid combination ofXrCompositionLayerFlagBitsvaluesspacemust be a validXrSpacehandleeyeVisibilitymust be a validXrEyeVisibilityvaluesubImagemust be a validXrSwapchainSubImagestructure
See Also
XrCompositionLayerBaseHeader,XrExtent2Df,XrPosef,XrSwapchainSubImageLayout
struct XrCompositionLayerQuad { XrStructureTypetype(); void const *next(); XrCompositionLayerFlagslayerFlags(); XrSpacespace(); XrEyeVisibilityeyeVisibility();XrSwapchainSubImagesubImage();XrPosefpose();XrExtent2Dfsize(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrCompositionLayerQuad.BufferAn array ofXrCompositionLayerQuadstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intEYEVISIBILITY
LAYERFLAGS
NEXT
POSE
SIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSPACE
SUBIMAGE
TYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrCompositionLayerQuad(java.nio.ByteBuffer container)Creates aXrCompositionLayerQuadinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrCompositionLayerQuadcalloc()Returns a newXrCompositionLayerQuadinstance allocated withmemCalloc.static XrCompositionLayerQuad.Buffercalloc(int capacity)Returns a newXrCompositionLayerQuad.Bufferinstance allocated withmemCalloc.static XrCompositionLayerQuad.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerQuad.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrCompositionLayerQuadcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerQuadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrCompositionLayerQuadcreate()Returns a newXrCompositionLayerQuadinstance allocated withBufferUtils.static XrCompositionLayerQuad.Buffercreate(int capacity)Returns a newXrCompositionLayerQuad.Bufferinstance allocated withBufferUtils.static XrCompositionLayerQuadcreate(long address)Returns a newXrCompositionLayerQuadinstance for the specified memory address.static XrCompositionLayerQuad.Buffercreate(long address, int capacity)Create aXrCompositionLayerQuad.Bufferinstance at the specified memory.static XrCompositionLayerQuadcreate(XrCompositionLayerBaseHeader value)Downcasts the specifiedXrCompositionLayerBaseHeaderinstance toXrCompositionLayerQuad.static XrCompositionLayerQuad.Buffercreate(XrCompositionLayerBaseHeader.Buffer value)Downcasts the specifiedXrCompositionLayerBaseHeader.Bufferinstance toXrCompositionLayerQuad.Buffer.static XrCompositionLayerQuadcreateSafe(long address)static XrCompositionLayerQuad.BuffercreateSafe(long address, int capacity)inteyeVisibility()theXrEyeVisibilityfor this layer.XrCompositionLayerQuadeyeVisibility(int value)Sets the specified value to theeyeVisibility()field.longlayerFlags()a bitmask ofXrCompositionLayerFlagBitsdescribing flags to apply to the layer.XrCompositionLayerQuadlayerFlags(long value)Sets the specified value to thelayerFlags()field.static XrCompositionLayerQuadmalloc()Returns a newXrCompositionLayerQuadinstance allocated withmemAlloc.static XrCompositionLayerQuad.Buffermalloc(int capacity)Returns a newXrCompositionLayerQuad.Bufferinstance allocated withmemAlloc.static XrCompositionLayerQuad.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerQuad.Bufferinstance allocated on the specifiedMemoryStack.static XrCompositionLayerQuadmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerQuadinstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.XrCompositionLayerQuadnext(long value)Sets the specified value to thenext()field.static intneyeVisibility(long struct)Unsafe version ofeyeVisibility().static voidneyeVisibility(long struct, int value)Unsafe version ofeyeVisibility.static longnlayerFlags(long struct)Unsafe version oflayerFlags().static voidnlayerFlags(long struct, long value)Unsafe version oflayerFlags.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static XrPosefnpose(long struct)Unsafe version ofpose().static voidnpose(long struct, XrPosef value)Unsafe version ofpose.static XrExtent2Dfnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, XrExtent2Df value)Unsafe version ofsize.static longnspace(long struct)Unsafe version ofspace().static voidnspace(long struct, XrSpace value)Unsafe version ofspace.static XrSwapchainSubImagensubImage(long struct)Unsafe version ofsubImage().static voidnsubImage(long struct, XrSwapchainSubImage value)Unsafe version ofsubImage.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.XrPosefpose()anXrPosefdefining the position and orientation of the quad in the reference frame of thespace.XrCompositionLayerQuadpose(java.util.function.Consumer<XrPosef> consumer)Passes thepose()field to the specifiedConsumer.XrCompositionLayerQuadpose(XrPosef value)XrCompositionLayerQuadset(int type, long next, long layerFlags, XrSpace space, int eyeVisibility, XrSwapchainSubImage subImage, XrPosef pose, XrExtent2Df size)Initializes this struct with the specified values.XrCompositionLayerQuadset(XrCompositionLayerQuad src)Copies the specified struct data to this struct.XrExtent2Dfsize()the width and height of the quad in meters.XrCompositionLayerQuadsize(java.util.function.Consumer<XrExtent2Df> consumer)Passes thesize()field to the specifiedConsumer.XrCompositionLayerQuadsize(XrExtent2Df value)Copies the specifiedXrExtent2Dfto thesize()field.intsizeof()longspace()theXrSpacein which theposeof the quad layer is evaluated over time.XrCompositionLayerQuadspace(XrSpace value)Sets the specified value to thespace()field.XrSwapchainSubImagesubImage()the image layerXrSwapchainSubImageto use.XrCompositionLayerQuadsubImage(java.util.function.Consumer<XrSwapchainSubImage> consumer)Passes thesubImage()field to the specifiedConsumer.XrCompositionLayerQuadsubImage(XrSwapchainSubImage value)Copies the specifiedXrSwapchainSubImageto thesubImage()field.inttype()theXrStructureTypeof this structure.XrCompositionLayerQuadtype(int value)Sets the specified value to thetype()field.XrCompositionLayerQuadtype$Default()Sets theTYPE_COMPOSITION_LAYER_QUADvalue to thetype()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
XrCompositionLayerQuad
public XrCompositionLayerQuad(java.nio.ByteBuffer container)
Creates aXrCompositionLayerQuadinstance 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
-
type
public int type()
theXrStructureTypeof this structure.
-
next
public long next()
NULLor a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR.
-
layerFlags
public long layerFlags()
a bitmask ofXrCompositionLayerFlagBitsdescribing flags to apply to the layer.
-
space
public long space()
theXrSpacein which theposeof the quad layer is evaluated over time.
-
eyeVisibility
public int eyeVisibility()
theXrEyeVisibilityfor this layer.
-
subImage
public XrSwapchainSubImage subImage()
the image layerXrSwapchainSubImageto use.
-
pose
public XrPosef pose()
anXrPosefdefining the position and orientation of the quad in the reference frame of thespace.
-
size
public XrExtent2Df size()
the width and height of the quad in meters.
-
type
public XrCompositionLayerQuad type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrCompositionLayerQuad type$Default()
Sets theTYPE_COMPOSITION_LAYER_QUADvalue to thetype()field.
-
next
public XrCompositionLayerQuad next(long value)
Sets the specified value to thenext()field.
-
layerFlags
public XrCompositionLayerQuad layerFlags(long value)
Sets the specified value to thelayerFlags()field.
-
space
public XrCompositionLayerQuad space(XrSpace value)
Sets the specified value to thespace()field.
-
eyeVisibility
public XrCompositionLayerQuad eyeVisibility(int value)
Sets the specified value to theeyeVisibility()field.
-
subImage
public XrCompositionLayerQuad subImage(XrSwapchainSubImage value)
Copies the specifiedXrSwapchainSubImageto thesubImage()field.
-
subImage
public XrCompositionLayerQuad subImage(java.util.function.Consumer<XrSwapchainSubImage> consumer)
Passes thesubImage()field to the specifiedConsumer.
-
pose
public XrCompositionLayerQuad pose(XrPosef value)
-
pose
public XrCompositionLayerQuad pose(java.util.function.Consumer<XrPosef> consumer)
Passes thepose()field to the specifiedConsumer.
-
size
public XrCompositionLayerQuad size(XrExtent2Df value)
Copies the specifiedXrExtent2Dfto thesize()field.
-
size
public XrCompositionLayerQuad size(java.util.function.Consumer<XrExtent2Df> consumer)
Passes thesize()field to the specifiedConsumer.
-
set
public XrCompositionLayerQuad set(int type, long next, long layerFlags, XrSpace space, int eyeVisibility, XrSwapchainSubImage subImage, XrPosef pose, XrExtent2Df size)
Initializes this struct with the specified values.
-
set
public XrCompositionLayerQuad set(XrCompositionLayerQuad src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrCompositionLayerQuad malloc()
Returns a newXrCompositionLayerQuadinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrCompositionLayerQuad calloc()
Returns a newXrCompositionLayerQuadinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrCompositionLayerQuad create()
Returns a newXrCompositionLayerQuadinstance allocated withBufferUtils.
-
create
public static XrCompositionLayerQuad create(long address)
Returns a newXrCompositionLayerQuadinstance for the specified memory address.
-
createSafe
@Nullable public static XrCompositionLayerQuad createSafe(long address)
-
create
public static XrCompositionLayerQuad create(XrCompositionLayerBaseHeader value)
Downcasts the specifiedXrCompositionLayerBaseHeaderinstance toXrCompositionLayerQuad.
-
malloc
public static XrCompositionLayerQuad.Buffer malloc(int capacity)
Returns a newXrCompositionLayerQuad.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrCompositionLayerQuad.Buffer calloc(int capacity)
Returns a newXrCompositionLayerQuad.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrCompositionLayerQuad.Buffer create(int capacity)
Returns a newXrCompositionLayerQuad.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrCompositionLayerQuad.Buffer create(long address, int capacity)
Create aXrCompositionLayerQuad.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrCompositionLayerQuad.Buffer createSafe(long address, int capacity)
-
create
public static XrCompositionLayerQuad.Buffer create(XrCompositionLayerBaseHeader.Buffer value)
Downcasts the specifiedXrCompositionLayerBaseHeader.Bufferinstance toXrCompositionLayerQuad.Buffer.
-
malloc
public static XrCompositionLayerQuad malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerQuadinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrCompositionLayerQuad calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerQuadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrCompositionLayerQuad.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerQuad.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrCompositionLayerQuad.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerQuad.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nnext
public static long nnext(long struct)
Unsafe version ofnext().
-
nlayerFlags
public static long nlayerFlags(long struct)
Unsafe version oflayerFlags().
-
nspace
public static long nspace(long struct)
Unsafe version ofspace().
-
neyeVisibility
public static int neyeVisibility(long struct)
Unsafe version ofeyeVisibility().
-
nsubImage
public static XrSwapchainSubImage nsubImage(long struct)
Unsafe version ofsubImage().
-
nsize
public static XrExtent2Df nsize(long struct)
Unsafe version ofsize().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
nlayerFlags
public static void nlayerFlags(long struct, long value)Unsafe version oflayerFlags.
-
neyeVisibility
public static void neyeVisibility(long struct, int value)Unsafe version ofeyeVisibility.
-
nsubImage
public static void nsubImage(long struct, XrSwapchainSubImage value)Unsafe version ofsubImage.
-
nsize
public static void nsize(long struct, XrExtent2Df value)Unsafe version ofsize.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-