Package org.lwjgl.openxr
Class XrExtent2Di
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrExtent2Di
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrExtent2Di extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceExtent in two dimensions.Description
This variant is for representing discrete values such as texels. For representing physical distances, the floating-point variant must be used instead.
The
widthandheightvalue must be non-negative.See Also
Layout
struct XrExtent2Di { int32_twidth(); int32_theight(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrExtent2Di.BufferAn array ofXrExtent2Distructs.
-
Constructor Summary
Constructors Constructor Description XrExtent2Di(java.nio.ByteBuffer container)Creates aXrExtent2Diinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrExtent2Dicalloc()Returns a newXrExtent2Diinstance allocated withmemCalloc.static XrExtent2Di.Buffercalloc(int capacity)Returns a newXrExtent2Di.Bufferinstance allocated withmemCalloc.static XrExtent2Di.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Di.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrExtent2Dicalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Diinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrExtent2Dicreate()Returns a newXrExtent2Diinstance allocated withBufferUtils.static XrExtent2Di.Buffercreate(int capacity)Returns a newXrExtent2Di.Bufferinstance allocated withBufferUtils.static XrExtent2Dicreate(long address)Returns a newXrExtent2Diinstance for the specified memory address.static XrExtent2Di.Buffercreate(long address, int capacity)Create aXrExtent2Di.Bufferinstance at the specified memory.static XrExtent2DicreateSafe(long address)static XrExtent2Di.BuffercreateSafe(long address, int capacity)intheight()the integer height of the extent.XrExtent2Diheight(int value)Sets the specified value to theheight()field.static XrExtent2Dimalloc()Returns a newXrExtent2Diinstance allocated withmemAlloc.static XrExtent2Di.Buffermalloc(int capacity)Returns a newXrExtent2Di.Bufferinstance allocated withmemAlloc.static XrExtent2Di.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Di.Bufferinstance allocated on the specifiedMemoryStack.static XrExtent2Dimalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Diinstance allocated on the specifiedMemoryStack.static intnheight(long struct)Unsafe version ofheight().static voidnheight(long struct, int value)Unsafe version ofheight.static intnwidth(long struct)Unsafe version ofwidth().static voidnwidth(long struct, int value)Unsafe version ofwidth.XrExtent2Diset(int width, int height)Initializes this struct with the specified values.XrExtent2Diset(XrExtent2Di src)Copies the specified struct data to this struct.intsizeof()intwidth()the integer width of the extent.XrExtent2Diwidth(int value)Sets the specified value to thewidth()field.
-
-
-
Constructor Detail
-
XrExtent2Di
public XrExtent2Di(java.nio.ByteBuffer container)
Creates aXrExtent2Diinstance 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
-
width
public int width()
the integer width of the extent.
-
height
public int height()
the integer height of the extent.
-
width
public XrExtent2Di width(int value)
Sets the specified value to thewidth()field.
-
height
public XrExtent2Di height(int value)
Sets the specified value to theheight()field.
-
set
public XrExtent2Di set(int width, int height)
Initializes this struct with the specified values.
-
set
public XrExtent2Di set(XrExtent2Di src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrExtent2Di malloc()
Returns a newXrExtent2Diinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrExtent2Di calloc()
Returns a newXrExtent2Diinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrExtent2Di create()
Returns a newXrExtent2Diinstance allocated withBufferUtils.
-
create
public static XrExtent2Di create(long address)
Returns a newXrExtent2Diinstance for the specified memory address.
-
createSafe
@Nullable public static XrExtent2Di createSafe(long address)
-
malloc
public static XrExtent2Di.Buffer malloc(int capacity)
Returns a newXrExtent2Di.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrExtent2Di.Buffer calloc(int capacity)
Returns a newXrExtent2Di.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrExtent2Di.Buffer create(int capacity)
Returns a newXrExtent2Di.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrExtent2Di.Buffer create(long address, int capacity)
Create aXrExtent2Di.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrExtent2Di.Buffer createSafe(long address, int capacity)
-
malloc
public static XrExtent2Di malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Diinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrExtent2Di calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Diinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrExtent2Di.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Di.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrExtent2Di.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Di.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nwidth
public static int nwidth(long struct)
Unsafe version ofwidth().
-
nheight
public static int nheight(long struct)
Unsafe version ofheight().
-
nwidth
public static void nwidth(long struct, int value)Unsafe version ofwidth.
-
nheight
public static void nheight(long struct, int value)Unsafe version ofheight.
-
-