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.NativeResourceDescribes a layer of typeLayerType_Cubewhich 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_TextureOriginAtBottomLeftflag is not supported byovrLayerCube.Member documentation
Header–Header.Typemust beLayerType_CubeOrientation– orientation of the cubeCubeMapTexture– contains a single cubemap swapchain (not a stereo pair of swapchains)
Layout
struct ovrLayerCube {ovrLayerHeaderHeader;ovrQuatfOrientation; ovrTextureSwapChain CubeMapTexture; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOVRLayerCube.BufferAn array ofOVRLayerCubestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCUBEMAPTEXTURE
HEADER
ORIENTATIONThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description OVRLayerCube(java.nio.ByteBuffer container)Creates aOVRLayerCubeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OVRLayerCubecalloc()Returns a newOVRLayerCubeinstance allocated withmemCalloc.static OVRLayerCube.Buffercalloc(int capacity)Returns a newOVRLayerCube.Bufferinstance allocated withmemCalloc.static OVRLayerCubecallocStack()Returns a newOVRLayerCubeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerCube.BuffercallocStack(int capacity)Returns a newOVRLayerCube.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRLayerCube.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerCube.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerCubecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerCubeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRLayerCubecreate()Returns a newOVRLayerCubeinstance allocated withBufferUtils.static OVRLayerCube.Buffercreate(int capacity)Returns a newOVRLayerCube.Bufferinstance allocated withBufferUtils.static OVRLayerCubecreate(long address)Returns a newOVRLayerCubeinstance for the specified memory address.static OVRLayerCube.Buffercreate(long address, int capacity)Create aOVRLayerCube.Bufferinstance at the specified memory.static OVRLayerCubecreateSafe(long address)static OVRLayerCube.BuffercreateSafe(long address, int capacity)longCubeMapTexture()Returns the value of theCubeMapTexturefield.OVRLayerCubeCubeMapTexture(long value)Sets the specified value to theCubeMapTexturefield.OVRLayerHeaderHeader()Returns aOVRLayerHeaderview of theHeaderfield.OVRLayerCubeHeader(java.util.function.Consumer<OVRLayerHeader> consumer)Passes theHeaderfield to the specifiedConsumer.OVRLayerCubeHeader(OVRLayerHeader value)Copies the specifiedOVRLayerHeaderto theHeaderfield.static OVRLayerCubemalloc()Returns a newOVRLayerCubeinstance allocated withmemAlloc.static OVRLayerCube.Buffermalloc(int capacity)Returns a newOVRLayerCube.Bufferinstance allocated withmemAlloc.static OVRLayerCubemallocStack()Returns a newOVRLayerCubeinstance allocated on the thread-localMemoryStack.static OVRLayerCube.BuffermallocStack(int capacity)Returns a newOVRLayerCube.Bufferinstance allocated on the thread-localMemoryStack.static OVRLayerCube.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerCube.Bufferinstance allocated on the specifiedMemoryStack.static OVRLayerCubemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRLayerCubeinstance allocated on the specifiedMemoryStack.static longnCubeMapTexture(long struct)Unsafe version ofCubeMapTexture().static voidnCubeMapTexture(long struct, long value)Unsafe version ofCubeMapTexture.static OVRLayerHeadernHeader(long struct)Unsafe version ofHeader().static voidnHeader(long struct, OVRLayerHeader value)Unsafe version ofHeader.static OVRQuatfnOrientation(long struct)Unsafe version ofOrientation().static voidnOrientation(long struct, OVRQuatf value)Unsafe version ofOrientation.OVRQuatfOrientation()Returns aOVRQuatfview of theOrientationfield.OVRLayerCubeOrientation(java.util.function.Consumer<OVRQuatf> consumer)Passes theOrientationfield to the specifiedConsumer.OVRLayerCubeOrientation(OVRQuatf value)Copies the specifiedOVRQuatfto theOrientationfield.OVRLayerCubeset(OVRLayerCube src)Copies the specified struct data to this struct.OVRLayerCubeset(OVRLayerHeader Header, OVRQuatf Orientation, long CubeMapTexture)Initializes this struct with the specified values.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(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 aOVRLayerCubeinstance 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()
Returns aOVRLayerHeaderview of theHeaderfield.
-
CubeMapTexture
public long CubeMapTexture()
Returns the value of theCubeMapTexturefield.
-
Header
public OVRLayerCube Header(OVRLayerHeader value)
Copies the specifiedOVRLayerHeaderto theHeaderfield.
-
Header
public OVRLayerCube Header(java.util.function.Consumer<OVRLayerHeader> consumer)
Passes theHeaderfield to the specifiedConsumer.
-
Orientation
public OVRLayerCube Orientation(OVRQuatf value)
Copies the specifiedOVRQuatfto theOrientationfield.
-
Orientation
public OVRLayerCube Orientation(java.util.function.Consumer<OVRQuatf> consumer)
Passes theOrientationfield to the specifiedConsumer.
-
CubeMapTexture
public OVRLayerCube CubeMapTexture(long value)
Sets the specified value to theCubeMapTexturefield.
-
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 newOVRLayerCubeinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRLayerCube calloc()
Returns a newOVRLayerCubeinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRLayerCube create()
Returns a newOVRLayerCubeinstance allocated withBufferUtils.
-
create
public static OVRLayerCube create(long address)
Returns a newOVRLayerCubeinstance for the specified memory address.
-
createSafe
@Nullable public static OVRLayerCube createSafe(long address)
-
malloc
public static OVRLayerCube.Buffer malloc(int capacity)
Returns a newOVRLayerCube.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRLayerCube.Buffer calloc(int capacity)
Returns a newOVRLayerCube.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerCube.Buffer create(int capacity)
Returns a newOVRLayerCube.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRLayerCube.Buffer create(long address, int capacity)
Create aOVRLayerCube.Bufferinstance 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 newOVRLayerCubeinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRLayerCube callocStack()
Returns a newOVRLayerCubeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRLayerCube mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCubeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRLayerCube callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRLayerCubeinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRLayerCube.Buffer callocStack(int capacity)
Returns a newOVRLayerCube.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.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().
-
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
-
-