Package org.lwjgl.ovr
Class OVRLayerEyeFov
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRLayerEyeFov
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class OVRLayerEyeFov extends Struct
Describes a layer that specifies a monoscopic or stereoscopic view. This is the kind of layer that's typically used as layer 0 toOVR.ovr_SubmitFrame(long, long, org.lwjgl.ovr.OVRViewScaleDesc, org.lwjgl.PointerBuffer)
, as it is the kind of layer used to render a 3D stereoscopic view.Member documentation
Header
–Header.Type
must beOVR.ovrLayerType_EyeFov
.ColorTexture
–ovrTextureSwapChains
for the left and right eye respectively. The second one of which can beNULL
.Viewport
– specifies the ColorTexture sub-rect UV coordinates. BothViewport[0]
andViewport[1]
must be valid.Fov
– the viewport field of viewRenderPose
– specifies the position and orientation of each eye view, with the position specified in meters. RenderPose will typically be the value returned fromOVRUtil.ovr_CalcEyePoses(org.lwjgl.ovr.OVRPosef, org.lwjgl.ovr.OVRVector3f.Buffer, org.lwjgl.ovr.OVRPosef.Buffer)
, but can be different in special cases if a different head pose is used for rendering.SensorSampleTime
– specifies the timestamp when the sourceOVRPosef
(used in calculating RenderPose) was sampled from the SDK. Typically retrieved by callingOVR.ovr_GetTimeInSeconds()
around the instant the application callsOVR.ovr_GetTrackingState(long, double, boolean, org.lwjgl.ovr.OVRTrackingState)
. The main purpose for this is to accurately track app tracking latency.
Layout
struct ovrLayerEyeFov {
ovrLayerHeader
Header; ovrTextureSwapChain[2] ColorTexture;ovrRecti
[2] Viewport;ovrFovPort
[2] Fov;ovrPosef
[2] RenderPose; double SensorSampleTime; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
OVRLayerEyeFov.Buffer
An array ofOVRLayerEyeFov
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description OVRLayerEyeFov(java.nio.ByteBuffer container)
Creates aOVRLayerEyeFov
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static OVRLayerEyeFov
calloc()
Returns a newOVRLayerEyeFov
instance allocated withmemCalloc
.static OVRLayerEyeFov.Buffer
calloc(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated withmemCalloc
.static OVRLayerEyeFov
callocStack()
Returns a newOVRLayerEyeFov
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRLayerEyeFov.Buffer
callocStack(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRLayerEyeFov.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerEyeFov
callocStack(MemoryStack stack)
Returns a newOVRLayerEyeFov
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.PointerBuffer
ColorTexture()
Returns aPointerBuffer
view of theColorTexture
field.long
ColorTexture(int index)
Returns the value at the specified index of theColorTexture
field.OVRLayerEyeFov
ColorTexture(int index, long value)
Sets the specified value at the specified index of theColorTexture
field.OVRLayerEyeFov
ColorTexture(PointerBuffer value)
Copies the specifiedPointerBuffer
to theColorTexture
field.static OVRLayerEyeFov
create()
Returns a newOVRLayerEyeFov
instance allocated withBufferUtils
.static OVRLayerEyeFov.Buffer
create(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated withBufferUtils
.static OVRLayerEyeFov
create(long address)
Returns a newOVRLayerEyeFov
instance for the specified memory address ornull
if the address isNULL
.static OVRLayerEyeFov.Buffer
create(long address, int capacity)
Create aOVRLayerEyeFov.Buffer
instance at the specified memory.OVRFovPort.Buffer
Fov()
Returns aOVRFovPort
.Buffer view of theFov
field.OVRFovPort
Fov(int index)
Returns aOVRFovPort
view of the struct at the specified index of theFov
field.OVRLayerEyeFov
Fov(int index, OVRFovPort value)
Copies the specifiedOVRFovPort
at the specified index of theFov
field.OVRLayerEyeFov
Fov(OVRFovPort.Buffer value)
Copies the specifiedOVRFovPort.Buffer
to theFov
field.OVRLayerHeader
Header()
Returns aOVRLayerHeader
view of theHeader
field.OVRLayerEyeFov
Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeader
to theHeader
field.static OVRLayerEyeFov
malloc()
Returns a newOVRLayerEyeFov
instance allocated withmemAlloc
.static OVRLayerEyeFov.Buffer
malloc(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated withmemAlloc
.static OVRLayerEyeFov
mallocStack()
Returns a newOVRLayerEyeFov
instance allocated on the thread-localMemoryStack
.static OVRLayerEyeFov.Buffer
mallocStack(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the thread-localMemoryStack
.static OVRLayerEyeFov.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the specifiedMemoryStack
.static OVRLayerEyeFov
mallocStack(MemoryStack stack)
Returns a newOVRLayerEyeFov
instance allocated on the specifiedMemoryStack
.OVRLayerEyeFov
nset(long struct)
Unsafe version ofset
.OVRPosef.Buffer
RenderPose()
Returns aOVRPosef
.Buffer view of theRenderPose
field.OVRPosef
RenderPose(int index)
Returns aOVRPosef
view of the struct at the specified index of theRenderPose
field.OVRLayerEyeFov
RenderPose(int index, OVRPosef value)
Copies the specifiedOVRPosef
at the specified index of theRenderPose
field.OVRLayerEyeFov
RenderPose(OVRPosef.Buffer value)
Copies the specifiedOVRPosef.Buffer
to theRenderPose
field.double
SensorSampleTime()
Returns the value of theSensorSampleTime
field.OVRLayerEyeFov
SensorSampleTime(double value)
Sets the specified value to theSensorSampleTime
field.OVRLayerEyeFov
set(OVRLayerEyeFov src)
Copies the specified struct data to this struct.OVRLayerEyeFov
set(OVRLayerHeader Header, PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime)
Initializes this struct with the specified values.int
sizeof()
Returns thesizeof(struct)
.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsOVRLayerEyeFov.validate(long)
for each struct contained in the specified struct array.OVRRecti.Buffer
Viewport()
Returns aOVRRecti
.Buffer view of theViewport
field.OVRRecti
Viewport(int index)
Returns aOVRRecti
view of the struct at the specified index of theViewport
field.OVRLayerEyeFov
Viewport(int index, OVRRecti value)
Copies the specifiedOVRRecti
at the specified index of theViewport
field.OVRLayerEyeFov
Viewport(OVRRecti.Buffer value)
Copies the specifiedOVRRecti.Buffer
to theViewport
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
OVRLayerEyeFov
public OVRLayerEyeFov(java.nio.ByteBuffer container)
Creates aOVRLayerEyeFov
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
Header
public OVRLayerHeader Header()
Returns aOVRLayerHeader
view of theHeader
field.
-
ColorTexture
public PointerBuffer ColorTexture()
Returns aPointerBuffer
view of theColorTexture
field.
-
ColorTexture
public long ColorTexture(int index)
Returns the value at the specified index of theColorTexture
field.
-
Viewport
public OVRRecti.Buffer Viewport()
Returns aOVRRecti
.Buffer view of theViewport
field.
-
Viewport
public OVRRecti Viewport(int index)
Returns aOVRRecti
view of the struct at the specified index of theViewport
field.
-
Fov
public OVRFovPort.Buffer Fov()
Returns aOVRFovPort
.Buffer view of theFov
field.
-
Fov
public OVRFovPort Fov(int index)
Returns aOVRFovPort
view of the struct at the specified index of theFov
field.
-
RenderPose
public OVRPosef.Buffer RenderPose()
Returns aOVRPosef
.Buffer view of theRenderPose
field.
-
RenderPose
public OVRPosef RenderPose(int index)
Returns aOVRPosef
view of the struct at the specified index of theRenderPose
field.
-
SensorSampleTime
public double SensorSampleTime()
Returns the value of theSensorSampleTime
field.
-
Header
public OVRLayerEyeFov Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeader
to theHeader
field.
-
ColorTexture
public OVRLayerEyeFov ColorTexture(PointerBuffer value)
Copies the specifiedPointerBuffer
to theColorTexture
field.
-
ColorTexture
public OVRLayerEyeFov ColorTexture(int index, long value)
Sets the specified value at the specified index of theColorTexture
field.
-
Viewport
public OVRLayerEyeFov Viewport(OVRRecti.Buffer value)
Copies the specifiedOVRRecti.Buffer
to theViewport
field.
-
Viewport
public OVRLayerEyeFov Viewport(int index, OVRRecti value)
Copies the specifiedOVRRecti
at the specified index of theViewport
field.
-
Fov
public OVRLayerEyeFov Fov(OVRFovPort.Buffer value)
Copies the specifiedOVRFovPort.Buffer
to theFov
field.
-
Fov
public OVRLayerEyeFov Fov(int index, OVRFovPort value)
Copies the specifiedOVRFovPort
at the specified index of theFov
field.
-
RenderPose
public OVRLayerEyeFov RenderPose(OVRPosef.Buffer value)
Copies the specifiedOVRPosef.Buffer
to theRenderPose
field.
-
RenderPose
public OVRLayerEyeFov RenderPose(int index, OVRPosef value)
Copies the specifiedOVRPosef
at the specified index of theRenderPose
field.
-
SensorSampleTime
public OVRLayerEyeFov SensorSampleTime(double value)
Sets the specified value to theSensorSampleTime
field.
-
set
public OVRLayerEyeFov set(OVRLayerHeader Header, PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime)
Initializes this struct with the specified values.
-
nset
public OVRLayerEyeFov nset(long struct)
Unsafe version ofset
.
-
set
public OVRLayerEyeFov set(OVRLayerEyeFov src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static OVRLayerEyeFov malloc()
Returns a newOVRLayerEyeFov
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OVRLayerEyeFov calloc()
Returns a newOVRLayerEyeFov
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OVRLayerEyeFov create()
Returns a newOVRLayerEyeFov
instance allocated withBufferUtils
.
-
create
public static OVRLayerEyeFov create(long address)
Returns a newOVRLayerEyeFov
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static OVRLayerEyeFov.Buffer malloc(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static OVRLayerEyeFov.Buffer calloc(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRLayerEyeFov.Buffer create(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRLayerEyeFov.Buffer create(long address, int capacity)
Create aOVRLayerEyeFov.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static OVRLayerEyeFov mallocStack()
Returns a newOVRLayerEyeFov
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static OVRLayerEyeFov callocStack()
Returns a newOVRLayerEyeFov
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static OVRLayerEyeFov mallocStack(MemoryStack stack)
Returns a newOVRLayerEyeFov
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRLayerEyeFov callocStack(MemoryStack stack)
Returns a newOVRLayerEyeFov
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static OVRLayerEyeFov.Buffer mallocStack(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static OVRLayerEyeFov.Buffer callocStack(int capacity)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static OVRLayerEyeFov.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static OVRLayerEyeFov.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newOVRLayerEyeFov.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
CallsOVRLayerEyeFov.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-