Package org.lwjgl.ovr
Class OVRLayerEyeFovDepth
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRLayerEyeFovDepth
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class OVRLayerEyeFovDepth extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDescribes a layer that specifies a monoscopic or stereoscopic view, with depth textures in addition to color textures. This is typically used to support positional time warp. This struct is the same asOVRLayerEyeFov, but with the addition ofDepthTextureandProjectionDesc.ProjectionDesccan be created usingTimewarpProjectionDesc_FromProjection.Three options exist with respect to mono/stereo texture usage:
ColorTexture[0]andColorTexture[1]contain the left and right stereo renderings, respectively.Viewport[0]andViewport[1]refer toColorTexture[0]andColorTexture[1], respectively.ColorTexture[0]contains both the left and right renderings,ColorTexture[1]isNULL, andViewport[0]andViewport[1]refer to sub-rects withColorTexture[0].ColorTexture[0]contains a single monoscopic rendering, andViewport[0]andViewport[1]both refer to that rendering.
Member documentation
Header–Header.Typemust beLayerType_EyeFovDepthColorTexture–ovrTextureSwapChainsfor the left and right eye respectively. The second one of which can beNULLfor cases described above.Viewport– specifies theColorTexturesub-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 position specified in meters.RenderPosewill typically be the value returned from_CalcEyePoses, 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 calculatingRenderPose) 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.DepthTexture– depth texture for positional timewarp. Must map 1:1 to theColorTexture.ProjectionDesc– specifies how to convertDepthTextureinformation into meters
Layout
struct ovrLayerEyeFovDepth {ovrLayerHeaderHeader; ovrTextureSwapChain ColorTexture[ovrEye_Count];ovrRectiViewport[ovrEye_Count];ovrFovPortFov[ovrEye_Count];ovrPosefRenderPose[ovrEye_Count]; double SensorSampleTime; ovrTextureSwapChain DepthTexture[ovrEye_Count];ovrTimewarpProjectionDescProjectionDesc; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classOVRLayerEyeFovDepth.BufferAn array ofOVRLayerEyeFovDepthstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description OVRLayerEyeFovDepth(java.nio.ByteBuffer container)Creates aOVRLayerEyeFovDepthinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static OVRLayerEyeFovDepthcalloc()Returns a newOVRLayerEyeFovDepthinstance allocated withmemCalloc.static OVRLayerEyeFovDepth.Buffercalloc(int capacity)Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated withmemCalloc.static OVRLayerEyeFovDepthcallocStack()Returns a newOVRLayerEyeFovDepthinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerEyeFovDepth.BuffercallocStack(int capacity)Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerEyeFovDepth.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerEyeFovDepthcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFovDepthinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.org.lwjgl.PointerBufferColorTexture()Returns aPointerBufferview of theColorTexturefield.longColorTexture(int index)Returns the value at the specified index of theColorTexturefield.OVRLayerEyeFovDepthColorTexture(int index, long value)Sets the specified value at the specified index of theColorTexturefield.OVRLayerEyeFovDepthColorTexture(org.lwjgl.PointerBuffer value)Copies the specifiedPointerBufferto theColorTexturefield.static OVRLayerEyeFovDepthcreate()Returns a newOVRLayerEyeFovDepthinstance allocated withBufferUtils.static OVRLayerEyeFovDepth.Buffercreate(int capacity)Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated withBufferUtils.static OVRLayerEyeFovDepthcreate(long address)Returns a newOVRLayerEyeFovDepthinstance for the specified memory address.static OVRLayerEyeFovDepth.Buffercreate(long address, int capacity)Create aOVRLayerEyeFovDepth.Bufferinstance at the specified memory.static OVRLayerEyeFovDepthcreateSafe(long address)static OVRLayerEyeFovDepth.BuffercreateSafe(long address, int capacity)org.lwjgl.PointerBufferDepthTexture()Returns aPointerBufferview of theDepthTexturefield.longDepthTexture(int index)Returns the value at the specified index of theDepthTexturefield.OVRLayerEyeFovDepthDepthTexture(int index, long value)Sets the specified value at the specified index of theDepthTexturefield.OVRLayerEyeFovDepthDepthTexture(org.lwjgl.PointerBuffer value)Copies the specifiedPointerBufferto theDepthTexturefield.OVRFovPort.BufferFov()Returns aOVRFovPort.Buffer view of theFovfield.OVRFovPortFov(int index)Returns aOVRFovPortview of the struct at the specified index of theFovfield.OVRLayerEyeFovDepthFov(int index, OVRFovPort value)Copies the specifiedOVRFovPortat the specified index of theFovfield.OVRLayerEyeFovDepthFov(OVRFovPort.Buffer value)Copies the specifiedOVRFovPort.Bufferto theFovfield.OVRLayerHeaderHeader()Returns aOVRLayerHeaderview of theHeaderfield.OVRLayerEyeFovDepthHeader(OVRLayerHeader value)Copies the specifiedOVRLayerHeaderto theHeaderfield.static OVRLayerEyeFovDepthmalloc()Returns a newOVRLayerEyeFovDepthinstance allocated withmemAlloc.static OVRLayerEyeFovDepth.Buffermalloc(int capacity)Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated withmemAlloc.static OVRLayerEyeFovDepthmallocStack()Returns a newOVRLayerEyeFovDepthinstance allocated on the thread-localMemoryStack.static OVRLayerEyeFovDepth.BuffermallocStack(int capacity)Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated on the thread-localMemoryStack.static OVRLayerEyeFovDepth.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated on the specifiedMemoryStack.static OVRLayerEyeFovDepthmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerEyeFovDepthinstance allocated on the specifiedMemoryStack.OVRTimewarpProjectionDescProjectionDesc()Returns aOVRTimewarpProjectionDescview of theProjectionDescfield.OVRLayerEyeFovDepthProjectionDesc(OVRTimewarpProjectionDesc value)Copies the specifiedOVRTimewarpProjectionDescto theProjectionDescfield.OVRPosef.BufferRenderPose()Returns aOVRPosef.Buffer view of theRenderPosefield.OVRPosefRenderPose(int index)Returns aOVRPosefview of the struct at the specified index of theRenderPosefield.OVRLayerEyeFovDepthRenderPose(int index, OVRPosef value)Copies the specifiedOVRPosefat the specified index of theRenderPosefield.OVRLayerEyeFovDepthRenderPose(OVRPosef.Buffer value)Copies the specifiedOVRPosef.Bufferto theRenderPosefield.doubleSensorSampleTime()Returns the value of theSensorSampleTimefield.OVRLayerEyeFovDepthSensorSampleTime(double value)Sets the specified value to theSensorSampleTimefield.OVRLayerEyeFovDepthset(OVRLayerEyeFovDepth src)Copies the specified struct data to this struct.OVRLayerEyeFovDepthset(OVRLayerHeader Header, org.lwjgl.PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime, org.lwjgl.PointerBuffer DepthTexture, OVRTimewarpProjectionDesc ProjectionDesc)Initializes this struct with the specified values.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsOVRLayerEyeFovDepth.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.OVRLayerEyeFovDepthViewport(int index, OVRRecti value)Copies the specifiedOVRRectiat the specified index of theViewportfield.OVRLayerEyeFovDepthViewport(OVRRecti.Buffer value)Copies the specifiedOVRRecti.Bufferto theViewportfield.
-
-
-
Constructor Detail
-
OVRLayerEyeFovDepth
public OVRLayerEyeFovDepth(java.nio.ByteBuffer container)
Creates aOVRLayerEyeFovDepthinstance 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()
Returns aOVRLayerHeaderview of theHeaderfield.
-
ColorTexture
public org.lwjgl.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.
-
DepthTexture
public org.lwjgl.PointerBuffer DepthTexture()
Returns aPointerBufferview of theDepthTexturefield.
-
DepthTexture
public long DepthTexture(int index)
Returns the value at the specified index of theDepthTexturefield.
-
ProjectionDesc
public OVRTimewarpProjectionDesc ProjectionDesc()
Returns aOVRTimewarpProjectionDescview of theProjectionDescfield.
-
Header
public OVRLayerEyeFovDepth Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeaderto theHeaderfield.
-
ColorTexture
public OVRLayerEyeFovDepth ColorTexture(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBufferto theColorTexturefield.
-
ColorTexture
public OVRLayerEyeFovDepth ColorTexture(int index, long value)
Sets the specified value at the specified index of theColorTexturefield.
-
Viewport
public OVRLayerEyeFovDepth Viewport(OVRRecti.Buffer value)
Copies the specifiedOVRRecti.Bufferto theViewportfield.
-
Viewport
public OVRLayerEyeFovDepth Viewport(int index, OVRRecti value)
Copies the specifiedOVRRectiat the specified index of theViewportfield.
-
Fov
public OVRLayerEyeFovDepth Fov(OVRFovPort.Buffer value)
Copies the specifiedOVRFovPort.Bufferto theFovfield.
-
Fov
public OVRLayerEyeFovDepth Fov(int index, OVRFovPort value)
Copies the specifiedOVRFovPortat the specified index of theFovfield.
-
RenderPose
public OVRLayerEyeFovDepth RenderPose(OVRPosef.Buffer value)
Copies the specifiedOVRPosef.Bufferto theRenderPosefield.
-
RenderPose
public OVRLayerEyeFovDepth RenderPose(int index, OVRPosef value)
Copies the specifiedOVRPosefat the specified index of theRenderPosefield.
-
SensorSampleTime
public OVRLayerEyeFovDepth SensorSampleTime(double value)
Sets the specified value to theSensorSampleTimefield.
-
DepthTexture
public OVRLayerEyeFovDepth DepthTexture(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBufferto theDepthTexturefield.
-
DepthTexture
public OVRLayerEyeFovDepth DepthTexture(int index, long value)
Sets the specified value at the specified index of theDepthTexturefield.
-
ProjectionDesc
public OVRLayerEyeFovDepth ProjectionDesc(OVRTimewarpProjectionDesc value)
Copies the specifiedOVRTimewarpProjectionDescto theProjectionDescfield.
-
set
public OVRLayerEyeFovDepth set(OVRLayerHeader Header, org.lwjgl.PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime, org.lwjgl.PointerBuffer DepthTexture, OVRTimewarpProjectionDesc ProjectionDesc)
Initializes this struct with the specified values.
-
set
public OVRLayerEyeFovDepth set(OVRLayerEyeFovDepth src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static OVRLayerEyeFovDepth malloc()
Returns a newOVRLayerEyeFovDepthinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRLayerEyeFovDepth calloc()
Returns a newOVRLayerEyeFovDepthinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRLayerEyeFovDepth create()
Returns a newOVRLayerEyeFovDepthinstance allocated withBufferUtils.
-
create
public static OVRLayerEyeFovDepth create(long address)
Returns a newOVRLayerEyeFovDepthinstance for the specified memory address.
-
createSafe
@Nullable public static OVRLayerEyeFovDepth createSafe(long address)
-
malloc
public static OVRLayerEyeFovDepth.Buffer malloc(int capacity)
Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRLayerEyeFovDepth.Buffer calloc(int capacity)
Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerEyeFovDepth.Buffer create(int capacity)
Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerEyeFovDepth.Buffer create(long address, int capacity)
Create aOVRLayerEyeFovDepth.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static OVRLayerEyeFovDepth.Buffer createSafe(long address, int capacity)
-
mallocStack
public static OVRLayerEyeFovDepth mallocStack()
Returns a newOVRLayerEyeFovDepthinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRLayerEyeFovDepth callocStack()
Returns a newOVRLayerEyeFovDepthinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRLayerEyeFovDepth mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerEyeFovDepthinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRLayerEyeFovDepth callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerEyeFovDepthinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static OVRLayerEyeFovDepth.Buffer mallocStack(int capacity)
Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRLayerEyeFovDepth.Buffer callocStack(int capacity)
Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static OVRLayerEyeFovDepth.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerEyeFovDepth.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static OVRLayerEyeFovDepth.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerEyeFovDepth.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)CallsOVRLayerEyeFovDepth.validate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-