Package org.lwjgl.util.par
Class ParSLViewport
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct parsl_viewport {
float left;
float top;
float right;
float bottom;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionParSLViewport(ByteBuffer container) Creates aParSLViewportinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionfloatbottom()bottom(float value) Sets the specified value to thebottomfield.static ParSLViewportcalloc()Returns a newParSLViewportinstance allocated withmemCalloc.static ParSLViewport.Buffercalloc(int capacity) Returns a newParSLViewport.Bufferinstance allocated withmemCalloc.static ParSLViewport.Buffercalloc(int capacity, MemoryStack stack) Returns a newParSLViewport.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParSLViewportcalloc(MemoryStack stack) Returns a newParSLViewportinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParSLViewportcreate()Returns a newParSLViewportinstance allocated withBufferUtils.static ParSLViewport.Buffercreate(int capacity) Returns a newParSLViewport.Bufferinstance allocated withBufferUtils.static ParSLViewportcreate(long address) Returns a newParSLViewportinstance for the specified memory address.static ParSLViewport.Buffercreate(long address, int capacity) Create aParSLViewport.Bufferinstance at the specified memory.static @Nullable ParSLViewportcreateSafe(long address) static @Nullable ParSLViewport.BuffercreateSafe(long address, int capacity) floatleft()left(float value) Sets the specified value to theleftfield.static ParSLViewportmalloc()Returns a newParSLViewportinstance allocated withmemAlloc.static ParSLViewport.Buffermalloc(int capacity) Returns a newParSLViewport.Bufferinstance allocated withmemAlloc.static ParSLViewport.Buffermalloc(int capacity, MemoryStack stack) Returns a newParSLViewport.Bufferinstance allocated on the specifiedMemoryStack.static ParSLViewportmalloc(MemoryStack stack) Returns a newParSLViewportinstance allocated on the specifiedMemoryStack.static floatnbottom(long struct) Unsafe version ofbottom().static voidnbottom(long struct, float value) Unsafe version ofbottom.static floatnleft(long struct) Unsafe version ofleft().static voidnleft(long struct, float value) Unsafe version ofleft.static floatnright(long struct) Unsafe version ofright().static voidnright(long struct, float value) Unsafe version ofright.static floatntop(long struct) Unsafe version oftop().static voidntop(long struct, float value) Unsafe version oftop.floatright()right(float value) Sets the specified value to therightfield.set(float left, float top, float right, float bottom) Initializes this struct with the specified values.set(ParSLViewport src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).floattop()top(float value) Sets the specified value to thetopfield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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. -
LEFT
public static final int LEFTThe struct member offsets. -
TOP
public static final int TOPThe struct member offsets. -
RIGHT
public static final int RIGHTThe struct member offsets. -
BOTTOM
public static final int BOTTOMThe struct member offsets.
-
-
Constructor Details
-
ParSLViewport
Creates aParSLViewportinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<ParSLViewport>
-
left
public float left()- Returns:
- the value of the
leftfield.
-
top
public float top()- Returns:
- the value of the
topfield.
-
right
public float right()- Returns:
- the value of the
rightfield.
-
bottom
public float bottom()- Returns:
- the value of the
bottomfield.
-
left
Sets the specified value to theleftfield. -
top
Sets the specified value to thetopfield. -
right
Sets the specified value to therightfield. -
bottom
Sets the specified value to thebottomfield. -
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 newParSLViewportinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newParSLViewportinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newParSLViewportinstance allocated withBufferUtils. -
create
Returns a newParSLViewportinstance for the specified memory address. -
createSafe
-
malloc
Returns a newParSLViewport.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newParSLViewport.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newParSLViewport.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aParSLViewport.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newParSLViewportinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newParSLViewportinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newParSLViewport.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newParSLViewport.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nleft
public static float nleft(long struct) Unsafe version ofleft(). -
ntop
public static float ntop(long struct) Unsafe version oftop(). -
nright
public static float nright(long struct) Unsafe version ofright(). -
nbottom
public static float nbottom(long struct) Unsafe version ofbottom(). -
nleft
public static void nleft(long struct, float value) Unsafe version ofleft. -
ntop
public static void ntop(long struct, float value) Unsafe version oftop. -
nright
public static void nright(long struct, float value) Unsafe version ofright. -
nbottom
public static void nbottom(long struct, float value) Unsafe version ofbottom.
-