Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrCompositionLayerQuad

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

Quad composition layer.
Description

The XrCompositionLayerQuad layer is useful for user interface elements or 2D content rendered into the virtual world. The layer’s XrSwapchainSubImage::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 given XrSpace. 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 the x-y plane of the given XrSpace’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)
See Also

XrCompositionLayerBaseHeader, XrExtent2Df, XrPosef, XrSwapchainSubImage

Layout


struct XrCompositionLayerQuad {
    XrStructureType type;
    void const * next;
    XrCompositionLayerFlags layerFlags;
    XrSpace space;
    XrEyeVisibility eyeVisibility;
    XrSwapchainSubImage subImage;
    XrPosef pose;
    XrExtent2Df size;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
EYEVISIBILITY

The struct member offsets.

public static final int
LAYERFLAGS

The struct member offsets.

public static final int
NEXT

The struct member offsets.

public static final int
POSE

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
SPACE

The struct member offsets.

public static final int
SUBIMAGE

The struct member offsets.

public static final int
TYPE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
XrCompositionLayerQuad(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static XrCompositionLayerQuad
calloc()

Returns a new XrCompositionLayerQuad instance allocated with memCalloc.

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

Returns a new XrCompositionLayerQuad.Buffer instance allocated with memCalloc.

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

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

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

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

protected XrCompositionLayerQuad
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 XrCompositionLayerQuad
create()

Returns a new XrCompositionLayerQuad instance allocated with BufferUtils.

public static XrCompositionLayerQuad
create(long address)

Returns a new XrCompositionLayerQuad instance for the specified memory address.

public static XrCompositionLayerQuad
create(XrCompositionLayerBaseHeader value)

Downcasts the specified XrCompositionLayerBaseHeader instance to XrCompositionLayerQuad.

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

Returns a new XrCompositionLayerQuad.Buffer instance allocated with BufferUtils.

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

Create a XrCompositionLayerQuad.Buffer instance at the specified memory.

public static XrCompositionLayerQuad.Buffer
create(XrCompositionLayerBaseHeader.Buffer value)

Downcasts the specified XrCompositionLayerBaseHeader.Buffer instance to XrCompositionLayerQuad.Buffer.

public static XrCompositionLayerQuad
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public int
eyeVisibility()

the XrEyeVisibility for this layer.

public XrCompositionLayerQuad
eyeVisibility(int value)

Sets the specified value to the eyeVisibility field.

public long
layerFlags()

a bitmask of XrCompositionLayerFlagBits describing flags to apply to the layer.

public XrCompositionLayerQuad
layerFlags(long value)

Sets the specified value to the layerFlags field.

public static XrCompositionLayerQuad
malloc()

Returns a new XrCompositionLayerQuad instance allocated with memAlloc.

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

Returns a new XrCompositionLayerQuad.Buffer instance allocated with memAlloc.

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

Returns a new XrCompositionLayerQuad instance allocated on the specified MemoryStack.

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

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

public long
next()

NULL or a pointer to the next structure in a structure chain.

public XrCompositionLayerQuad
next(long value)

Sets the specified value to the next field.

public static int
neyeVisibility(long struct)

Unsafe version of eyeVisibility.

public static void
neyeVisibility(long struct, int value)

Unsafe version of eyeVisibility.

public static long
nlayerFlags(long struct)

Unsafe version of layerFlags.

public static void
nlayerFlags(long struct, long value)

Unsafe version of layerFlags.

public static long
nnext(long struct)

Unsafe version of next.

public static void
nnext(long struct, long value)

Unsafe version of next.

public static XrPosef
npose(long struct)

Unsafe version of pose.

public static void
npose(long struct, XrPosef value)

Unsafe version of pose.

public static XrExtent2Df
nsize(long struct)

Unsafe version of size.

public static void
nsize(long struct, XrExtent2Df value)

Unsafe version of size.

public static long
nspace(long struct)

Unsafe version of space.

public static void
nspace(long struct, XrSpace value)

Unsafe version of space.

public static XrSwapchainSubImage
nsubImage(long struct)

Unsafe version of subImage.

public static void
nsubImage(long struct, XrSwapchainSubImage value)

Unsafe version of subImage.

public static int
ntype(long struct)

Unsafe version of type.

public static void
ntype(long struct, int value)

Unsafe version of type.

public XrPosef
pose()

an XrPosef defining the position and orientation of the quad in the reference frame of the space.

public XrCompositionLayerQuad
pose(XrPosef value)

Copies the specified XrPosef to the pose field.

public XrCompositionLayerQuad
pose(Consumer<XrPosef> consumer)

Passes the pose field to the specified Consumer.

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.

public XrCompositionLayerQuad

Returns:

this struct
set
(XrCompositionLayerQuad
the source struct
src
)

Copies the specified struct data to this struct.

public XrExtent2Df
size()

the width and height of the quad in meters.

public XrCompositionLayerQuad
size(XrExtent2Df value)

Copies the specified XrExtent2Df to the size field.

public XrCompositionLayerQuad
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 long
space()

the XrSpace in which the pose of the quad layer is evaluated over time.

public XrCompositionLayerQuad
space(XrSpace value)

Sets the specified value to the space field.

public XrSwapchainSubImage
subImage()

the image layer XrSwapchainSubImage to use.

public XrCompositionLayerQuad
subImage(XrSwapchainSubImage value)

Copies the specified XrSwapchainSubImage to the subImage field.

public XrCompositionLayerQuad
subImage(Consumer<XrSwapchainSubImage> consumer)

Passes the subImage field to the specified Consumer.

public int
type()

the XrStructureType of this structure.

public XrCompositionLayerQuad
type(int value)

Sets the specified value to the type field.

public XrCompositionLayerQuad
type$Default()

Sets the TYPE_COMPOSITION_LAYER_QUAD value to the type field.

public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate