Package org.lwjgl.ovr
Class OVRLayerCube
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRLayerCube
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class OVRLayerCube extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Describes a layer of typeLayerType_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 byovrLayerCube
.Member documentation
Header
–Header.Type
must beLayerType_Cube
Orientation
– orientation of the cubeCubeMapTexture
– contains a single cubemap swapchain (not a stereo pair of swapchains)
Layout
struct ovrLayerCube {
ovrLayerHeader
Header;ovrQuatf
Orientation; ovrTextureSwapChain CubeMapTexture; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OVRLayerCube.Buffer
An array ofOVRLayerCube
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CUBEMAPTEXTURE
HEADER
ORIENTATIONThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description OVRLayerCube(java.nio.ByteBuffer container)
Creates aOVRLayerCube
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OVRLayerCube
calloc()
Returns a newOVRLayerCube
instance allocated withmemCalloc
.static OVRLayerCube.Buffer
calloc(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated withmemCalloc
.static OVRLayerCube
callocStack()
Returns a newOVRLayerCube
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRLayerCube.Buffer
callocStack(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRLayerCube.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerCube
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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
CubeMapTexture()
Returns the value of theCubeMapTexture
field.OVRLayerCube
CubeMapTexture(long value)
Sets the specified value to theCubeMapTexture
field.OVRLayerHeader
Header()
Returns aOVRLayerHeader
view of theHeader
field.OVRLayerCube
Header(java.util.function.Consumer<OVRLayerHeader> consumer)
Passes theHeader
field to the specifiedConsumer
.OVRLayerCube
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
mallocStack()
Returns a newOVRLayerCube
instance allocated on the thread-localMemoryStack
.static OVRLayerCube.Buffer
mallocStack(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated on the thread-localMemoryStack
.static OVRLayerCube.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube.Buffer
instance allocated on the specifiedMemoryStack
.static OVRLayerCube
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube
instance allocated on the specifiedMemoryStack
.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
.OVRQuatf
Orientation()
Returns aOVRQuatf
view of theOrientation
field.OVRLayerCube
Orientation(java.util.function.Consumer<OVRQuatf> consumer)
Passes theOrientation
field to the specifiedConsumer
.OVRLayerCube
Orientation(OVRQuatf value)
Copies the specifiedOVRQuatf
to theOrientation
field.OVRLayerCube
set(OVRLayerCube src)
Copies the specified struct data to this struct.OVRLayerCube
set(OVRLayerHeader Header, OVRQuatf Orientation, long CubeMapTexture)
Initializes this struct with the specified values.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
OVRLayerCube
public OVRLayerCube(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
Header
public OVRLayerHeader Header()
Returns aOVRLayerHeader
view of theHeader
field.
-
CubeMapTexture
public long CubeMapTexture()
Returns the value of theCubeMapTexture
field.
-
Header
public OVRLayerCube Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeader
to theHeader
field.
-
Header
public OVRLayerCube Header(java.util.function.Consumer<OVRLayerHeader> consumer)
Passes theHeader
field to the specifiedConsumer
.
-
Orientation
public OVRLayerCube Orientation(OVRQuatf value)
Copies the specifiedOVRQuatf
to theOrientation
field.
-
Orientation
public OVRLayerCube Orientation(java.util.function.Consumer<OVRQuatf> consumer)
Passes theOrientation
field to the specifiedConsumer
.
-
CubeMapTexture
public OVRLayerCube CubeMapTexture(long value)
Sets the specified value to theCubeMapTexture
field.
-
set
public OVRLayerCube set(OVRLayerHeader Header, OVRQuatf Orientation, long CubeMapTexture)
Initializes this struct with the specified values.
-
set
public OVRLayerCube set(OVRLayerCube src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static OVRLayerCube malloc()
Returns a newOVRLayerCube
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OVRLayerCube calloc()
Returns a newOVRLayerCube
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OVRLayerCube create()
Returns a newOVRLayerCube
instance allocated withBufferUtils
.
-
create
public static OVRLayerCube create(long address)
Returns a newOVRLayerCube
instance for the specified memory address.
-
createSafe
@Nullable public static OVRLayerCube createSafe(long address)
-
malloc
public static OVRLayerCube.Buffer malloc(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static OVRLayerCube.Buffer calloc(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRLayerCube.Buffer create(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRLayerCube.Buffer create(long address, int capacity)
Create aOVRLayerCube.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static OVRLayerCube.Buffer createSafe(long address, int capacity)
-
mallocStack
public static OVRLayerCube mallocStack()
Returns a newOVRLayerCube
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static OVRLayerCube callocStack()
Returns a newOVRLayerCube
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static OVRLayerCube mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRLayerCube callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static OVRLayerCube.Buffer mallocStack(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static OVRLayerCube.Buffer callocStack(int capacity)
Returns a newOVRLayerCube.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static OVRLayerCube.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static OVRLayerCube.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCube.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
nOrientation
public static OVRQuatf nOrientation(long struct)
Unsafe version ofOrientation()
.
-
nCubeMapTexture
public static long nCubeMapTexture(long struct)
Unsafe version ofCubeMapTexture()
.
-
nHeader
public static void nHeader(long struct, OVRLayerHeader value)
Unsafe version ofHeader
.
-
nOrientation
public static void nOrientation(long struct, OVRQuatf value)
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
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-