Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrFovf

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

Field 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 angleRight minus angleLeft, and the total vertical field of view is angleUp minus angleDown. For a symmetric FoV, angleRight and angleUp will have positive values, angleLeft will be -angleRight, and angleDown will be -angleUp.

The angles must be specified in radians, and must be between -π/2 and π/2 exclusively.

When angleLeft > angleRight, the content of the view must be flipped horizontally. When angleDown > angleUp, the content of the view must be flipped vertically.

See Also

XrCompositionLayerProjectionView, XrExternalCameraIntrinsicsOCULUS, XrSceneFrustumBoundMSFT, XrView, XrViewConfigurationViewFovEPIC

Layout


struct XrFovf {
    float angleLeft;
    float angleRight;
    float angleUp;
    float angleDown;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
XrFovf.Buffer

An array of XrFovf structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
ANGLEDOWN

The struct member offsets.

public static final int
ANGLELEFT

The struct member offsets.

public static final int
ANGLERIGHT

The struct member offsets.

public static final int
ANGLEUP

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
XrFovf(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public float
angleDown()

the angle of the bottom part of the field of view.

public XrFovf
angleDown(float value)

Sets the specified value to the angleDown field.

public float
angleLeft()

the angle of the left side of the field of view.

public XrFovf
angleLeft(float value)

Sets the specified value to the angleLeft field.

public float
angleRight()

the angle of the right side of the field of view.

public XrFovf
angleRight(float value)

Sets the specified value to the angleRight field.

public float
angleUp()

the angle of the top part of the field of view.

public XrFovf
angleUp(float value)

Sets the specified value to the angleUp field.

public static XrFovf
calloc()

Returns a new XrFovf instance allocated with memCalloc.

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

Returns a new XrFovf.Buffer instance allocated with memCalloc.

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

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

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

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

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

Returns a new XrFovf instance allocated with BufferUtils.

public static XrFovf
create(long address)

Returns a new XrFovf instance for the specified memory address.

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

Returns a new XrFovf.Buffer instance allocated with BufferUtils.

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

Create a XrFovf.Buffer instance at the specified memory.

public static XrFovf
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public static XrFovf
malloc()

Returns a new XrFovf instance allocated with memAlloc.

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

Returns a new XrFovf.Buffer instance allocated with memAlloc.

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

Returns a new XrFovf instance allocated on the specified MemoryStack.

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

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

public static float
nangleDown(long struct)

Unsafe version of angleDown.

public static void
nangleDown(long struct, float value)

Unsafe version of angleDown.

public static float
nangleLeft(long struct)

Unsafe version of angleLeft.

public static void
nangleLeft(long struct, float value)

Unsafe version of angleLeft.

public static float
nangleRight(long struct)

Unsafe version of angleRight.

public static void
nangleRight(long struct, float value)

Unsafe version of angleRight.

public static float
nangleUp(long struct)

Unsafe version of angleUp.

public static void
nangleUp(long struct, float value)

Unsafe version of angleUp.

public XrFovf
set(float angleLeft, float angleRight, float angleUp, float angleDown)

Initializes this struct with the specified values.

public XrFovf

Returns:

this struct
set
(XrFovf
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

ANGLEDOWNback to summary
public static final int ANGLEDOWN

The struct member offsets.

ANGLELEFTback to summary
public static final int ANGLELEFT

The struct member offsets.

ANGLERIGHTback to summary
public static final int ANGLERIGHT

The struct member offsets.

ANGLEUPback to summary
public static final int ANGLEUP

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

XrFovfback to summary
protected XrFovf(long address, ByteBuffer container)
XrFovfback to summary
public XrFovf(ByteBuffer container)

Creates a XrFovf instance at the current position of the specified ByteBuffer container. 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

angleDownback to summary
public float angleDown()

the angle of the bottom part of the field of view. For a symmetric field of view this value is negative.

angleDownback to summary
public XrFovf angleDown(float value)

Sets the specified value to the angleDown field.

angleLeftback to summary
public float angleLeft()

the angle of the left side of the field of view. For a symmetric field of view this value is negative.

angleLeftback to summary
public XrFovf angleLeft(float value)

Sets the specified value to the angleLeft field.

angleRightback to summary
public float angleRight()

the angle of the right side of the field of view.

angleRightback to summary
public XrFovf angleRight(float value)

Sets the specified value to the angleRight field.

angleUpback to summary
public float angleUp()

the angle of the top part of the field of view.

angleUpback to summary
public XrFovf angleUp(float value)

Sets the specified value to the angleUp field.

callocback to summary
public static XrFovf calloc()

Returns a new XrFovf instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static XrFovf.Buffer calloc(int capacity)

Returns a new XrFovf.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static XrFovf calloc(MemoryStack stack)

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

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static XrFovf.Buffer calloc(int capacity, MemoryStack stack)

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected XrFovf create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static XrFovf create()

Returns a new XrFovf instance allocated with BufferUtils.

createback to summary
public static XrFovf create(long address)

Returns a new XrFovf instance for the specified memory address.

createback to summary
public static XrFovf.Buffer create(int capacity)

Returns a new XrFovf.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static XrFovf.Buffer create(long address, int capacity)

Create a XrFovf.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static XrFovf createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static XrFovf.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static XrFovf malloc()

Returns a new XrFovf instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static XrFovf.Buffer malloc(int capacity)

Returns a new XrFovf.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static XrFovf malloc(MemoryStack stack)

Returns a new XrFovf instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static XrFovf.Buffer malloc(int capacity, MemoryStack stack)

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nangleDownback to summary
public static float nangleDown(long struct)

Unsafe version of angleDown.

nangleDownback to summary
public static void nangleDown(long struct, float value)

Unsafe version of angleDown.

nangleLeftback to summary
public static float nangleLeft(long struct)

Unsafe version of angleLeft.

nangleLeftback to summary
public static void nangleLeft(long struct, float value)

Unsafe version of angleLeft.

nangleRightback to summary
public static float nangleRight(long struct)

Unsafe version of angleRight.

nangleRightback to summary
public static void nangleRight(long struct, float value)

Unsafe version of angleRight.

nangleUpback to summary
public static float nangleUp(long struct)

Unsafe version of angleUp.

nangleUpback to summary
public static void nangleUp(long struct, float value)

Unsafe version of angleUp.

setback to summary
public XrFovf set(float angleLeft, float angleRight, float angleUp, float angleDown)

Initializes this struct with the specified values.

setback to summary
public XrFovf set(XrFovf src)

Copies the specified struct data to this struct.

Parameters
src:XrFovf

the source struct

Returns:XrFovf

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.openxr back to summary

public Class XrFovf.Buffer

extends StructBuffer<XrFovf, XrFovf.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of XrFovf structs.

Field Summary

Modifier and TypeField and Description
private static final XrFovf

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new XrFovf.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the value of the XrFovf#angleDown field.
angleDown
()

public XrFovf.Buffer
angleDown(float value)

Sets the specified value to the XrFovf#angleDown field.

public float

Returns:

the value of the XrFovf#angleLeft field.
angleLeft
()

public XrFovf.Buffer
angleLeft(float value)

Sets the specified value to the XrFovf#angleLeft field.

public float

Returns:

the value of the XrFovf#angleRight field.
angleRight
()

public XrFovf.Buffer
angleRight(float value)

Sets the specified value to the XrFovf#angleRight field.

public float

Returns:

the value of the XrFovf#angleUp field.
angleUp
()

public XrFovf.Buffer
angleUp(float value)

Sets the specified value to the XrFovf#angleUp field.

protected XrFovf
protected XrFovf.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final XrFovf ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new XrFovf.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by XrFovf#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

angleDownback to summary
public float angleDown()
Returns:float

the value of the XrFovf#angleDown field.

angleDownback to summary
public XrFovf.Buffer angleDown(float value)

Sets the specified value to the XrFovf#angleDown field.

angleLeftback to summary
public float angleLeft()
Returns:float

the value of the XrFovf#angleLeft field.

angleLeftback to summary
public XrFovf.Buffer angleLeft(float value)

Sets the specified value to the XrFovf#angleLeft field.

angleRightback to summary
public float angleRight()
Returns:float

the value of the XrFovf#angleRight field.

angleRightback to summary
public XrFovf.Buffer angleRight(float value)

Sets the specified value to the XrFovf#angleRight field.

angleUpback to summary
public float angleUp()
Returns:float

the value of the XrFovf#angleUp field.

angleUpback to summary
public XrFovf.Buffer angleUp(float value)

Sets the specified value to the XrFovf#angleUp field.

getElementFactoryback to summary
protected XrFovf getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
selfback to summary
protected XrFovf.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override