Package org.lwjgl.util.par
Class ParSLPosition
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.par.ParSLPosition
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ParSLPosition extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceThe simple two-tuple math type used for mesh and spine vertices.Layout
struct parsl_position { float x; float y; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParSLPosition.BufferAn array ofParSLPositionstructs.
-
Constructor Summary
Constructors Constructor Description ParSLPosition(java.nio.ByteBuffer container)Creates aParSLPositioninstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ParSLPositioncalloc()Returns a newParSLPositioninstance allocated withmemCalloc.static ParSLPosition.Buffercalloc(int capacity)Returns a newParSLPosition.Bufferinstance allocated withmemCalloc.static ParSLPosition.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newParSLPosition.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParSLPositioncalloc(org.lwjgl.system.MemoryStack stack)Returns a newParSLPositioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParSLPositioncallocStack()Deprecated.static ParSLPosition.BuffercallocStack(int capacity)Deprecated.static ParSLPosition.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static ParSLPositioncallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static ParSLPositioncreate()Returns a newParSLPositioninstance allocated withBufferUtils.static ParSLPosition.Buffercreate(int capacity)Returns a newParSLPosition.Bufferinstance allocated withBufferUtils.static ParSLPositioncreate(long address)Returns a newParSLPositioninstance for the specified memory address.static ParSLPosition.Buffercreate(long address, int capacity)Create aParSLPosition.Bufferinstance at the specified memory.static ParSLPositioncreateSafe(long address)static ParSLPosition.BuffercreateSafe(long address, int capacity)static ParSLPositionmalloc()Returns a newParSLPositioninstance allocated withmemAlloc.static ParSLPosition.Buffermalloc(int capacity)Returns a newParSLPosition.Bufferinstance allocated withmemAlloc.static ParSLPosition.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newParSLPosition.Bufferinstance allocated on the specifiedMemoryStack.static ParSLPositionmalloc(org.lwjgl.system.MemoryStack stack)Returns a newParSLPositioninstance allocated on the specifiedMemoryStack.static ParSLPositionmallocStack()Deprecated.static ParSLPosition.BuffermallocStack(int capacity)Deprecated.static ParSLPosition.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static ParSLPositionmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static floatnx(long struct)Unsafe version ofx().static voidnx(long struct, float value)Unsafe version ofx.static floatny(long struct)Unsafe version ofy().static voidny(long struct, float value)Unsafe version ofy.ParSLPositionset(float x, float y)Initializes this struct with the specified values.ParSLPositionset(ParSLPosition src)Copies the specified struct data to this struct.intsizeof()floatx()ParSLPositionx(float value)Sets the specified value to thexfield.floaty()ParSLPositiony(float value)Sets the specified value to theyfield.
-
-
-
Constructor Detail
-
ParSLPosition
public ParSLPosition(java.nio.ByteBuffer container)
Creates aParSLPositioninstance 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
-
x
public float x()
- Returns:
- the value of the
xfield.
-
y
public float y()
- Returns:
- the value of the
yfield.
-
x
public ParSLPosition x(float value)
Sets the specified value to thexfield.
-
y
public ParSLPosition y(float value)
Sets the specified value to theyfield.
-
set
public ParSLPosition set(float x, float y)
Initializes this struct with the specified values.
-
set
public ParSLPosition set(ParSLPosition src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static ParSLPosition malloc()
Returns a newParSLPositioninstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ParSLPosition calloc()
Returns a newParSLPositioninstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ParSLPosition create()
Returns a newParSLPositioninstance allocated withBufferUtils.
-
create
public static ParSLPosition create(long address)
Returns a newParSLPositioninstance for the specified memory address.
-
createSafe
@Nullable public static ParSLPosition createSafe(long address)
-
malloc
public static ParSLPosition.Buffer malloc(int capacity)
Returns a newParSLPosition.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ParSLPosition.Buffer calloc(int capacity)
Returns a newParSLPosition.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ParSLPosition.Buffer create(int capacity)
Returns a newParSLPosition.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ParSLPosition.Buffer create(long address, int capacity)
Create aParSLPosition.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ParSLPosition.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static ParSLPosition mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static ParSLPosition callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static ParSLPosition mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static ParSLPosition callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static ParSLPosition.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static ParSLPosition.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static ParSLPosition.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static ParSLPosition.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static ParSLPosition malloc(org.lwjgl.system.MemoryStack stack)
Returns a newParSLPositioninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static ParSLPosition calloc(org.lwjgl.system.MemoryStack stack)
Returns a newParSLPositioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static ParSLPosition.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLPosition.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static ParSLPosition.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLPosition.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nx
public static float nx(long struct)
Unsafe version ofx().
-
ny
public static float ny(long struct)
Unsafe version ofy().
-
nx
public static void nx(long struct, float value)Unsafe version ofx.
-
ny
public static void ny(long struct, float value)Unsafe version ofy.
-
-