Package org.lwjgl.ovr
Class OVRLayerCube
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Describes a layer of type
LayerType_Cube
which is a single timewarped cubemap at infinity. When looking down the recentered origin's -Z axis, +X face
is left and +Y face is up. Similarly, if headlocked the +X face is left, +Y face is up and -Z face is forward. Note that the coordinate system is
left-handed.
LayerFlag_TextureOriginAtBottomLeft
flag is not supported by ovrLayerCube
.
Layout
struct ovrLayerCube {
ovrLayerHeader
Header()
;
ovrQuatf
Orientation()
;
ovrTextureSwapChain CubeMapTexture()
;
}
-
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 size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionOVRLayerCube
(ByteBuffer container) Creates aOVRLayerCube
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRLayerCube
calloc()
Returns a newOVRLayerCube
instance allocated withmemCalloc
.static OVRLayerCube.Buffer
calloc
(int capacity) Returns a newOVRLayerCube.Buffer
instance allocated withmemCalloc
.static OVRLayerCube.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newOVRLayerCube.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerCube
calloc
(MemoryStack stack) Returns a newOVRLayerCube
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerCube
Deprecated.static OVRLayerCube.Buffer
callocStack
(int capacity) Deprecated.static OVRLayerCube.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static OVRLayerCube
callocStack
(MemoryStack stack) Deprecated.static OVRLayerCube
create()
Returns a newOVRLayerCube
instance allocated withBufferUtils
.static OVRLayerCube.Buffer
create
(int capacity) Returns a newOVRLayerCube.Buffer
instance allocated withBufferUtils
.static OVRLayerCube
create
(long address) Returns a newOVRLayerCube
instance for the specified memory address.static OVRLayerCube.Buffer
create
(long address, int capacity) Create aOVRLayerCube.Buffer
instance at the specified memory.static OVRLayerCube
createSafe
(long address) static OVRLayerCube.Buffer
createSafe
(long address, int capacity) long
contains a single cubemap swapchain (not a stereo pair of swapchains)CubeMapTexture
(long value) Sets the specified value to theCubeMapTexture()
field.Header()
Header.Type
must beLayerType_Cube
Header
(Consumer<OVRLayerHeader> consumer) Header
(OVRLayerHeader value) Copies the specifiedOVRLayerHeader
to theHeader()
field.static OVRLayerCube
malloc()
Returns a newOVRLayerCube
instance allocated withmemAlloc
.static OVRLayerCube.Buffer
malloc
(int capacity) Returns a newOVRLayerCube.Buffer
instance allocated withmemAlloc
.static OVRLayerCube.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newOVRLayerCube.Buffer
instance allocated on the specifiedMemoryStack
.static OVRLayerCube
malloc
(MemoryStack stack) Returns a newOVRLayerCube
instance allocated on the specifiedMemoryStack
.static OVRLayerCube
Deprecated.static OVRLayerCube.Buffer
mallocStack
(int capacity) Deprecated.static OVRLayerCube.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static OVRLayerCube
mallocStack
(MemoryStack stack) Deprecated.static long
nCubeMapTexture
(long struct) Unsafe version ofCubeMapTexture()
.static void
nCubeMapTexture
(long struct, long value) Unsafe version ofCubeMapTexture
.static OVRLayerHeader
nHeader
(long struct) Unsafe version ofHeader()
.static void
nHeader
(long struct, OVRLayerHeader value) Unsafe version ofHeader
.static OVRQuatf
nOrientation
(long struct) Unsafe version ofOrientation()
.static void
nOrientation
(long struct, OVRQuatf value) Unsafe version ofOrientation
.orientation of the cubeOrientation
(Consumer<OVRQuatf> consumer) Passes theOrientation()
field to the specifiedConsumer
.Orientation
(OVRQuatf value) Copies the specifiedOVRQuatf
to theOrientation()
field.set
(OVRLayerCube src) Copies the specified struct data to this struct.set
(OVRLayerHeader Header, OVRQuatf Orientation, long CubeMapTexture) Initializes this struct with the specified values.int
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.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. -
ORIENTATION
public static final int ORIENTATIONThe struct member offsets. -
CUBEMAPTEXTURE
public static final int CUBEMAPTEXTUREThe struct member offsets.
-
-
Constructor Details
-
OVRLayerCube
Creates aOVRLayerCube
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<OVRLayerCube>
-
Header
Header.Type
must beLayerType_Cube
-
Orientation
orientation of the cube -
CubeMapTexture
public long CubeMapTexture()contains a single cubemap swapchain (not a stereo pair of swapchains) -
Header
Copies the specifiedOVRLayerHeader
to theHeader()
field. -
Header
-
Orientation
Copies the specifiedOVRQuatf
to theOrientation()
field. -
Orientation
Passes theOrientation()
field to the specifiedConsumer
. -
CubeMapTexture
Sets the specified value to theCubeMapTexture()
field. -
set
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 newOVRLayerCube
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOVRLayerCube
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOVRLayerCube
instance allocated withBufferUtils
. -
create
Returns a newOVRLayerCube
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRLayerCube.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOVRLayerCube.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOVRLayerCube.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOVRLayerCube.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 newOVRLayerCube
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOVRLayerCube
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOVRLayerCube.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOVRLayerCube.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()
. -
nOrientation
Unsafe version ofOrientation()
. -
nCubeMapTexture
public static long nCubeMapTexture(long struct) Unsafe version ofCubeMapTexture()
. -
nHeader
Unsafe version ofHeader
. -
nOrientation
Unsafe version ofOrientation
. -
nCubeMapTexture
public static void nCubeMapTexture(long struct, long value) Unsafe version ofCubeMapTexture
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-