Package org.lwjgl.ovr
Class OVRFovPort
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Field Of View (FOV) in tangent of the angle units. As an example, for a standard 90 degree vertical FOV, we would have:
{ UpTan = tan(90 degrees / 2), DownTan = tan(90 degrees / 2) }
Layout
struct ovrFovPort {
float UpTan()
;
float DownTan()
;
float LeftTan()
;
float RightTan()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionOVRFovPort
(ByteBuffer container) Creates aOVRFovPort
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRFovPort
calloc()
Returns a newOVRFovPort
instance allocated withmemCalloc
.static OVRFovPort.Buffer
calloc
(int capacity) Returns a newOVRFovPort.Buffer
instance allocated withmemCalloc
.static OVRFovPort.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRFovPort
calloc
(MemoryStack stack) Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRFovPort
Deprecated.static OVRFovPort.Buffer
callocStack
(int capacity) Deprecated.static OVRFovPort.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static OVRFovPort
callocStack
(MemoryStack stack) Deprecated.static OVRFovPort
create()
Returns a newOVRFovPort
instance allocated withBufferUtils
.static OVRFovPort.Buffer
create
(int capacity) Returns a newOVRFovPort.Buffer
instance allocated withBufferUtils
.static OVRFovPort
create
(long address) Returns a newOVRFovPort
instance for the specified memory address.static OVRFovPort.Buffer
create
(long address, int capacity) Create aOVRFovPort.Buffer
instance at the specified memory.static OVRFovPort
createSafe
(long address) static OVRFovPort.Buffer
createSafe
(long address, int capacity) float
DownTan()
tangent of the angle between the viewing vector and bottom edge of the FOVDownTan
(float value) Sets the specified value to theDownTan()
field.float
LeftTan()
tangent of the angle between the viewing vector and left edge of the FOVLeftTan
(float value) Sets the specified value to theLeftTan()
field.static OVRFovPort
malloc()
Returns a newOVRFovPort
instance allocated withmemAlloc
.static OVRFovPort.Buffer
malloc
(int capacity) Returns a newOVRFovPort.Buffer
instance allocated withmemAlloc
.static OVRFovPort.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
.static OVRFovPort
malloc
(MemoryStack stack) Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
.static OVRFovPort
Deprecated.static OVRFovPort.Buffer
mallocStack
(int capacity) Deprecated.static OVRFovPort.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static OVRFovPort
mallocStack
(MemoryStack stack) Deprecated.static float
nDownTan
(long struct) Unsafe version ofDownTan()
.static void
nDownTan
(long struct, float value) Unsafe version ofDownTan
.static float
nLeftTan
(long struct) Unsafe version ofLeftTan()
.static void
nLeftTan
(long struct, float value) Unsafe version ofLeftTan
.static float
nRightTan
(long struct) Unsafe version ofRightTan()
.static void
nRightTan
(long struct, float value) Unsafe version ofRightTan
.static float
nUpTan
(long struct) Unsafe version ofUpTan()
.static void
nUpTan
(long struct, float value) Unsafe version ofUpTan
.float
RightTan()
tangent of the angle between the viewing vector and right edge of the FOVRightTan
(float value) Sets the specified value to theRightTan()
field.set
(float UpTan, float DownTan, float LeftTan, float RightTan) Initializes this struct with the specified values.set
(OVRFovPort src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.float
UpTan()
tangent of the angle between the viewing vector and top edge of the FOVUpTan
(float value) Sets the specified value to theUpTan()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
UPTAN
public static final int UPTANThe struct member offsets. -
DOWNTAN
public static final int DOWNTANThe struct member offsets. -
LEFTTAN
public static final int LEFTTANThe struct member offsets. -
RIGHTTAN
public static final int RIGHTTANThe struct member offsets.
-
-
Constructor Details
-
OVRFovPort
Creates aOVRFovPort
instance at the current position of the specifiedByteBuffer
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<OVRFovPort>
-
UpTan
public float UpTan()tangent of the angle between the viewing vector and top edge of the FOV -
DownTan
public float DownTan()tangent of the angle between the viewing vector and bottom edge of the FOV -
LeftTan
public float LeftTan()tangent of the angle between the viewing vector and left edge of the FOV -
RightTan
public float RightTan()tangent of the angle between the viewing vector and right edge of the FOV -
UpTan
Sets the specified value to theUpTan()
field. -
DownTan
Sets the specified value to theDownTan()
field. -
LeftTan
Sets the specified value to theLeftTan()
field. -
RightTan
Sets the specified value to theRightTan()
field. -
set
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 newOVRFovPort
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOVRFovPort
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOVRFovPort
instance allocated withBufferUtils
. -
create
Returns a newOVRFovPort
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRFovPort.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOVRFovPort.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOVRFovPort.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOVRFovPort.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nUpTan
public static float nUpTan(long struct) Unsafe version ofUpTan()
. -
nDownTan
public static float nDownTan(long struct) Unsafe version ofDownTan()
. -
nLeftTan
public static float nLeftTan(long struct) Unsafe version ofLeftTan()
. -
nRightTan
public static float nRightTan(long struct) Unsafe version ofRightTan()
. -
nUpTan
public static void nUpTan(long struct, float value) Unsafe version ofUpTan
. -
nDownTan
public static void nDownTan(long struct, float value) Unsafe version ofDownTan
. -
nLeftTan
public static void nLeftTan(long struct, float value) Unsafe version ofLeftTan
. -
nRightTan
public static void nRightTan(long struct, float value) Unsafe version ofRightTan
.
-