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.Typemust beOVR.ovrLayerType_EyeFov.ColorTexture–ovrTextureSwapChainsfor 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 {ovrLayerHeaderHeader; 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 classOVRLayerEyeFov.BufferAn array ofOVRLayerEyeFovstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aOVRLayerEyeFovinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static OVRLayerEyeFovcalloc()Returns a newOVRLayerEyeFovinstance allocated withmemCalloc.static OVRLayerEyeFov.Buffercalloc(int capacity)Returns a newOVRLayerEyeFov.Bufferinstance allocated withmemCalloc.static OVRLayerEyeFovcallocStack()Returns a newOVRLayerEyeFovinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerEyeFov.BuffercallocStack(int capacity)Returns a newOVRLayerEyeFov.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerEyeFov.BuffercallocStack(int capacity, MemoryStack stack)Returns a newOVRLayerEyeFov.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerEyeFovcallocStack(MemoryStack stack)Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.PointerBufferColorTexture()Returns aPointerBufferview of theColorTexturefield.longColorTexture(int index)Returns the value at the specified index of theColorTexturefield.OVRLayerEyeFovColorTexture(int index, long value)Sets the specified value at the specified index of theColorTexturefield.OVRLayerEyeFovColorTexture(PointerBuffer value)Copies the specifiedPointerBufferto theColorTexturefield.static OVRLayerEyeFovcreate()Returns a newOVRLayerEyeFovinstance allocated withBufferUtils.static OVRLayerEyeFov.Buffercreate(int capacity)Returns a newOVRLayerEyeFov.Bufferinstance allocated withBufferUtils.static OVRLayerEyeFovcreate(long address)Returns a newOVRLayerEyeFovinstance for the specified memory address ornullif the address isNULL.static OVRLayerEyeFov.Buffercreate(long address, int capacity)Create aOVRLayerEyeFov.Bufferinstance at the specified memory.OVRFovPort.BufferFov()Returns aOVRFovPort.Buffer view of theFovfield.OVRFovPortFov(int index)Returns aOVRFovPortview of the struct at the specified index of theFovfield.OVRLayerEyeFovFov(int index, OVRFovPort value)Copies the specifiedOVRFovPortat the specified index of theFovfield.OVRLayerEyeFovFov(OVRFovPort.Buffer value)Copies the specifiedOVRFovPort.Bufferto theFovfield.OVRLayerHeaderHeader()Returns aOVRLayerHeaderview of theHeaderfield.OVRLayerEyeFovHeader(OVRLayerHeader value)Copies the specifiedOVRLayerHeaderto theHeaderfield.static OVRLayerEyeFovmalloc()Returns a newOVRLayerEyeFovinstance allocated withmemAlloc.static OVRLayerEyeFov.Buffermalloc(int capacity)Returns a newOVRLayerEyeFov.Bufferinstance allocated withmemAlloc.static OVRLayerEyeFovmallocStack()Returns a newOVRLayerEyeFovinstance allocated on the thread-localMemoryStack.static OVRLayerEyeFov.BuffermallocStack(int capacity)Returns a newOVRLayerEyeFov.Bufferinstance allocated on the thread-localMemoryStack.static OVRLayerEyeFov.BuffermallocStack(int capacity, MemoryStack stack)Returns a newOVRLayerEyeFov.Bufferinstance allocated on the specifiedMemoryStack.static OVRLayerEyeFovmallocStack(MemoryStack stack)Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStack.OVRLayerEyeFovnset(long struct)Unsafe version ofset.OVRPosef.BufferRenderPose()Returns aOVRPosef.Buffer view of theRenderPosefield.OVRPosefRenderPose(int index)Returns aOVRPosefview of the struct at the specified index of theRenderPosefield.OVRLayerEyeFovRenderPose(int index, OVRPosef value)Copies the specifiedOVRPosefat the specified index of theRenderPosefield.OVRLayerEyeFovRenderPose(OVRPosef.Buffer value)Copies the specifiedOVRPosef.Bufferto theRenderPosefield.doubleSensorSampleTime()Returns the value of theSensorSampleTimefield.OVRLayerEyeFovSensorSampleTime(double value)Sets the specified value to theSensorSampleTimefield.OVRLayerEyeFovset(OVRLayerEyeFov src)Copies the specified struct data to this struct.OVRLayerEyeFovset(OVRLayerHeader Header, PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime)Initializes this struct with the specified values.intsizeof()Returns thesizeof(struct).static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsOVRLayerEyeFov.validate(long)for each struct contained in the specified struct array.OVRRecti.BufferViewport()Returns aOVRRecti.Buffer view of theViewportfield.OVRRectiViewport(int index)Returns aOVRRectiview of the struct at the specified index of theViewportfield.OVRLayerEyeFovViewport(int index, OVRRecti value)Copies the specifiedOVRRectiat the specified index of theViewportfield.OVRLayerEyeFovViewport(OVRRecti.Buffer value)Copies the specifiedOVRRecti.Bufferto theViewportfield.-
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 aOVRLayerEyeFovinstance 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()
Description copied from class:StructReturns thesizeof(struct).
-
Header
public OVRLayerHeader Header()
Returns aOVRLayerHeaderview of theHeaderfield.
-
ColorTexture
public PointerBuffer ColorTexture()
Returns aPointerBufferview of theColorTexturefield.
-
ColorTexture
public long ColorTexture(int index)
Returns the value at the specified index of theColorTexturefield.
-
Viewport
public OVRRecti.Buffer Viewport()
Returns aOVRRecti.Buffer view of theViewportfield.
-
Viewport
public OVRRecti Viewport(int index)
Returns aOVRRectiview of the struct at the specified index of theViewportfield.
-
Fov
public OVRFovPort.Buffer Fov()
Returns aOVRFovPort.Buffer view of theFovfield.
-
Fov
public OVRFovPort Fov(int index)
Returns aOVRFovPortview of the struct at the specified index of theFovfield.
-
RenderPose
public OVRPosef.Buffer RenderPose()
Returns aOVRPosef.Buffer view of theRenderPosefield.
-
RenderPose
public OVRPosef RenderPose(int index)
Returns aOVRPosefview of the struct at the specified index of theRenderPosefield.
-
SensorSampleTime
public double SensorSampleTime()
Returns the value of theSensorSampleTimefield.
-
Header
public OVRLayerEyeFov Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeaderto theHeaderfield.
-
ColorTexture
public OVRLayerEyeFov ColorTexture(PointerBuffer value)
Copies the specifiedPointerBufferto theColorTexturefield.
-
ColorTexture
public OVRLayerEyeFov ColorTexture(int index, long value)
Sets the specified value at the specified index of theColorTexturefield.
-
Viewport
public OVRLayerEyeFov Viewport(OVRRecti.Buffer value)
Copies the specifiedOVRRecti.Bufferto theViewportfield.
-
Viewport
public OVRLayerEyeFov Viewport(int index, OVRRecti value)
Copies the specifiedOVRRectiat the specified index of theViewportfield.
-
Fov
public OVRLayerEyeFov Fov(OVRFovPort.Buffer value)
Copies the specifiedOVRFovPort.Bufferto theFovfield.
-
Fov
public OVRLayerEyeFov Fov(int index, OVRFovPort value)
Copies the specifiedOVRFovPortat the specified index of theFovfield.
-
RenderPose
public OVRLayerEyeFov RenderPose(OVRPosef.Buffer value)
Copies the specifiedOVRPosef.Bufferto theRenderPosefield.
-
RenderPose
public OVRLayerEyeFov RenderPose(int index, OVRPosef value)
Copies the specifiedOVRPosefat the specified index of theRenderPosefield.
-
SensorSampleTime
public OVRLayerEyeFov SensorSampleTime(double value)
Sets the specified value to theSensorSampleTimefield.
-
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 newOVRLayerEyeFovinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRLayerEyeFov calloc()
Returns a newOVRLayerEyeFovinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRLayerEyeFov create()
Returns a newOVRLayerEyeFovinstance allocated withBufferUtils.
-
create
public static OVRLayerEyeFov create(long address)
Returns a newOVRLayerEyeFovinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static OVRLayerEyeFov.Buffer malloc(int capacity)
Returns a newOVRLayerEyeFov.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRLayerEyeFov.Buffer calloc(int capacity)
Returns a newOVRLayerEyeFov.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerEyeFov.Buffer create(int capacity)
Returns a newOVRLayerEyeFov.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerEyeFov.Buffer create(long address, int capacity)
Create aOVRLayerEyeFov.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static OVRLayerEyeFov mallocStack()
Returns a newOVRLayerEyeFovinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRLayerEyeFov callocStack()
Returns a newOVRLayerEyeFovinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRLayerEyeFov mallocStack(MemoryStack stack)
Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRLayerEyeFov callocStack(MemoryStack stack)
Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRLayerEyeFov.Buffer callocStack(int capacity)
Returns a newOVRLayerEyeFov.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static OVRLayerEyeFov.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newOVRLayerEyeFov.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-