Top Description Inners Fields Constructors Methods
org.lwjgl.ovr

public Class OVRLayerEyeMatrix

extends Struct<OVRLayerEyeMatrix>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct ovrLayerEyeMatrix
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Describes a layer that specifies a monoscopic or stereoscopic view.

This uses a direct 3x4 matrix to map from view space to the UV coordinates. It is essentially the same thing as OVRLayerEyeFov but using a much lower level. This is mainly to provide compatibility with specific apps. Unless the application really requires this flexibility, it is usually better to use ovrLayerEyeFov.

Three options exist with respect to mono/stereo texture usage:

Layout


struct ovrLayerEyeMatrix {
    ovrLayerHeader Header;
    ovrTextureSwapChain ColorTexture[ovrEye_Count];
    ovrRecti Viewport[ovrEye_Count];
    ovrPosef RenderPose[ovrEye_Count];
    ovrMatrix4f Matrix[ovrEye_Count];
    double SensorSampleTime;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
COLORTEXTURE

The struct member offsets.

public static final int
HEADER

The struct member offsets.

public static final int
MATRIX

The struct member offsets.

public static final int
RENDERPOSE

The struct member offsets.

public static final int
SENSORSAMPLETIME

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
VIEWPORT

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
OVRLayerEyeMatrix(long address, ByteBuffer container)

public
OVRLayerEyeMatrix(ByteBuffer container)

Creates a OVRLayerEyeMatrix instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static OVRLayerEyeMatrix
calloc()

Returns a new OVRLayerEyeMatrix instance allocated with memCalloc.

public static OVRLayerEyeMatrix.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new OVRLayerEyeMatrix.Buffer instance allocated with memCalloc.

public static OVRLayerEyeMatrix
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new OVRLayerEyeMatrix instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static OVRLayerEyeMatrix.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new OVRLayerEyeMatrix.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static OVRLayerEyeMatrix
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static OVRLayerEyeMatrix
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static OVRLayerEyeMatrix.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static OVRLayerEyeMatrix.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public PointerBuffer
ColorTexture()

ovrTextureSwapChains for the left and right eye respectively.

public long
ColorTexture(int index)

ovrTextureSwapChains for the left and right eye respectively.

public OVRLayerEyeMatrix
ColorTexture(PointerBuffer value)

Copies the specified PointerBuffer to the ColorTexture field.

public OVRLayerEyeMatrix
ColorTexture(int index, long value)

Sets the specified value at the specified index of the ColorTexture field.

protected OVRLayerEyeMatrix
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static OVRLayerEyeMatrix
create()

Returns a new OVRLayerEyeMatrix instance allocated with BufferUtils.

public static OVRLayerEyeMatrix
create(long address)

Returns a new OVRLayerEyeMatrix instance for the specified memory address.

public static OVRLayerEyeMatrix.Buffer
create(int
the buffer capacity
capacity
)

Returns a new OVRLayerEyeMatrix.Buffer instance allocated with BufferUtils.

public static OVRLayerEyeMatrix.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a OVRLayerEyeMatrix.Buffer instance at the specified memory.

public static OVRLayerEyeMatrix
createSafe(long address)

Like create, but returns null if address is NULL.

public static OVRLayerEyeMatrix.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public OVRLayerHeader
Header()

Header.Type must be LayerType_EyeMatrix

public OVRLayerEyeMatrix
Header(OVRLayerHeader value)

Copies the specified OVRLayerHeader to the Header field.

public OVRLayerEyeMatrix
Header(Consumer<OVRLayerHeader> consumer)

Passes the Header field to the specified Consumer.

public static OVRLayerEyeMatrix
malloc()

Returns a new OVRLayerEyeMatrix instance allocated with memAlloc.

public static OVRLayerEyeMatrix.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new OVRLayerEyeMatrix.Buffer instance allocated with memAlloc.

public static OVRLayerEyeMatrix
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new OVRLayerEyeMatrix instance allocated on the specified MemoryStack.

public static OVRLayerEyeMatrix.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new OVRLayerEyeMatrix.Buffer instance allocated on the specified MemoryStack.

public static OVRLayerEyeMatrix
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static OVRLayerEyeMatrix
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static OVRLayerEyeMatrix.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static OVRLayerEyeMatrix.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public OVRMatrix4f.Buffer
Matrix()

specifies the mapping from a view-space vector to a UV coordinate on the textures given above.

public OVRMatrix4f
Matrix(int index)

specifies the mapping from a view-space vector to a UV coordinate on the textures given above.

public OVRLayerEyeMatrix
Matrix(OVRMatrix4f.Buffer value)

Copies the specified OVRMatrix4f.Buffer to the Matrix field.

public OVRLayerEyeMatrix
Matrix(int index, OVRMatrix4f value)

Copies the specified OVRMatrix4f at the specified index of the Matrix field.

public OVRLayerEyeMatrix
Matrix(Consumer<OVRMatrix4f.Buffer> consumer)

Passes the Matrix field to the specified Consumer.

public OVRLayerEyeMatrix
Matrix(int index, Consumer<OVRMatrix4f> consumer)

Passes the element at index of the Matrix field to the specified Consumer.

public static PointerBuffer
nColorTexture(long struct)

Unsafe version of ColorTexture.

public static long
nColorTexture(long struct, int index)

Unsafe version of ColorTexture.

public static void
nColorTexture(long struct, PointerBuffer value)

Unsafe version of ColorTexture.

public static void
nColorTexture(long struct, int index, long value)

Unsafe version of ColorTexture.

public static OVRLayerHeader
nHeader(long struct)

Unsafe version of Header.

public static void
nHeader(long struct, OVRLayerHeader value)

Unsafe version of Header.

public static OVRMatrix4f.Buffer
nMatrix(long struct)

Unsafe version of Matrix.

public static OVRMatrix4f
nMatrix(long struct, int index)

Unsafe version of Matrix.

public static void
nMatrix(long struct, OVRMatrix4f.Buffer value)

Unsafe version of Matrix.

public static void
nMatrix(long struct, int index, OVRMatrix4f value)

Unsafe version of Matrix.

public static OVRPosef.Buffer
nRenderPose(long struct)

Unsafe version of RenderPose.

public static OVRPosef
nRenderPose(long struct, int index)

Unsafe version of RenderPose.

public static void
nRenderPose(long struct, OVRPosef.Buffer value)

Unsafe version of RenderPose.

public static void
nRenderPose(long struct, int index, OVRPosef value)

Unsafe version of RenderPose.

public static double
nSensorSampleTime(long struct)

Unsafe version of SensorSampleTime.

public static void
nSensorSampleTime(long struct, double value)

Unsafe version of SensorSampleTime.

public static OVRRecti.Buffer
nViewport(long struct)

Unsafe version of Viewport.

public static OVRRecti
nViewport(long struct, int index)

Unsafe version of Viewport.

public static void
nViewport(long struct, OVRRecti.Buffer value)

Unsafe version of Viewport.

public static void
nViewport(long struct, int index, OVRRecti value)

Unsafe version of Viewport.

public OVRPosef.Buffer
RenderPose()

specifies the position and orientation of each eye view, with the position specified in meters.

public OVRPosef
RenderPose(int index)

specifies the position and orientation of each eye view, with the position specified in meters.

public OVRLayerEyeMatrix
RenderPose(OVRPosef.Buffer value)

Copies the specified OVRPosef.Buffer to the RenderPose field.

public OVRLayerEyeMatrix
RenderPose(int index, OVRPosef value)

Copies the specified OVRPosef at the specified index of the RenderPose field.

public OVRLayerEyeMatrix
RenderPose(Consumer<OVRPosef.Buffer> consumer)

Passes the RenderPose field to the specified Consumer.

public OVRLayerEyeMatrix
RenderPose(int index, Consumer<OVRPosef> consumer)

Passes the element at index of the RenderPose field to the specified Consumer.

public double
SensorSampleTime()

specifies the timestamp when the source ovrPosef (used in calculating RenderPose) was sampled from the SDK.

public OVRLayerEyeMatrix
SensorSampleTime(double value)

Sets the specified value to the SensorSampleTime field.

public OVRLayerEyeMatrix
set(OVRLayerHeader Header, PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRPosef.Buffer RenderPose, OVRMatrix4f.Buffer Matrix, double SensorSampleTime)

Initializes this struct with the specified values.

public OVRLayerEyeMatrix

Returns:

this struct
set
(OVRLayerEyeMatrix
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

public OVRRecti.Buffer
Viewport()

specifies the ColorTexture sub-rect UV coordinates.

public OVRRecti
Viewport(int index)

specifies the ColorTexture sub-rect UV coordinates.

public OVRLayerEyeMatrix
Viewport(OVRRecti.Buffer value)

Copies the specified OVRRecti.Buffer to the Viewport field.

public OVRLayerEyeMatrix
Viewport(int index, OVRRecti value)

Copies the specified OVRRecti at the specified index of the Viewport field.

public OVRLayerEyeMatrix
Viewport(Consumer<OVRRecti.Buffer> consumer)

Passes the Viewport field to the specified Consumer.

public OVRLayerEyeMatrix
Viewport(int index, Consumer<OVRRecti> consumer)

Passes the element at index of the Viewport field to the specified Consumer.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate