Package org.lwjgl.ovr
Class OVRLayerQuad
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRLayerQuad
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OVRLayerQuad extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDescribes a layer of Quad type, which is a single quad in world or viewer space. It is used for bothLayerType_Quad. This type of layer represents a single object placed in the world and not a stereo view of the world itself.A typical use of
LayerType_Quadis to draw a television screen in a room that for some reason is more convenient to draw as a layer than as part of the main view in layer 0. For example, it could implement a 3D popup GUI that is drawn at a higher resolution than layer 0 to improve fidelity of the GUI.Quad layers are visible from both sides; they are not back-face culled.
Layout
struct ovrLayerQuad {ovrLayerHeaderHeader(); ovrTextureSwapChainColorTexture();ovrRectiViewport();ovrPosefQuadPoseCenter();ovrVector2fQuadSize(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOVRLayerQuad.BufferAn array ofOVRLayerQuadstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCOLORTEXTURE
HEADER
QUADPOSECENTER
QUADSIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intVIEWPORTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description OVRLayerQuad(java.nio.ByteBuffer container)Creates aOVRLayerQuadinstance 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 OVRLayerQuadcalloc()Returns a newOVRLayerQuadinstance allocated withmemCalloc.static OVRLayerQuad.Buffercalloc(int capacity)Returns a newOVRLayerQuad.Bufferinstance allocated withmemCalloc.static OVRLayerQuad.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerQuad.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerQuadcalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerQuadcallocStack()Deprecated.static OVRLayerQuad.BuffercallocStack(int capacity)Deprecated.static OVRLayerQuad.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRLayerQuadcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longColorTexture()contains a single image, never with any stereo viewOVRLayerQuadColorTexture(long value)Sets the specified value to theColorTexture()field.static OVRLayerQuadcreate()Returns a newOVRLayerQuadinstance allocated withBufferUtils.static OVRLayerQuad.Buffercreate(int capacity)Returns a newOVRLayerQuad.Bufferinstance allocated withBufferUtils.static OVRLayerQuadcreate(long address)Returns a newOVRLayerQuadinstance for the specified memory address.static OVRLayerQuad.Buffercreate(long address, int capacity)Create aOVRLayerQuad.Bufferinstance at the specified memory.static OVRLayerQuadcreateSafe(long address)static OVRLayerQuad.BuffercreateSafe(long address, int capacity)OVRLayerHeaderHeader()Header.Typemust beLayerType_QuadOVRLayerQuadHeader(java.util.function.Consumer<OVRLayerHeader> consumer)Passes theHeader()field to the specifiedConsumer.OVRLayerQuadHeader(OVRLayerHeader value)Copies the specifiedOVRLayerHeaderto theHeader()field.static OVRLayerQuadmalloc()Returns a newOVRLayerQuadinstance allocated withmemAlloc.static OVRLayerQuad.Buffermalloc(int capacity)Returns a newOVRLayerQuad.Bufferinstance allocated withmemAlloc.static OVRLayerQuad.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerQuad.Bufferinstance allocated on the specifiedMemoryStack.static OVRLayerQuadmalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStack.static OVRLayerQuadmallocStack()Deprecated.static OVRLayerQuad.BuffermallocStack(int capacity)Deprecated.static OVRLayerQuad.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRLayerQuadmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static longnColorTexture(long struct)Unsafe version ofColorTexture().static voidnColorTexture(long struct, long value)Unsafe version ofColorTexture.static OVRLayerHeadernHeader(long struct)Unsafe version ofHeader().static voidnHeader(long struct, OVRLayerHeader value)Unsafe version ofHeader.static OVRPosefnQuadPoseCenter(long struct)Unsafe version ofQuadPoseCenter().static voidnQuadPoseCenter(long struct, OVRPosef value)Unsafe version ofQuadPoseCenter.static OVRVector2fnQuadSize(long struct)Unsafe version ofQuadSize().static voidnQuadSize(long struct, OVRVector2f value)Unsafe version ofQuadSize.static OVRRectinViewport(long struct)Unsafe version ofViewport().static voidnViewport(long struct, OVRRecti value)Unsafe version ofViewport.OVRPosefQuadPoseCenter()specifies the orientation and position of the center point of a Quad layer type.OVRLayerQuadQuadPoseCenter(java.util.function.Consumer<OVRPosef> consumer)Passes theQuadPoseCenter()field to the specifiedConsumer.OVRLayerQuadQuadPoseCenter(OVRPosef value)Copies the specifiedOVRPosefto theQuadPoseCenter()field.OVRVector2fQuadSize()width and height (respectively) of the quad in metersOVRLayerQuadQuadSize(java.util.function.Consumer<OVRVector2f> consumer)Passes theQuadSize()field to the specifiedConsumer.OVRLayerQuadQuadSize(OVRVector2f value)Copies the specifiedOVRVector2fto theQuadSize()field.OVRLayerQuadset(OVRLayerHeader Header, long ColorTexture, OVRRecti Viewport, OVRPosef QuadPoseCenter, OVRVector2f QuadSize)Initializes this struct with the specified values.OVRLayerQuadset(OVRLayerQuad src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.OVRRectiViewport()specifies the ColorTexture sub-rect UV coordinatesOVRLayerQuadViewport(java.util.function.Consumer<OVRRecti> consumer)Passes theViewport()field to the specifiedConsumer.OVRLayerQuadViewport(OVRRecti value)Copies the specifiedOVRRectito theViewport()field.
-
-
-
Constructor Detail
-
OVRLayerQuad
public OVRLayerQuad(java.nio.ByteBuffer container)
Creates aOVRLayerQuadinstance 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_Quad
-
ColorTexture
public long ColorTexture()
contains a single image, never with any stereo view
-
Viewport
public OVRRecti Viewport()
specifies the ColorTexture sub-rect UV coordinates
-
QuadPoseCenter
public OVRPosef QuadPoseCenter()
specifies the orientation and position of the center point of a Quad layer type.The supplied direction is the vector perpendicular to the quad. The position is in real-world meters (not the application's virtual world, the physical world the user is in) and is relative to the "zero" position set by
RecenterTrackingOriginunless theLayerFlag_HeadLockedflag is used.
-
QuadSize
public OVRVector2f QuadSize()
width and height (respectively) of the quad in meters
-
Header
public OVRLayerQuad Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeaderto theHeader()field.
-
Header
public OVRLayerQuad Header(java.util.function.Consumer<OVRLayerHeader> consumer)
Passes theHeader()field to the specifiedConsumer.
-
ColorTexture
public OVRLayerQuad ColorTexture(long value)
Sets the specified value to theColorTexture()field.
-
Viewport
public OVRLayerQuad Viewport(OVRRecti value)
Copies the specifiedOVRRectito theViewport()field.
-
Viewport
public OVRLayerQuad Viewport(java.util.function.Consumer<OVRRecti> consumer)
Passes theViewport()field to the specifiedConsumer.
-
QuadPoseCenter
public OVRLayerQuad QuadPoseCenter(OVRPosef value)
Copies the specifiedOVRPosefto theQuadPoseCenter()field.
-
QuadPoseCenter
public OVRLayerQuad QuadPoseCenter(java.util.function.Consumer<OVRPosef> consumer)
Passes theQuadPoseCenter()field to the specifiedConsumer.
-
QuadSize
public OVRLayerQuad QuadSize(OVRVector2f value)
Copies the specifiedOVRVector2fto theQuadSize()field.
-
QuadSize
public OVRLayerQuad QuadSize(java.util.function.Consumer<OVRVector2f> consumer)
Passes theQuadSize()field to the specifiedConsumer.
-
set
public OVRLayerQuad set(OVRLayerHeader Header, long ColorTexture, OVRRecti Viewport, OVRPosef QuadPoseCenter, OVRVector2f QuadSize)
Initializes this struct with the specified values.
-
set
public OVRLayerQuad set(OVRLayerQuad src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static OVRLayerQuad malloc()
Returns a newOVRLayerQuadinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRLayerQuad calloc()
Returns a newOVRLayerQuadinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRLayerQuad create()
Returns a newOVRLayerQuadinstance allocated withBufferUtils.
-
create
public static OVRLayerQuad create(long address)
Returns a newOVRLayerQuadinstance for the specified memory address.
-
createSafe
@Nullable public static OVRLayerQuad createSafe(long address)
-
malloc
public static OVRLayerQuad.Buffer malloc(int capacity)
Returns a newOVRLayerQuad.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRLayerQuad.Buffer calloc(int capacity)
Returns a newOVRLayerQuad.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerQuad.Buffer create(int capacity)
Returns a newOVRLayerQuad.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerQuad.Buffer create(long address, int capacity)
Create aOVRLayerQuad.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static OVRLayerQuad.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static OVRLayerQuad mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRLayerQuad callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRLayerQuad mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRLayerQuad callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRLayerQuad.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static OVRLayerQuad.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRLayerQuad.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 OVRLayerQuad.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static OVRLayerQuad malloc(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static OVRLayerQuad calloc(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static OVRLayerQuad.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerQuad.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static OVRLayerQuad.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerQuad.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 long nColorTexture(long struct)
Unsafe version ofColorTexture().
-
nViewport
public static OVRRecti nViewport(long struct)
Unsafe version ofViewport().
-
nQuadPoseCenter
public static OVRPosef nQuadPoseCenter(long struct)
Unsafe version ofQuadPoseCenter().
-
nQuadSize
public static OVRVector2f nQuadSize(long struct)
Unsafe version ofQuadSize().
-
nHeader
public static void nHeader(long struct, OVRLayerHeader value)Unsafe version ofHeader.
-
nColorTexture
public static void nColorTexture(long struct, long value)Unsafe version ofColorTexture.
-
nQuadPoseCenter
public static void nQuadPoseCenter(long struct, OVRPosef value)Unsafe version ofQuadPoseCenter.
-
nQuadSize
public static void nQuadSize(long struct, OVRVector2f value)Unsafe version ofQuadSize.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-