Class OVRLayerQuad
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRLayerQuad
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class OVRLayerQuad extends Struct
Describes a layer of Quad type, which is a single quad in world or viewer space. It is used for bothOVR.ovrLayerType_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
OVR.ovrLayerType_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.
Member documentation
Header–Header.Typemust beOVR.ovrLayerType_QuadColorTexture– contains a single image, never with any stereo viewViewport– specifies the ColorTexture sub-rect UV coordinatesQuadPoseCenter– 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
OVR.ovr_RecenterTrackingOrigin(long)unless theOVR.ovrLayerFlag_HeadLockedflag is used.QuadSize– width and height (respectively) of the quad in meters
Layout
struct ovrLayerQuad {ovrLayerHeaderHeader; ovrTextureSwapChain ColorTexture;ovrRectiViewport;ovrPosefQuadPoseCenter;ovrVector2fQuadSize; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classOVRLayerQuad.BufferAn array ofOVRLayerQuadstructs.-
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 OVRLayerQuad(java.nio.ByteBuffer container)Creates aOVRLayerQuadinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static OVRLayerQuadcalloc()Returns a newOVRLayerQuadinstance allocated withmemCalloc.static OVRLayerQuad.Buffercalloc(int capacity)Returns a newOVRLayerQuad.Bufferinstance allocated withmemCalloc.static OVRLayerQuadcallocStack()Returns a newOVRLayerQuadinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerQuad.BuffercallocStack(int capacity)Returns a newOVRLayerQuad.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerQuad.BuffercallocStack(int capacity, MemoryStack stack)Returns a newOVRLayerQuad.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerQuadcallocStack(MemoryStack stack)Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.longColorTexture()Returns the value of theColorTexturefield.OVRLayerQuadColorTexture(long value)Sets the specified value to theColorTexturefield.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 ornullif the address isNULL.static OVRLayerQuad.Buffercreate(long address, int capacity)Create aOVRLayerQuad.Bufferinstance at the specified memory.OVRLayerHeaderHeader()Returns aOVRLayerHeaderview of theHeaderfield.OVRLayerQuadHeader(OVRLayerHeader value)Copies the specifiedOVRLayerHeaderto theHeaderfield.static OVRLayerQuadmalloc()Returns a newOVRLayerQuadinstance allocated withmemAlloc.static OVRLayerQuad.Buffermalloc(int capacity)Returns a newOVRLayerQuad.Bufferinstance allocated withmemAlloc.static OVRLayerQuadmallocStack()Returns a newOVRLayerQuadinstance allocated on the thread-localMemoryStack.static OVRLayerQuad.BuffermallocStack(int capacity)Returns a newOVRLayerQuad.Bufferinstance allocated on the thread-localMemoryStack.static OVRLayerQuad.BuffermallocStack(int capacity, MemoryStack stack)Returns a newOVRLayerQuad.Bufferinstance allocated on the specifiedMemoryStack.static OVRLayerQuadmallocStack(MemoryStack stack)Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStack.OVRLayerQuadnset(long struct)Unsafe version ofset.OVRPosefQuadPoseCenter()Returns aOVRPosefview of theQuadPoseCenterfield.OVRLayerQuadQuadPoseCenter(OVRPosef value)Copies the specifiedOVRPosefto theQuadPoseCenterfield.OVRVector2fQuadSize()Returns aOVRVector2fview of theQuadSizefield.OVRLayerQuadQuadSize(OVRVector2f value)Copies the specifiedOVRVector2fto theQuadSizefield.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()Returns thesizeof(struct).static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsOVRLayerQuad.validate(long)for each struct contained in the specified struct array.OVRRectiViewport()Returns aOVRRectiview of theViewportfield.OVRLayerQuadViewport(OVRRecti value)Copies the specifiedOVRRectito 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
-
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()
Description copied from class:StructReturns thesizeof(struct).
-
Header
public OVRLayerHeader Header()
Returns aOVRLayerHeaderview of theHeaderfield.
-
ColorTexture
public long ColorTexture()
Returns the value of theColorTexturefield.
-
QuadPoseCenter
public OVRPosef QuadPoseCenter()
Returns aOVRPosefview of theQuadPoseCenterfield.
-
QuadSize
public OVRVector2f QuadSize()
Returns aOVRVector2fview of theQuadSizefield.
-
Header
public OVRLayerQuad Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeaderto theHeaderfield.
-
ColorTexture
public OVRLayerQuad ColorTexture(long value)
Sets the specified value to theColorTexturefield.
-
Viewport
public OVRLayerQuad Viewport(OVRRecti value)
Copies the specifiedOVRRectito theViewportfield.
-
QuadPoseCenter
public OVRLayerQuad QuadPoseCenter(OVRPosef value)
Copies the specifiedOVRPosefto theQuadPoseCenterfield.
-
QuadSize
public OVRLayerQuad QuadSize(OVRVector2f value)
Copies the specifiedOVRVector2fto theQuadSizefield.
-
set
public OVRLayerQuad set(OVRLayerHeader Header, long ColorTexture, OVRRecti Viewport, OVRPosef QuadPoseCenter, OVRVector2f QuadSize)
Initializes this struct with the specified values.
-
nset
public OVRLayerQuad nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
mallocStack
public static OVRLayerQuad mallocStack()
Returns a newOVRLayerQuadinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRLayerQuad callocStack()
Returns a newOVRLayerQuadinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRLayerQuad mallocStack(MemoryStack stack)
Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRLayerQuad callocStack(MemoryStack stack)
Returns a newOVRLayerQuadinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static OVRLayerQuad.Buffer mallocStack(int capacity)
Returns a newOVRLayerQuad.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRLayerQuad.Buffer callocStack(int capacity)
Returns a newOVRLayerQuad.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static OVRLayerQuad.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newOVRLayerQuad.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static OVRLayerQuad.Buffer callocStack(int capacity, 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
-
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)CallsOVRLayerQuad.validate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-