Package org.lwjgl.openxr
Class XrView
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrView
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrView extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStruct containing view projection state.Description
The
XrViewstructure contains view pose and projection state necessary to render a single projection view in the view configuration.Valid Usage (Implicit)
typemust beTYPE_VIEWnextmust beNULLor a valid pointer to the next structure in a structure chain
See Also
XrFovf,XrPosef,XrViewLocateInfo,XrViewState,LocateViewsLayout
struct XrView { XrStructureTypetype(); void *next();XrPosefpose();XrFovffov(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrView.BufferAn array ofXrViewstructs.
-
Constructor Summary
Constructors Constructor Description XrView(java.nio.ByteBuffer container)Creates aXrViewinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrViewcalloc()Returns a newXrViewinstance allocated withmemCalloc.static XrView.Buffercalloc(int capacity)Returns a newXrView.Bufferinstance allocated withmemCalloc.static XrView.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrView.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrViewcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrViewinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrViewcreate()Returns a newXrViewinstance allocated withBufferUtils.static XrView.Buffercreate(int capacity)Returns a newXrView.Bufferinstance allocated withBufferUtils.static XrViewcreate(long address)Returns a newXrViewinstance for the specified memory address.static XrView.Buffercreate(long address, int capacity)Create aXrView.Bufferinstance at the specified memory.static XrViewcreateSafe(long address)static XrView.BuffercreateSafe(long address, int capacity)XrFovffov()theXrFovffor the four sides of the projection.XrViewfov(java.util.function.Consumer<XrFovf> consumer)Passes thefov()field to the specifiedConsumer.XrViewfov(XrFovf value)static XrViewmalloc()Returns a newXrViewinstance allocated withmemAlloc.static XrView.Buffermalloc(int capacity)Returns a newXrView.Bufferinstance allocated withmemAlloc.static XrView.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrView.Bufferinstance allocated on the specifiedMemoryStack.static XrViewmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrViewinstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.XrViewnext(long value)Sets the specified value to thenext()field.static XrFovfnfov(long struct)Unsafe version offov().static voidnfov(long struct, XrFovf value)Unsafe version offov.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 intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.XrPosefpose()anXrPosefdefining the location and orientation of the view in thespacespecified by theLocateViewsfunction.XrViewpose(java.util.function.Consumer<XrPosef> consumer)Passes thepose()field to the specifiedConsumer.XrViewpose(XrPosef value)XrViewset(int type, long next, XrPosef pose, XrFovf fov)Initializes this struct with the specified values.XrViewset(XrView src)Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.XrViewtype(int value)Sets the specified value to thetype()field.XrViewtype$Default()
-
-
-
Constructor Detail
-
XrView
public XrView(java.nio.ByteBuffer container)
Creates aXrViewinstance 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.
-
pose
public XrPosef pose()
anXrPosefdefining the location and orientation of the view in thespacespecified by theLocateViewsfunction.
-
type$Default
public XrView type$Default()
-
pose
public XrView pose(java.util.function.Consumer<XrPosef> consumer)
Passes thepose()field to the specifiedConsumer.
-
fov
public XrView fov(java.util.function.Consumer<XrFovf> consumer)
Passes thefov()field to the specifiedConsumer.
-
set
public XrView set(int type, long next, XrPosef pose, XrFovf fov)
Initializes this struct with the specified values.
-
set
public XrView set(XrView src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrView malloc()
Returns a newXrViewinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrView calloc()
Returns a newXrViewinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrView create()
Returns a newXrViewinstance allocated withBufferUtils.
-
create
public static XrView create(long address)
Returns a newXrViewinstance for the specified memory address.
-
createSafe
@Nullable public static XrView createSafe(long address)
-
malloc
public static XrView.Buffer malloc(int capacity)
Returns a newXrView.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrView.Buffer calloc(int capacity)
Returns a newXrView.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrView.Buffer create(int capacity)
Returns a newXrView.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrView.Buffer create(long address, int capacity)
Create aXrView.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrView.Buffer createSafe(long address, int capacity)
-
malloc
public static XrView malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrViewinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrView calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrViewinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrView.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrView.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrView.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrView.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().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
-