Package org.lwjgl.assimp
Class AIUVTransform
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIUVTransform
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class AIUVTransform extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Defines how an UV channel is transformed.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.
Layout
struct aiUVTransform {
struct aiVector2D
mTranslation()
;struct aiVector2D
mScaling()
; floatmRotation()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIUVTransform.Buffer
An array ofAIUVTransform
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MROTATION
MSCALING
MTRANSLATIONThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIUVTransform(java.nio.ByteBuffer container)
Creates aAIUVTransform
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AIUVTransform
calloc()
Returns a newAIUVTransform
instance allocated withmemCalloc
.static AIUVTransform.Buffer
calloc(int capacity)
Returns a newAIUVTransform.Buffer
instance allocated withmemCalloc
.static AIUVTransform.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIUVTransform
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIUVTransform
callocStack()
Deprecated.static AIUVTransform.Buffer
callocStack(int capacity)
Deprecated.static AIUVTransform.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIUVTransform
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.static AIUVTransform
create()
Returns a newAIUVTransform
instance allocated withBufferUtils
.static AIUVTransform.Buffer
create(int capacity)
Returns a newAIUVTransform.Buffer
instance allocated withBufferUtils
.static AIUVTransform
create(long address)
Returns a newAIUVTransform
instance for the specified memory address.static AIUVTransform.Buffer
create(long address, int capacity)
Create aAIUVTransform.Buffer
instance at the specified memory.static AIUVTransform
createSafe(long address)
static AIUVTransform.Buffer
createSafe(long address, int capacity)
static AIUVTransform
malloc()
Returns a newAIUVTransform
instance allocated withmemAlloc
.static AIUVTransform.Buffer
malloc(int capacity)
Returns a newAIUVTransform.Buffer
instance allocated withmemAlloc
.static AIUVTransform.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform.Buffer
instance allocated on the specifiedMemoryStack
.static AIUVTransform
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform
instance allocated on the specifiedMemoryStack
.static AIUVTransform
mallocStack()
Deprecated.static AIUVTransform.Buffer
mallocStack(int capacity)
Deprecated.static AIUVTransform.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIUVTransform
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.float
mRotation()
Rotation - in counter-clockwise direction.AIVector2D
mScaling()
Scaling on the u and v axes.AIVector2D
mTranslation()
Translation on the u and v axes.static float
nmRotation(long struct)
Unsafe version ofmRotation()
.static AIVector2D
nmScaling(long struct)
Unsafe version ofmScaling()
.static AIVector2D
nmTranslation(long struct)
Unsafe version ofmTranslation()
.int
sizeof()
-
-
-
Constructor Detail
-
AIUVTransform
public AIUVTransform(java.nio.ByteBuffer container)
Creates aAIUVTransform
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
-
mTranslation
public AIVector2D mTranslation()
Translation on the u and v axes. The default value is (0|0).
-
mScaling
public AIVector2D mScaling()
Scaling on the u and v axes. The default value is (1|1).
-
mRotation
public float 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.
-
malloc
public static AIUVTransform malloc()
Returns a newAIUVTransform
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIUVTransform calloc()
Returns a newAIUVTransform
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIUVTransform create()
Returns a newAIUVTransform
instance allocated withBufferUtils
.
-
create
public static AIUVTransform create(long address)
Returns a newAIUVTransform
instance for the specified memory address.
-
createSafe
@Nullable public static AIUVTransform createSafe(long address)
-
malloc
public static AIUVTransform.Buffer malloc(int capacity)
Returns a newAIUVTransform.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIUVTransform.Buffer calloc(int capacity)
Returns a newAIUVTransform.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIUVTransform.Buffer create(int capacity)
Returns a newAIUVTransform.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIUVTransform.Buffer create(long address, int capacity)
Create aAIUVTransform.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIUVTransform.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static AIUVTransform mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIUVTransform callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIUVTransform mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIUVTransform callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIUVTransform.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AIUVTransform.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIUVTransform.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 AIUVTransform.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static AIUVTransform malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AIUVTransform calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static AIUVTransform.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static AIUVTransform.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIUVTransform.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmTranslation
public static AIVector2D nmTranslation(long struct)
Unsafe version ofmTranslation()
.
-
nmScaling
public static AIVector2D nmScaling(long struct)
Unsafe version ofmScaling()
.
-
nmRotation
public static float nmRotation(long struct)
Unsafe version ofmRotation()
.
-
-