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,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OVRLayerEyeFov extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDescribes a layer that specifies a monoscopic or stereoscopic view. This is the kind of layer that's typically used as layer 0 toSubmitFrame, as it is the kind of layer used to render a 3D stereoscopic view.Layout
struct ovrLayerEyeFov {ovrLayerHeaderHeader(); ovrTextureSwapChainColorTexture()[ovrEye_Count];ovrRectiViewport()[ovrEye_Count];ovrFovPortFov()[ovrEye_Count];ovrPosefRenderPose()[ovrEye_Count]; doubleSensorSampleTime(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOVRLayerEyeFov.BufferAn array ofOVRLayerEyeFovstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCOLORTEXTURE
FOV
HEADER
RENDERPOSE
SENSORSAMPLETIMEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intVIEWPORTThe struct member offsets.
-
Constructor Summary
Constructors Constructor 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 Deprecated Methods Modifier and Type Method Description static OVRLayerEyeFovcalloc()Returns a newOVRLayerEyeFovinstance allocated withmemCalloc.static OVRLayerEyeFov.Buffercalloc(int capacity)Returns a newOVRLayerEyeFov.Bufferinstance allocated withmemCalloc.static OVRLayerEyeFov.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFov.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerEyeFovcalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerEyeFovcallocStack()Deprecated.static OVRLayerEyeFov.BuffercallocStack(int capacity)Deprecated.static OVRLayerEyeFov.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRLayerEyeFovcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.org.lwjgl.PointerBufferColorTexture()ovrTextureSwapChainsfor the left and right eye respectively.longColorTexture(int index)ovrTextureSwapChainsfor the left and right eye respectively.OVRLayerEyeFovColorTexture(int index, long value)Sets the specified value at the specified index of theColorTexture()field.OVRLayerEyeFovColorTexture(org.lwjgl.PointerBuffer value)Copies the specifiedPointerBufferto theColorTexture()field.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.static OVRLayerEyeFov.Buffercreate(long address, int capacity)Create aOVRLayerEyeFov.Bufferinstance at the specified memory.static OVRLayerEyeFovcreateSafe(long address)static OVRLayerEyeFov.BuffercreateSafe(long address, int capacity)OVRFovPort.BufferFov()the viewport field of viewOVRFovPortFov(int index)the viewport field of viewOVRLayerEyeFovFov(int index, java.util.function.Consumer<OVRFovPort> consumer)OVRLayerEyeFovFov(int index, OVRFovPort value)Copies the specifiedOVRFovPortat the specified index of theFov()field.OVRLayerEyeFovFov(java.util.function.Consumer<OVRFovPort.Buffer> consumer)Passes theFov()field to the specifiedConsumer.OVRLayerEyeFovFov(OVRFovPort.Buffer value)Copies the specifiedOVRFovPort.Bufferto theFov()field.OVRLayerHeaderHeader()Header.Typemust beLayerType_EyeFovOVRLayerEyeFovHeader(java.util.function.Consumer<OVRLayerHeader> consumer)Passes theHeader()field to the specifiedConsumer.OVRLayerEyeFovHeader(OVRLayerHeader value)Copies the specifiedOVRLayerHeaderto theHeader()field.static OVRLayerEyeFovmalloc()Returns a newOVRLayerEyeFovinstance allocated withmemAlloc.static OVRLayerEyeFov.Buffermalloc(int capacity)Returns a newOVRLayerEyeFov.Bufferinstance allocated withmemAlloc.static OVRLayerEyeFov.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFov.Bufferinstance allocated on the specifiedMemoryStack.static OVRLayerEyeFovmalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStack.static OVRLayerEyeFovmallocStack()Deprecated.static OVRLayerEyeFov.BuffermallocStack(int capacity)Deprecated.static OVRLayerEyeFov.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRLayerEyeFovmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static org.lwjgl.PointerBuffernColorTexture(long struct)Unsafe version ofColorTexture().static longnColorTexture(long struct, int index)Unsafe version ofColorTexture.static voidnColorTexture(long struct, int index, long value)Unsafe version ofColorTexture.static voidnColorTexture(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofColorTexture.static OVRFovPort.BuffernFov(long struct)Unsafe version ofFov().static OVRFovPortnFov(long struct, int index)Unsafe version ofFov.static voidnFov(long struct, int index, OVRFovPort value)Unsafe version ofFov.static voidnFov(long struct, OVRFovPort.Buffer value)Unsafe version ofFov.static OVRLayerHeadernHeader(long struct)Unsafe version ofHeader().static voidnHeader(long struct, OVRLayerHeader value)Unsafe version ofHeader.static OVRPosef.BuffernRenderPose(long struct)Unsafe version ofRenderPose().static OVRPosefnRenderPose(long struct, int index)Unsafe version ofRenderPose.static voidnRenderPose(long struct, int index, OVRPosef value)Unsafe version ofRenderPose.static voidnRenderPose(long struct, OVRPosef.Buffer value)Unsafe version ofRenderPose.static doublenSensorSampleTime(long struct)Unsafe version ofSensorSampleTime().static voidnSensorSampleTime(long struct, double value)Unsafe version ofSensorSampleTime.static OVRRecti.BuffernViewport(long struct)Unsafe version ofViewport().static OVRRectinViewport(long struct, int index)Unsafe version ofViewport.static voidnViewport(long struct, int index, OVRRecti value)Unsafe version ofViewport.static voidnViewport(long struct, OVRRecti.Buffer value)Unsafe version ofViewport.OVRPosef.BufferRenderPose()specifies the position and orientation of each eye view, with the position specified in meters.OVRPosefRenderPose(int index)specifies the position and orientation of each eye view, with the position specified in meters.OVRLayerEyeFovRenderPose(int index, java.util.function.Consumer<OVRPosef> consumer)OVRLayerEyeFovRenderPose(int index, OVRPosef value)Copies the specifiedOVRPosefat the specified index of theRenderPose()field.OVRLayerEyeFovRenderPose(java.util.function.Consumer<OVRPosef.Buffer> consumer)Passes theRenderPose()field to the specifiedConsumer.OVRLayerEyeFovRenderPose(OVRPosef.Buffer value)Copies the specifiedOVRPosef.Bufferto theRenderPose()field.doubleSensorSampleTime()specifies the timestamp when the sourceOVRPosef(used in calculating RenderPose) was sampled from the SDK.OVRLayerEyeFovSensorSampleTime(double value)Sets the specified value to theSensorSampleTime()field.OVRLayerEyeFovset(OVRLayerEyeFov src)Copies the specified struct data to this struct.OVRLayerEyeFovset(OVRLayerHeader Header, org.lwjgl.PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime)Initializes this struct with the specified values.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.OVRRecti.BufferViewport()specifies the ColorTexture sub-rect UV coordinates.OVRRectiViewport(int index)specifies the ColorTexture sub-rect UV coordinates.OVRLayerEyeFovViewport(int index, java.util.function.Consumer<OVRRecti> consumer)OVRLayerEyeFovViewport(int index, OVRRecti value)Copies the specifiedOVRRectiat the specified index of theViewport()field.OVRLayerEyeFovViewport(java.util.function.Consumer<OVRRecti.Buffer> consumer)Passes theViewport()field to the specifiedConsumer.OVRLayerEyeFovViewport(OVRRecti.Buffer value)Copies the specifiedOVRRecti.Bufferto theViewport()field.
-
-
-
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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
Header
public OVRLayerHeader Header()
Header.Typemust beLayerType_EyeFov
-
ColorTexture
public org.lwjgl.PointerBuffer ColorTexture() public long ColorTexture(int index)
ovrTextureSwapChainsfor the left and right eye respectively. The second one of which can beNULL.
-
Viewport
public OVRRecti.Buffer Viewport() public OVRRecti Viewport(int index)
specifies the ColorTexture sub-rect UV coordinates. BothViewport[0]andViewport[1]must be valid.
-
Fov
public OVRFovPort.Buffer Fov() public OVRFovPort Fov(int index)
the viewport field of view
-
RenderPose
public OVRPosef.Buffer RenderPose() public OVRPosef RenderPose(int index)
specifies the position and orientation of each eye view, with the position specified in meters. RenderPose will typically be the value returned from_CalcEyePoses, but can be different in special cases if a different head pose is used for rendering.
-
SensorSampleTime
public double SensorSampleTime()
specifies the timestamp when the sourceOVRPosef(used in calculating RenderPose) was sampled from the SDK. Typically retrieved by callingGetTimeInSecondsaround the instant the application callsGetTrackingState. The main purpose for this is to accurately track app tracking latency.
-
Header
public OVRLayerEyeFov Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeaderto theHeader()field.
-
Header
public OVRLayerEyeFov Header(java.util.function.Consumer<OVRLayerHeader> consumer)
Passes theHeader()field to the specifiedConsumer.
-
ColorTexture
public OVRLayerEyeFov ColorTexture(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBufferto 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.Bufferto theViewport()field.
-
Viewport
public OVRLayerEyeFov Viewport(int index, OVRRecti value)
Copies the specifiedOVRRectiat the specified index of theViewport()field.
-
Viewport
public OVRLayerEyeFov Viewport(java.util.function.Consumer<OVRRecti.Buffer> consumer)
Passes theViewport()field to the specifiedConsumer.
-
Viewport
public OVRLayerEyeFov Viewport(int index, java.util.function.Consumer<OVRRecti> consumer)
-
Fov
public OVRLayerEyeFov Fov(OVRFovPort.Buffer value)
Copies the specifiedOVRFovPort.Bufferto theFov()field.
-
Fov
public OVRLayerEyeFov Fov(int index, OVRFovPort value)
Copies the specifiedOVRFovPortat the specified index of theFov()field.
-
Fov
public OVRLayerEyeFov Fov(java.util.function.Consumer<OVRFovPort.Buffer> consumer)
Passes theFov()field to the specifiedConsumer.
-
Fov
public OVRLayerEyeFov Fov(int index, java.util.function.Consumer<OVRFovPort> consumer)
-
RenderPose
public OVRLayerEyeFov RenderPose(OVRPosef.Buffer value)
Copies the specifiedOVRPosef.Bufferto theRenderPose()field.
-
RenderPose
public OVRLayerEyeFov RenderPose(int index, OVRPosef value)
Copies the specifiedOVRPosefat the specified index of theRenderPose()field.
-
RenderPose
public OVRLayerEyeFov RenderPose(java.util.function.Consumer<OVRPosef.Buffer> consumer)
Passes theRenderPose()field to the specifiedConsumer.
-
RenderPose
public OVRLayerEyeFov RenderPose(int index, java.util.function.Consumer<OVRPosef> consumer)
-
SensorSampleTime
public OVRLayerEyeFov SensorSampleTime(double value)
Sets the specified value to theSensorSampleTime()field.
-
set
public OVRLayerEyeFov set(OVRLayerHeader Header, org.lwjgl.PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime)
Initializes this struct with the specified values.
-
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.
-
createSafe
@Nullable public static OVRLayerEyeFov createSafe(long address)
-
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
-
createSafe
@Nullable public static OVRLayerEyeFov.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static OVRLayerEyeFov mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRLayerEyeFov callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRLayerEyeFov mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRLayerEyeFov callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRLayerEyeFov.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static OVRLayerEyeFov.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRLayerEyeFov.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static OVRLayerEyeFov.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static OVRLayerEyeFov malloc(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static OVRLayerEyeFov calloc(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerEyeFovinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static OVRLayerEyeFov.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerEyeFov.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static OVRLayerEyeFov.Buffer calloc(int capacity, org.lwjgl.system.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
-
nHeader
public static OVRLayerHeader nHeader(long struct)
Unsafe version ofHeader().
-
nColorTexture
public static org.lwjgl.PointerBuffer nColorTexture(long struct)
Unsafe version ofColorTexture().
-
nColorTexture
public static long nColorTexture(long struct, int index)Unsafe version ofColorTexture.
-
nViewport
public static OVRRecti.Buffer nViewport(long struct)
Unsafe version ofViewport().
-
nFov
public static OVRFovPort.Buffer nFov(long struct)
Unsafe version ofFov().
-
nFov
public static OVRFovPort nFov(long struct, int index)
Unsafe version ofFov.
-
nRenderPose
public static OVRPosef.Buffer nRenderPose(long struct)
Unsafe version ofRenderPose().
-
nRenderPose
public static OVRPosef nRenderPose(long struct, int index)
Unsafe version ofRenderPose.
-
nSensorSampleTime
public static double nSensorSampleTime(long struct)
Unsafe version ofSensorSampleTime().
-
nHeader
public static void nHeader(long struct, OVRLayerHeader value)Unsafe version ofHeader.
-
nColorTexture
public static void nColorTexture(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofColorTexture.
-
nColorTexture
public static void nColorTexture(long struct, int index, long value)Unsafe version ofColorTexture.
-
nViewport
public static void nViewport(long struct, OVRRecti.Buffer value)Unsafe version ofViewport.
-
nViewport
public static void nViewport(long struct, int index, OVRRecti value)Unsafe version ofViewport.
-
nFov
public static void nFov(long struct, OVRFovPort.Buffer value)Unsafe version ofFov.
-
nFov
public static void nFov(long struct, int index, OVRFovPort value)Unsafe version ofFov.
-
nRenderPose
public static void nRenderPose(long struct, OVRPosef.Buffer value)Unsafe version ofRenderPose.
-
nRenderPose
public static void nRenderPose(long struct, int index, OVRPosef value)Unsafe version ofRenderPose.
-
nSensorSampleTime
public static void nSensorSampleTime(long struct, double value)Unsafe version ofSensorSampleTime.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-