public class CGPoint
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
x – the x-coordinate of the pointy – the y-coordinate of the point
struct CGPoint {
CGFloat x;
CGFloat y;
}| Modifier and Type | Class and Description |
|---|---|
static class |
CGPoint.Buffer
An array of
CGPoint structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
X
The struct member offsets.
|
static int |
Y
The struct member offsets.
|
| Constructor and Description |
|---|
CGPoint(java.nio.ByteBuffer container)
Creates a
CGPoint instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static CGPoint |
calloc()
Returns a new
CGPoint instance allocated with memCalloc. |
static CGPoint.Buffer |
calloc(int capacity)
Returns a new
CGPoint.Buffer instance allocated with memCalloc. |
static CGPoint |
callocStack()
Returns a new
CGPoint instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CGPoint.Buffer |
callocStack(int capacity)
Returns a new
CGPoint.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CGPoint.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CGPoint.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CGPoint |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CGPoint instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CGPoint |
create()
Returns a new
CGPoint instance allocated with BufferUtils. |
static CGPoint.Buffer |
create(int capacity)
Returns a new
CGPoint.Buffer instance allocated with BufferUtils. |
static CGPoint |
create(long address)
Returns a new
CGPoint instance for the specified memory address. |
static CGPoint.Buffer |
create(long address,
int capacity)
Create a
CGPoint.Buffer instance at the specified memory. |
static CGPoint |
createSafe(long address)
|
static CGPoint.Buffer |
createSafe(long address,
int capacity)
|
static CGPoint |
malloc()
Returns a new
CGPoint instance allocated with memAlloc. |
static CGPoint.Buffer |
malloc(int capacity)
Returns a new
CGPoint.Buffer instance allocated with memAlloc. |
static CGPoint |
mallocStack()
Returns a new
CGPoint instance allocated on the thread-local MemoryStack. |
static CGPoint.Buffer |
mallocStack(int capacity)
Returns a new
CGPoint.Buffer instance allocated on the thread-local MemoryStack. |
static CGPoint.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CGPoint.Buffer instance allocated on the specified MemoryStack. |
static CGPoint |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CGPoint instance allocated on the specified MemoryStack. |
static double |
nx(long struct)
Unsafe version of
x(). |
static void |
nx(long struct,
double value)
Unsafe version of
x. |
static double |
ny(long struct)
Unsafe version of
y(). |
static void |
ny(long struct,
double value)
Unsafe version of
y. |
CGPoint |
set(CGPoint src)
Copies the specified struct data to this struct.
|
CGPoint |
set(double x,
double y)
Initializes this struct with the specified values.
|
int |
sizeof() |
double |
x()
Returns the value of the
x field. |
CGPoint |
x(double value)
Sets the specified value to the
x field. |
double |
y()
Returns the value of the
y field. |
CGPoint |
y(double value)
Sets the specified value to the
y field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int X
public static final int Y
public CGPoint(java.nio.ByteBuffer container)
CGPoint instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic double x()
x field.public double y()
y field.public CGPoint x(double value)
x field.public CGPoint y(double value)
y field.public CGPoint set(double x, double y)
public CGPoint set(CGPoint src)
src - the source structpublic static CGPoint malloc()
CGPoint instance allocated with memAlloc. The instance must be explicitly freed.public static CGPoint calloc()
CGPoint instance allocated with memCalloc. The instance must be explicitly freed.public static CGPoint create()
CGPoint instance allocated with BufferUtils.public static CGPoint create(long address)
CGPoint instance for the specified memory address.@Nullable public static CGPoint createSafe(long address)
public static CGPoint.Buffer malloc(int capacity)
CGPoint.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CGPoint.Buffer calloc(int capacity)
CGPoint.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CGPoint.Buffer create(int capacity)
CGPoint.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static CGPoint.Buffer create(long address, int capacity)
CGPoint.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static CGPoint.Buffer createSafe(long address, int capacity)
public static CGPoint mallocStack()
CGPoint instance allocated on the thread-local MemoryStack.public static CGPoint callocStack()
CGPoint instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static CGPoint mallocStack(org.lwjgl.system.MemoryStack stack)
CGPoint instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static CGPoint callocStack(org.lwjgl.system.MemoryStack stack)
CGPoint instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static CGPoint.Buffer mallocStack(int capacity)
CGPoint.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static CGPoint.Buffer callocStack(int capacity)
CGPoint.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static CGPoint.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CGPoint.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static CGPoint.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CGPoint.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static double nx(long struct)
x().public static double ny(long struct)
y().public static void nx(long struct,
double value)
x.public static void ny(long struct,
double value)
y.Copyright LWJGL. All Rights Reserved. License terms.