Package org.lwjgl.openxr
Class XrFoveationConfigurationHTC
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrFoveationConfigurationHTC>
org.lwjgl.openxr.XrFoveationConfigurationHTC
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrFoveationConfigurationHTC
extends org.lwjgl.system.Struct<XrFoveationConfigurationHTC>
implements org.lwjgl.system.NativeResource
Configuration of foveation.
Valid Usage (Implicit)
- The
XR_HTC_foveationextension must be enabled prior to usingXrFoveationConfigurationHTC levelmust be a validXrFoveationLevelHTCvalue
See Also
XrFoveationCustomModeInfoHTC, XrVector2f
Layout
struct XrFoveationConfigurationHTC {
XrFoveationLevelHTC level();
float clearFovDegree();
XrVector2f focalCenterOffset();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXrFoveationConfigurationHTC(ByteBuffer container) Creates aXrFoveationConfigurationHTCinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic XrFoveationConfigurationHTCcalloc()Returns a newXrFoveationConfigurationHTCinstance allocated withmemCalloc.calloc(int capacity) Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrFoveationConfigurationHTCcalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrFoveationConfigurationHTCinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.floatthe value indicating the total horizontal and vertical field angle with the original pixel density level.clearFovDegree(float value) Sets the specified value to theclearFovDegree()field.static XrFoveationConfigurationHTCcreate()Returns a newXrFoveationConfigurationHTCinstance allocated withBufferUtils.create(int capacity) Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated withBufferUtils.static XrFoveationConfigurationHTCcreate(long address) Returns a newXrFoveationConfigurationHTCinstance for the specified memory address.create(long address, int capacity) Create aXrFoveationConfigurationHTC.Bufferinstance at the specified memory.static @Nullable XrFoveationConfigurationHTCcreateSafe(long address) static @Nullable XrFoveationConfigurationHTC.BuffercreateSafe(long address, int capacity) the desired center offset of the field of view in NDC(normalized device coordinates) space.focalCenterOffset(Consumer<XrVector2f> consumer) Passes thefocalCenterOffset()field to the specifiedConsumer.focalCenterOffset(XrVector2f value) Copies the specifiedXrVector2fto thefocalCenterOffset()field.intlevel()the pixel density drop level of periphery area specified byXrFoveationLevelHTC.level(int value) Sets the specified value to thelevel()field.static XrFoveationConfigurationHTCmalloc()Returns a newXrFoveationConfigurationHTCinstance allocated withmemAlloc.malloc(int capacity) Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated on the specifiedMemoryStack.static XrFoveationConfigurationHTCmalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrFoveationConfigurationHTCinstance allocated on the specifiedMemoryStack.static floatnclearFovDegree(long struct) Unsafe version ofclearFovDegree().static voidnclearFovDegree(long struct, float value) Unsafe version ofclearFovDegree.static XrVector2fnfocalCenterOffset(long struct) Unsafe version offocalCenterOffset().static voidnfocalCenterOffset(long struct, XrVector2f value) Unsafe version offocalCenterOffset.static intnlevel(long struct) Unsafe version oflevel().static voidnlevel(long struct, int value) Unsafe version oflevel.set(int level, float clearFovDegree, XrVector2f focalCenterOffset) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
LEVEL
public static final int LEVELThe struct member offsets. -
CLEARFOVDEGREE
public static final int CLEARFOVDEGREEThe struct member offsets. -
FOCALCENTEROFFSET
public static final int FOCALCENTEROFFSETThe struct member offsets.
-
-
Constructor Details
-
XrFoveationConfigurationHTC
Creates aXrFoveationConfigurationHTCinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<XrFoveationConfigurationHTC>
-
level
public int level()the pixel density drop level of periphery area specified byXrFoveationLevelHTC. -
clearFovDegree
public float clearFovDegree()the value indicating the total horizontal and vertical field angle with the original pixel density level.clearFovDegreemust be specified in degree, and must be in the range [0, 180]. -
focalCenterOffset
the desired center offset of the field of view in NDC(normalized device coordinates) space. The x and y offocalCenterOffsetmust be in the range [-1, 1]. -
level
Sets the specified value to thelevel()field. -
clearFovDegree
Sets the specified value to theclearFovDegree()field. -
focalCenterOffset
Copies the specifiedXrVector2fto thefocalCenterOffset()field. -
focalCenterOffset
Passes thefocalCenterOffset()field to the specifiedConsumer. -
set
public XrFoveationConfigurationHTC set(int level, float clearFovDegree, XrVector2f focalCenterOffset) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newXrFoveationConfigurationHTCinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrFoveationConfigurationHTCinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrFoveationConfigurationHTCinstance allocated withBufferUtils. -
create
Returns a newXrFoveationConfigurationHTCinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrFoveationConfigurationHTC.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrFoveationConfigurationHTCinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrFoveationConfigurationHTCinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrFoveationConfigurationHTC.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static XrFoveationConfigurationHTC.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFoveationConfigurationHTC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nlevel
public static int nlevel(long struct) Unsafe version oflevel(). -
nclearFovDegree
public static float nclearFovDegree(long struct) Unsafe version ofclearFovDegree(). -
nfocalCenterOffset
Unsafe version offocalCenterOffset(). -
nlevel
public static void nlevel(long struct, int value) Unsafe version oflevel. -
nclearFovDegree
public static void nclearFovDegree(long struct, float value) Unsafe version ofclearFovDegree. -
nfocalCenterOffset
Unsafe version offocalCenterOffset.
-