Package org.lwjgl.ovr
Class OVRFovPort
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRFovPort
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class OVRFovPort extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
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) }
Member documentation
UpTan
– tangent of the angle between the viewing vector and top edge of the FOVDownTan
– tangent of the angle between the viewing vector and bottom edge of the FOVLeftTan
– tangent of the angle between the viewing vector and left edge of the FOVRightTan
– tangent of the angle between the viewing vector and right edge of the FOV
Layout
struct ovrFovPort { float UpTan; float DownTan; float LeftTan; float RightTan; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OVRFovPort.Buffer
An array ofOVRFovPort
structs.
-
Constructor Summary
Constructors Constructor Description OVRFovPort(java.nio.ByteBuffer container)
Creates aOVRFovPort
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OVRFovPort
calloc()
Returns a newOVRFovPort
instance allocated withmemCalloc
.static OVRFovPort.Buffer
calloc(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated withmemCalloc
.static OVRFovPort
callocStack()
Returns a newOVRFovPort
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRFovPort.Buffer
callocStack(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRFovPort.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRFovPort
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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()
Returns the value of theDownTan
field.OVRFovPort
DownTan(float value)
Sets the specified value to theDownTan
field.float
LeftTan()
Returns the value of theLeftTan
field.OVRFovPort
LeftTan(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
mallocStack()
Returns a newOVRFovPort
instance allocated on the thread-localMemoryStack
.static OVRFovPort.Buffer
mallocStack(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated on the thread-localMemoryStack
.static OVRFovPort.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
.static OVRFovPort
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
.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()
Returns the value of theRightTan
field.OVRFovPort
RightTan(float value)
Sets the specified value to theRightTan
field.OVRFovPort
set(float UpTan, float DownTan, float LeftTan, float RightTan)
Initializes this struct with the specified values.OVRFovPort
set(OVRFovPort src)
Copies the specified struct data to this struct.int
sizeof()
float
UpTan()
Returns the value of theUpTan
field.OVRFovPort
UpTan(float value)
Sets the specified value to theUpTan
field.
-
-
-
Constructor Detail
-
OVRFovPort
public OVRFovPort(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
UpTan
public float UpTan()
Returns the value of theUpTan
field.
-
DownTan
public float DownTan()
Returns the value of theDownTan
field.
-
LeftTan
public float LeftTan()
Returns the value of theLeftTan
field.
-
RightTan
public float RightTan()
Returns the value of theRightTan
field.
-
UpTan
public OVRFovPort UpTan(float value)
Sets the specified value to theUpTan
field.
-
DownTan
public OVRFovPort DownTan(float value)
Sets the specified value to theDownTan
field.
-
LeftTan
public OVRFovPort LeftTan(float value)
Sets the specified value to theLeftTan
field.
-
RightTan
public OVRFovPort RightTan(float value)
Sets the specified value to theRightTan
field.
-
set
public OVRFovPort set(float UpTan, float DownTan, float LeftTan, float RightTan)
Initializes this struct with the specified values.
-
set
public OVRFovPort set(OVRFovPort src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static OVRFovPort malloc()
Returns a newOVRFovPort
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OVRFovPort calloc()
Returns a newOVRFovPort
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OVRFovPort create()
Returns a newOVRFovPort
instance allocated withBufferUtils
.
-
create
public static OVRFovPort create(long address)
Returns a newOVRFovPort
instance for the specified memory address.
-
createSafe
@Nullable public static OVRFovPort createSafe(long address)
-
malloc
public static OVRFovPort.Buffer malloc(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static OVRFovPort.Buffer calloc(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRFovPort.Buffer create(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRFovPort.Buffer create(long address, int capacity)
Create aOVRFovPort.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static OVRFovPort.Buffer createSafe(long address, int capacity)
-
mallocStack
public static OVRFovPort mallocStack()
Returns a newOVRFovPort
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static OVRFovPort callocStack()
Returns a newOVRFovPort
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static OVRFovPort mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRFovPort callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static OVRFovPort.Buffer mallocStack(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static OVRFovPort.Buffer callocStack(int capacity)
Returns a newOVRFovPort.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static OVRFovPort.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static OVRFovPort.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRFovPort.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
.
-
-