public class AIUVTransform
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
This is just a helper structure for the Assimp._AI_MATKEY_UVTRANSFORM_BASE key. See its documentation for more details.
Typically you'll want to build a matrix of this information. However, we keep separate scaling/translation/rotation values to make it easier to process and optimize UV transformations internally.
mTranslation – Translation on the u and v axes. The default value is (0|0).mScaling – Scaling on the u and v axes. The default value is (1|1).mRotation – Rotation - in counter-clockwise direction. The rotation angle is specified in radians. The rotation center is 0.5f|0.5f. The default value 0.f.
struct aiUVTransform {
struct aiVector2D mTranslation;
struct aiVector2D mScaling;
float mRotation;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AIUVTransform.Buffer
An array of
AIUVTransform structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MROTATION
The struct member offsets.
|
static int |
MSCALING
The struct member offsets.
|
static int |
MTRANSLATION
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AIUVTransform(java.nio.ByteBuffer container)
Creates a
AIUVTransform instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AIUVTransform |
calloc()
Returns a new
AIUVTransform instance allocated with memCalloc. |
static AIUVTransform.Buffer |
calloc(int capacity)
Returns a new
AIUVTransform.Buffer instance allocated with memCalloc. |
static AIUVTransform |
callocStack()
Returns a new
AIUVTransform instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIUVTransform.Buffer |
callocStack(int capacity)
Returns a new
AIUVTransform.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIUVTransform.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIUVTransform.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIUVTransform |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIUVTransform instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIUVTransform |
create()
Returns a new
AIUVTransform instance allocated with BufferUtils. |
static AIUVTransform.Buffer |
create(int capacity)
Returns a new
AIUVTransform.Buffer instance allocated with BufferUtils. |
static AIUVTransform |
create(long address)
Returns a new
AIUVTransform instance for the specified memory address. |
static AIUVTransform.Buffer |
create(long address,
int capacity)
Create a
AIUVTransform.Buffer instance at the specified memory. |
static AIUVTransform |
createSafe(long address)
|
static AIUVTransform.Buffer |
createSafe(long address,
int capacity)
|
static AIUVTransform |
malloc()
Returns a new
AIUVTransform instance allocated with memAlloc. |
static AIUVTransform.Buffer |
malloc(int capacity)
Returns a new
AIUVTransform.Buffer instance allocated with memAlloc. |
static AIUVTransform |
mallocStack()
Returns a new
AIUVTransform instance allocated on the thread-local MemoryStack. |
static AIUVTransform.Buffer |
mallocStack(int capacity)
Returns a new
AIUVTransform.Buffer instance allocated on the thread-local MemoryStack. |
static AIUVTransform.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIUVTransform.Buffer instance allocated on the specified MemoryStack. |
static AIUVTransform |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIUVTransform instance allocated on the specified MemoryStack. |
float |
mRotation()
Returns the value of the
mRotation field. |
AIVector2D |
mScaling()
Returns a
AIVector2D view of the mScaling field. |
AIVector2D |
mTranslation()
Returns a
AIVector2D view of the mTranslation field. |
static float |
nmRotation(long struct)
Unsafe version of
mRotation(). |
static AIVector2D |
nmScaling(long struct)
Unsafe version of
mScaling(). |
static AIVector2D |
nmTranslation(long struct)
Unsafe version of
mTranslation(). |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MTRANSLATION
public static final int MSCALING
public static final int MROTATION
public AIUVTransform(java.nio.ByteBuffer container)
AIUVTransform 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 AIVector2D mTranslation()
AIVector2D view of the mTranslation field.public AIVector2D mScaling()
AIVector2D view of the mScaling field.public float mRotation()
mRotation field.public static AIUVTransform malloc()
AIUVTransform instance allocated with memAlloc. The instance must be explicitly freed.public static AIUVTransform calloc()
AIUVTransform instance allocated with memCalloc. The instance must be explicitly freed.public static AIUVTransform create()
AIUVTransform instance allocated with BufferUtils.public static AIUVTransform create(long address)
AIUVTransform instance for the specified memory address.@Nullable public static AIUVTransform createSafe(long address)
public static AIUVTransform.Buffer malloc(int capacity)
AIUVTransform.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIUVTransform.Buffer calloc(int capacity)
AIUVTransform.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIUVTransform.Buffer create(int capacity)
AIUVTransform.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static AIUVTransform.Buffer create(long address, int capacity)
AIUVTransform.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AIUVTransform.Buffer createSafe(long address, int capacity)
public static AIUVTransform mallocStack()
AIUVTransform instance allocated on the thread-local MemoryStack.public static AIUVTransform callocStack()
AIUVTransform instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static AIUVTransform mallocStack(org.lwjgl.system.MemoryStack stack)
AIUVTransform instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static AIUVTransform callocStack(org.lwjgl.system.MemoryStack stack)
AIUVTransform instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static AIUVTransform.Buffer mallocStack(int capacity)
AIUVTransform.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static AIUVTransform.Buffer callocStack(int capacity)
AIUVTransform.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static AIUVTransform.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIUVTransform.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static AIUVTransform.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIUVTransform.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 AIVector2D nmTranslation(long struct)
mTranslation().public static AIVector2D nmScaling(long struct)
mScaling().public static float nmRotation(long struct)
mRotation().Copyright LWJGL. All Rights Reserved. License terms.