Package org.lwjgl.util.par
Class ParSLViewport
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.par.ParSLViewport
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class ParSLViewport extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Viewport for streamline seed placement.Layout
struct parsl_viewport { float left; float top; float right; float bottom; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParSLViewport.Buffer
An array ofParSLViewport
structs.
-
Constructor Summary
Constructors Constructor Description ParSLViewport(java.nio.ByteBuffer container)
Creates aParSLViewport
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
bottom()
Returns the value of thebottom
field.ParSLViewport
bottom(float value)
Sets the specified value to thebottom
field.static ParSLViewport
calloc()
Returns a newParSLViewport
instance allocated withmemCalloc
.static ParSLViewport.Buffer
calloc(int capacity)
Returns a newParSLViewport.Buffer
instance allocated withmemCalloc
.static ParSLViewport
callocStack()
Returns a newParSLViewport
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ParSLViewport.Buffer
callocStack(int capacity)
Returns a newParSLViewport.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ParSLViewport.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ParSLViewport
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ParSLViewport
create()
Returns a newParSLViewport
instance allocated withBufferUtils
.static ParSLViewport.Buffer
create(int capacity)
Returns a newParSLViewport.Buffer
instance allocated withBufferUtils
.static ParSLViewport
create(long address)
Returns a newParSLViewport
instance for the specified memory address.static ParSLViewport.Buffer
create(long address, int capacity)
Create aParSLViewport.Buffer
instance at the specified memory.static ParSLViewport
createSafe(long address)
static ParSLViewport.Buffer
createSafe(long address, int capacity)
float
left()
Returns the value of theleft
field.ParSLViewport
left(float value)
Sets the specified value to theleft
field.static ParSLViewport
malloc()
Returns a newParSLViewport
instance allocated withmemAlloc
.static ParSLViewport.Buffer
malloc(int capacity)
Returns a newParSLViewport.Buffer
instance allocated withmemAlloc
.static ParSLViewport
mallocStack()
Returns a newParSLViewport
instance allocated on the thread-localMemoryStack
.static ParSLViewport.Buffer
mallocStack(int capacity)
Returns a newParSLViewport.Buffer
instance allocated on the thread-localMemoryStack
.static ParSLViewport.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport.Buffer
instance allocated on the specifiedMemoryStack
.static ParSLViewport
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport
instance allocated on the specifiedMemoryStack
.static float
nbottom(long struct)
Unsafe version ofbottom()
.static void
nbottom(long struct, float value)
Unsafe version ofbottom
.static float
nleft(long struct)
Unsafe version ofleft()
.static void
nleft(long struct, float value)
Unsafe version ofleft
.static float
nright(long struct)
Unsafe version ofright()
.static void
nright(long struct, float value)
Unsafe version ofright
.static float
ntop(long struct)
Unsafe version oftop()
.static void
ntop(long struct, float value)
Unsafe version oftop
.float
right()
Returns the value of theright
field.ParSLViewport
right(float value)
Sets the specified value to theright
field.ParSLViewport
set(float left, float top, float right, float bottom)
Initializes this struct with the specified values.ParSLViewport
set(ParSLViewport src)
Copies the specified struct data to this struct.int
sizeof()
float
top()
Returns the value of thetop
field.ParSLViewport
top(float value)
Sets the specified value to thetop
field.
-
-
-
Constructor Detail
-
ParSLViewport
public ParSLViewport(java.nio.ByteBuffer container)
Creates aParSLViewport
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
-
left
public float left()
Returns the value of theleft
field.
-
top
public float top()
Returns the value of thetop
field.
-
right
public float right()
Returns the value of theright
field.
-
bottom
public float bottom()
Returns the value of thebottom
field.
-
left
public ParSLViewport left(float value)
Sets the specified value to theleft
field.
-
top
public ParSLViewport top(float value)
Sets the specified value to thetop
field.
-
right
public ParSLViewport right(float value)
Sets the specified value to theright
field.
-
bottom
public ParSLViewport bottom(float value)
Sets the specified value to thebottom
field.
-
set
public ParSLViewport set(float left, float top, float right, float bottom)
Initializes this struct with the specified values.
-
set
public ParSLViewport set(ParSLViewport src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static ParSLViewport malloc()
Returns a newParSLViewport
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ParSLViewport calloc()
Returns a newParSLViewport
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ParSLViewport create()
Returns a newParSLViewport
instance allocated withBufferUtils
.
-
create
public static ParSLViewport create(long address)
Returns a newParSLViewport
instance for the specified memory address.
-
createSafe
@Nullable public static ParSLViewport createSafe(long address)
-
malloc
public static ParSLViewport.Buffer malloc(int capacity)
Returns a newParSLViewport.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ParSLViewport.Buffer calloc(int capacity)
Returns a newParSLViewport.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ParSLViewport.Buffer create(int capacity)
Returns a newParSLViewport.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ParSLViewport.Buffer create(long address, int capacity)
Create aParSLViewport.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ParSLViewport.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ParSLViewport mallocStack()
Returns a newParSLViewport
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ParSLViewport callocStack()
Returns a newParSLViewport
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ParSLViewport mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ParSLViewport callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ParSLViewport.Buffer mallocStack(int capacity)
Returns a newParSLViewport.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ParSLViewport.Buffer callocStack(int capacity)
Returns a newParSLViewport.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ParSLViewport.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ParSLViewport.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLViewport.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
.
-
-