Package org.lwjgl.openxr
Class XrExtent2Df
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrExtent2Df
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrExtent2Df extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceExtent in two dimensions.Description
This structure is used for component values that may be fractional (floating-point). If used to represent physical distances, values must be in meters.
The
widthandheightvalue must be non-negative.See Also
XrCompositionLayerQuad,XrOffset2Df,XrRect2Df,XrScenePlaneMSFT,GetMarkerSizeVARJO,GetReferenceSpaceBoundsRectLayout
struct XrExtent2Df { floatwidth(); floatheight(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrExtent2Df.BufferAn array ofXrExtent2Dfstructs.
-
Constructor Summary
Constructors Constructor Description XrExtent2Df(java.nio.ByteBuffer container)Creates aXrExtent2Dfinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrExtent2Dfcalloc()Returns a newXrExtent2Dfinstance allocated withmemCalloc.static XrExtent2Df.Buffercalloc(int capacity)Returns a newXrExtent2Df.Bufferinstance allocated withmemCalloc.static XrExtent2Df.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Df.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrExtent2Dfcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Dfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrExtent2Dfcreate()Returns a newXrExtent2Dfinstance allocated withBufferUtils.static XrExtent2Df.Buffercreate(int capacity)Returns a newXrExtent2Df.Bufferinstance allocated withBufferUtils.static XrExtent2Dfcreate(long address)Returns a newXrExtent2Dfinstance for the specified memory address.static XrExtent2Df.Buffercreate(long address, int capacity)Create aXrExtent2Df.Bufferinstance at the specified memory.static XrExtent2DfcreateSafe(long address)static XrExtent2Df.BuffercreateSafe(long address, int capacity)floatheight()the floating-point height of the extent.XrExtent2Dfheight(float value)Sets the specified value to theheight()field.static XrExtent2Dfmalloc()Returns a newXrExtent2Dfinstance allocated withmemAlloc.static XrExtent2Df.Buffermalloc(int capacity)Returns a newXrExtent2Df.Bufferinstance allocated withmemAlloc.static XrExtent2Df.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Df.Bufferinstance allocated on the specifiedMemoryStack.static XrExtent2Dfmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrExtent2Dfinstance allocated on the specifiedMemoryStack.static floatnheight(long struct)Unsafe version ofheight().static voidnheight(long struct, float value)Unsafe version ofheight.static floatnwidth(long struct)Unsafe version ofwidth().static voidnwidth(long struct, float value)Unsafe version ofwidth.XrExtent2Dfset(float width, float height)Initializes this struct with the specified values.XrExtent2Dfset(XrExtent2Df src)Copies the specified struct data to this struct.intsizeof()floatwidth()the floating-point width of the extent.XrExtent2Dfwidth(float value)Sets the specified value to thewidth()field.
-
-
-
Constructor Detail
-
XrExtent2Df
public XrExtent2Df(java.nio.ByteBuffer container)
Creates aXrExtent2Dfinstance 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 float width()
the floating-point width of the extent.
-
height
public float height()
the floating-point height of the extent.
-
width
public XrExtent2Df width(float value)
Sets the specified value to thewidth()field.
-
height
public XrExtent2Df height(float value)
Sets the specified value to theheight()field.
-
set
public XrExtent2Df set(float width, float height)
Initializes this struct with the specified values.
-
set
public XrExtent2Df set(XrExtent2Df src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrExtent2Df malloc()
Returns a newXrExtent2Dfinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrExtent2Df calloc()
Returns a newXrExtent2Dfinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrExtent2Df create()
Returns a newXrExtent2Dfinstance allocated withBufferUtils.
-
create
public static XrExtent2Df create(long address)
Returns a newXrExtent2Dfinstance for the specified memory address.
-
createSafe
@Nullable public static XrExtent2Df createSafe(long address)
-
malloc
public static XrExtent2Df.Buffer malloc(int capacity)
Returns a newXrExtent2Df.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrExtent2Df.Buffer calloc(int capacity)
Returns a newXrExtent2Df.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrExtent2Df.Buffer create(int capacity)
Returns a newXrExtent2Df.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrExtent2Df.Buffer create(long address, int capacity)
Create aXrExtent2Df.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrExtent2Df.Buffer createSafe(long address, int capacity)
-
malloc
public static XrExtent2Df malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Dfinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrExtent2Df calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Dfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrExtent2Df.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Df.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrExtent2Df.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrExtent2Df.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 float nwidth(long struct)
Unsafe version ofwidth().
-
nheight
public static float nheight(long struct)
Unsafe version ofheight().
-
nwidth
public static void nwidth(long struct, float value)Unsafe version ofwidth.
-
nheight
public static void nheight(long struct, float value)Unsafe version ofheight.
-
-