Class XrFovf
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrFovf
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrFovf extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceField of view.Description
Angles to the right of the center and upwards from the center are positive, and angles to the left of the center and down from the center are negative. The total horizontal field of view is
angleRightminusangleLeft, and the total vertical field of view isangleUpminusangleDown. For a symmetric FoV,angleRightandangleUpwill have positive values,angleLeftwill be -angleRight, andangleDownwill be -angleUp.The angles must be specified in radians, and must be between
-π/2andπ/2exclusively.When
angleLeft>angleRight, the content of the view must be flipped horizontally. WhenangleDown>angleUp, the content of the view must be flipped vertically.See Also
XrCompositionLayerProjectionView,XrSceneFrustumBoundMSFT,XrView,XrViewConfigurationViewFovEPICLayout
struct XrFovf { floatangleLeft(); floatangleRight(); floatangleUp(); floatangleDown(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrFovf.BufferAn array ofXrFovfstructs.
-
Constructor Summary
Constructors Constructor Description XrFovf(java.nio.ByteBuffer container)Creates aXrFovfinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description floatangleDown()the angle of the bottom part of the field of view.XrFovfangleDown(float value)Sets the specified value to theangleDown()field.floatangleLeft()the angle of the left side of the field of view.XrFovfangleLeft(float value)Sets the specified value to theangleLeft()field.floatangleRight()the angle of the right side of the field of view.XrFovfangleRight(float value)Sets the specified value to theangleRight()field.floatangleUp()the angle of the top part of the field of view.XrFovfangleUp(float value)Sets the specified value to theangleUp()field.static XrFovfcalloc()Returns a newXrFovfinstance allocated withmemCalloc.static XrFovf.Buffercalloc(int capacity)Returns a newXrFovf.Bufferinstance allocated withmemCalloc.static XrFovf.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrFovf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrFovfcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrFovfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrFovfcreate()Returns a newXrFovfinstance allocated withBufferUtils.static XrFovf.Buffercreate(int capacity)Returns a newXrFovf.Bufferinstance allocated withBufferUtils.static XrFovfcreate(long address)Returns a newXrFovfinstance for the specified memory address.static XrFovf.Buffercreate(long address, int capacity)Create aXrFovf.Bufferinstance at the specified memory.static XrFovfcreateSafe(long address)static XrFovf.BuffercreateSafe(long address, int capacity)static XrFovfmalloc()Returns a newXrFovfinstance allocated withmemAlloc.static XrFovf.Buffermalloc(int capacity)Returns a newXrFovf.Bufferinstance allocated withmemAlloc.static XrFovf.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrFovf.Bufferinstance allocated on the specifiedMemoryStack.static XrFovfmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrFovfinstance allocated on the specifiedMemoryStack.static floatnangleDown(long struct)Unsafe version ofangleDown().static voidnangleDown(long struct, float value)Unsafe version ofangleDown.static floatnangleLeft(long struct)Unsafe version ofangleLeft().static voidnangleLeft(long struct, float value)Unsafe version ofangleLeft.static floatnangleRight(long struct)Unsafe version ofangleRight().static voidnangleRight(long struct, float value)Unsafe version ofangleRight.static floatnangleUp(long struct)Unsafe version ofangleUp().static voidnangleUp(long struct, float value)Unsafe version ofangleUp.XrFovfset(float angleLeft, float angleRight, float angleUp, float angleDown)Initializes this struct with the specified values.XrFovfset(XrFovf src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
XrFovf
public XrFovf(java.nio.ByteBuffer container)
Creates aXrFovfinstance 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
-
angleLeft
public float angleLeft()
the angle of the left side of the field of view. For a symmetric field of view this value is negative.
-
angleRight
public float angleRight()
the angle of the right side of the field of view.
-
angleUp
public float angleUp()
the angle of the top part of the field of view.
-
angleDown
public float angleDown()
the angle of the bottom part of the field of view. For a symmetric field of view this value is negative.
-
angleLeft
public XrFovf angleLeft(float value)
Sets the specified value to theangleLeft()field.
-
angleRight
public XrFovf angleRight(float value)
Sets the specified value to theangleRight()field.
-
angleDown
public XrFovf angleDown(float value)
Sets the specified value to theangleDown()field.
-
set
public XrFovf set(float angleLeft, float angleRight, float angleUp, float angleDown)
Initializes this struct with the specified values.
-
set
public XrFovf set(XrFovf src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrFovf malloc()
Returns a newXrFovfinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrFovf calloc()
Returns a newXrFovfinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrFovf create()
Returns a newXrFovfinstance allocated withBufferUtils.
-
create
public static XrFovf create(long address)
Returns a newXrFovfinstance for the specified memory address.
-
createSafe
@Nullable public static XrFovf createSafe(long address)
-
malloc
public static XrFovf.Buffer malloc(int capacity)
Returns a newXrFovf.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrFovf.Buffer calloc(int capacity)
Returns a newXrFovf.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrFovf.Buffer create(int capacity)
Returns a newXrFovf.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrFovf.Buffer create(long address, int capacity)
Create aXrFovf.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrFovf.Buffer createSafe(long address, int capacity)
-
malloc
public static XrFovf malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrFovfinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrFovf calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrFovfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrFovf.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrFovf.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrFovf.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrFovf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nangleLeft
public static float nangleLeft(long struct)
Unsafe version ofangleLeft().
-
nangleRight
public static float nangleRight(long struct)
Unsafe version ofangleRight().
-
nangleUp
public static float nangleUp(long struct)
Unsafe version ofangleUp().
-
nangleDown
public static float nangleDown(long struct)
Unsafe version ofangleDown().
-
nangleLeft
public static void nangleLeft(long struct, float value)Unsafe version ofangleLeft.
-
nangleRight
public static void nangleRight(long struct, float value)Unsafe version ofangleRight.
-
nangleUp
public static void nangleUp(long struct, float value)Unsafe version ofangleUp.
-
nangleDown
public static void nangleDown(long struct, float value)Unsafe version ofangleDown.
-
-