Package org.lwjgl.ovr
Class OVRLayerQuad
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Describes a layer of Quad type, which is a single quad in world or viewer space. It is used for both
LayerType_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_Quad
is 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 {
ovrLayerHeader
Header()
;
ovrTextureSwapChain ColorTexture()
;
ovrRecti
Viewport()
;
ovrPosef
QuadPoseCenter()
;
ovrVector2f
QuadSize()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionOVRLayerQuad
(ByteBuffer container) Creates aOVRLayerQuad
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRLayerQuad
calloc()
Returns a newOVRLayerQuad
instance allocated withmemCalloc
.static OVRLayerQuad.Buffer
calloc
(int capacity) Returns a newOVRLayerQuad.Buffer
instance allocated withmemCalloc
.static OVRLayerQuad.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newOVRLayerQuad.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerQuad
calloc
(MemoryStack stack) Returns a newOVRLayerQuad
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerQuad
Deprecated.static OVRLayerQuad.Buffer
callocStack
(int capacity) Deprecated.static OVRLayerQuad.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static OVRLayerQuad
callocStack
(MemoryStack stack) Deprecated.long
contains a single image, never with any stereo viewColorTexture
(long value) Sets the specified value to theColorTexture()
field.static OVRLayerQuad
create()
Returns a newOVRLayerQuad
instance allocated withBufferUtils
.static OVRLayerQuad.Buffer
create
(int capacity) Returns a newOVRLayerQuad.Buffer
instance allocated withBufferUtils
.static OVRLayerQuad
create
(long address) Returns a newOVRLayerQuad
instance for the specified memory address.static OVRLayerQuad.Buffer
create
(long address, int capacity) Create aOVRLayerQuad.Buffer
instance at the specified memory.static OVRLayerQuad
createSafe
(long address) static OVRLayerQuad.Buffer
createSafe
(long address, int capacity) Header()
Header.Type
must beLayerType_Quad
Header
(Consumer<OVRLayerHeader> consumer) Header
(OVRLayerHeader value) Copies the specifiedOVRLayerHeader
to theHeader()
field.static OVRLayerQuad
malloc()
Returns a newOVRLayerQuad
instance allocated withmemAlloc
.static OVRLayerQuad.Buffer
malloc
(int capacity) Returns a newOVRLayerQuad.Buffer
instance allocated withmemAlloc
.static OVRLayerQuad.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newOVRLayerQuad.Buffer
instance allocated on the specifiedMemoryStack
.static OVRLayerQuad
malloc
(MemoryStack stack) Returns a newOVRLayerQuad
instance allocated on the specifiedMemoryStack
.static OVRLayerQuad
Deprecated.static OVRLayerQuad.Buffer
mallocStack
(int capacity) Deprecated.static OVRLayerQuad.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static OVRLayerQuad
mallocStack
(MemoryStack stack) Deprecated.static long
nColorTexture
(long struct) Unsafe version ofColorTexture()
.static void
nColorTexture
(long struct, long value) Unsafe version ofColorTexture
.static OVRLayerHeader
nHeader
(long struct) Unsafe version ofHeader()
.static void
nHeader
(long struct, OVRLayerHeader value) Unsafe version ofHeader
.static OVRPosef
nQuadPoseCenter
(long struct) Unsafe version ofQuadPoseCenter()
.static void
nQuadPoseCenter
(long struct, OVRPosef value) Unsafe version ofQuadPoseCenter
.static OVRVector2f
nQuadSize
(long struct) Unsafe version ofQuadSize()
.static void
nQuadSize
(long struct, OVRVector2f value) Unsafe version ofQuadSize
.static OVRRecti
nViewport
(long struct) Unsafe version ofViewport()
.static void
Unsafe version ofViewport
.specifies the orientation and position of the center point of a Quad layer type.QuadPoseCenter
(Consumer<OVRPosef> consumer) Passes theQuadPoseCenter()
field to the specifiedConsumer
.QuadPoseCenter
(OVRPosef value) Copies the specifiedOVRPosef
to theQuadPoseCenter()
field.QuadSize()
width and height (respectively) of the quad in metersQuadSize
(Consumer<OVRVector2f> consumer) Passes theQuadSize()
field to the specifiedConsumer
.QuadSize
(OVRVector2f value) Copies the specifiedOVRVector2f
to theQuadSize()
field.set
(OVRLayerHeader Header, long ColorTexture, OVRRecti Viewport, OVRPosef QuadPoseCenter, OVRVector2f QuadSize) Initializes this struct with the specified values.set
(OVRLayerQuad src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.Viewport()
specifies the ColorTexture sub-rect UV coordinatesPasses theViewport()
field to the specifiedConsumer
.Copies the specifiedOVRRecti
to theViewport()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
HEADER
public static final int HEADERThe struct member offsets. -
COLORTEXTURE
public static final int COLORTEXTUREThe struct member offsets. -
VIEWPORT
public static final int VIEWPORTThe struct member offsets. -
QUADPOSECENTER
public static final int QUADPOSECENTERThe struct member offsets. -
QUADSIZE
public static final int QUADSIZEThe struct member offsets.
-
-
Constructor Details
-
OVRLayerQuad
Creates aOVRLayerQuad
instance at the current position of the specifiedByteBuffer
container. 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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<OVRLayerQuad>
-
Header
Header.Type
must beLayerType_Quad
-
ColorTexture
public long ColorTexture()contains a single image, never with any stereo view -
Viewport
specifies the ColorTexture sub-rect UV coordinates -
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
RecenterTrackingOrigin
unless theLayerFlag_HeadLocked
flag is used. -
QuadSize
width and height (respectively) of the quad in meters -
Header
Copies the specifiedOVRLayerHeader
to theHeader()
field. -
Header
-
ColorTexture
Sets the specified value to theColorTexture()
field. -
Viewport
Copies the specifiedOVRRecti
to theViewport()
field. -
Viewport
Passes theViewport()
field to the specifiedConsumer
. -
QuadPoseCenter
Copies the specifiedOVRPosef
to theQuadPoseCenter()
field. -
QuadPoseCenter
Passes theQuadPoseCenter()
field to the specifiedConsumer
. -
QuadSize
Copies the specifiedOVRVector2f
to theQuadSize()
field. -
QuadSize
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
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newOVRLayerQuad
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOVRLayerQuad
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOVRLayerQuad
instance allocated withBufferUtils
. -
create
Returns a newOVRLayerQuad
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRLayerQuad.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOVRLayerQuad.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOVRLayerQuad.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOVRLayerQuad.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newOVRLayerQuad
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOVRLayerQuad
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOVRLayerQuad.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOVRLayerQuad.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nHeader
Unsafe version ofHeader()
. -
nColorTexture
public static long nColorTexture(long struct) Unsafe version ofColorTexture()
. -
nViewport
Unsafe version ofViewport()
. -
nQuadPoseCenter
Unsafe version ofQuadPoseCenter()
. -
nQuadSize
Unsafe version ofQuadSize()
. -
nHeader
Unsafe version ofHeader
. -
nColorTexture
public static void nColorTexture(long struct, long value) Unsafe version ofColorTexture
. -
nViewport
Unsafe version ofViewport
. -
nQuadPoseCenter
Unsafe version ofQuadPoseCenter
. -
nQuadSize
Unsafe version ofQuadSize
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-