Package org.lwjgl.openxr
Class XrViewState
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrViewState
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrViewState extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStruct containing additional view state.Description
The
XrViewStatecontains additional view state fromLocateViewscommon to all views of the active view configuration.Valid Usage (Implicit)
typemust beTYPE_VIEW_STATEnextmust beNULLor a valid pointer to the next structure in a structure chainviewStateFlagsmust be 0 or a valid combination ofXrViewStateFlagBitsvalues
See Also
Layout
struct XrViewState { XrStructureTypetype(); void *next(); XrViewStateFlagsviewStateFlags(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrViewState.BufferAn array ofXrViewStatestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPE
VIEWSTATEFLAGSThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrViewState(java.nio.ByteBuffer container)Creates aXrViewStateinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrViewStatecalloc()Returns a newXrViewStateinstance allocated withmemCalloc.static XrViewState.Buffercalloc(int capacity)Returns a newXrViewState.Bufferinstance allocated withmemCalloc.static XrViewState.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrViewState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrViewStatecalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrViewStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrViewStatecreate()Returns a newXrViewStateinstance allocated withBufferUtils.static XrViewState.Buffercreate(int capacity)Returns a newXrViewState.Bufferinstance allocated withBufferUtils.static XrViewStatecreate(long address)Returns a newXrViewStateinstance for the specified memory address.static XrViewState.Buffercreate(long address, int capacity)Create aXrViewState.Bufferinstance at the specified memory.static XrViewStatecreateSafe(long address)static XrViewState.BuffercreateSafe(long address, int capacity)static XrViewStatemalloc()Returns a newXrViewStateinstance allocated withmemAlloc.static XrViewState.Buffermalloc(int capacity)Returns a newXrViewState.Bufferinstance allocated withmemAlloc.static XrViewState.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrViewState.Bufferinstance allocated on the specifiedMemoryStack.static XrViewStatemalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrViewStateinstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.XrViewStatenext(long value)Sets the specified value to thenext()field.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.static longnviewStateFlags(long struct)Unsafe version ofviewStateFlags().static voidnviewStateFlags(long struct, long value)Unsafe version ofviewStateFlags.XrViewStateset(int type, long next, long viewStateFlags)Initializes this struct with the specified values.XrViewStateset(XrViewState src)Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.XrViewStatetype(int value)Sets the specified value to thetype()field.XrViewStatetype$Default()Sets theTYPE_VIEW_STATEvalue to thetype()field.longviewStateFlags()a bitmask ofXrViewStateFlagBitsindicating state for all views.XrViewStateviewStateFlags(long value)Sets the specified value to theviewStateFlags()field.
-
-
-
Constructor Detail
-
XrViewState
public XrViewState(java.nio.ByteBuffer container)
Creates aXrViewStateinstance 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.
-
viewStateFlags
public long viewStateFlags()
a bitmask ofXrViewStateFlagBitsindicating state for all views.
-
type
public XrViewState type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrViewState type$Default()
Sets theTYPE_VIEW_STATEvalue to thetype()field.
-
next
public XrViewState next(long value)
Sets the specified value to thenext()field.
-
viewStateFlags
public XrViewState viewStateFlags(long value)
Sets the specified value to theviewStateFlags()field.
-
set
public XrViewState set(int type, long next, long viewStateFlags)
Initializes this struct with the specified values.
-
set
public XrViewState set(XrViewState src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrViewState malloc()
Returns a newXrViewStateinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrViewState calloc()
Returns a newXrViewStateinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrViewState create()
Returns a newXrViewStateinstance allocated withBufferUtils.
-
create
public static XrViewState create(long address)
Returns a newXrViewStateinstance for the specified memory address.
-
createSafe
@Nullable public static XrViewState createSafe(long address)
-
malloc
public static XrViewState.Buffer malloc(int capacity)
Returns a newXrViewState.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrViewState.Buffer calloc(int capacity)
Returns a newXrViewState.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrViewState.Buffer create(int capacity)
Returns a newXrViewState.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrViewState.Buffer create(long address, int capacity)
Create aXrViewState.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrViewState.Buffer createSafe(long address, int capacity)
-
malloc
public static XrViewState malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrViewStateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrViewState calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrViewStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrViewState.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrViewState.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrViewState.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrViewState.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().
-
nviewStateFlags
public static long nviewStateFlags(long struct)
Unsafe version ofviewStateFlags().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
nviewStateFlags
public static void nviewStateFlags(long struct, long value)Unsafe version ofviewStateFlags.
-
-