Package org.lwjgl.assimp
Class AIQuaternion
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIQuaternion
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class AIQuaternion extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Represents a quaternion in a 4D vector.Member documentation
w
– The w componentx
– The x componenty
– The y componentz
– The z component
Layout
struct aiQuaternion { float w; float x; float y; float z; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AIQuaternion.Buffer
An array ofAIQuaternion
structs.
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description AIQuaternion(java.nio.ByteBuffer container)
Creates aAIQuaternion
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static AIQuaternion
calloc()
Returns a newAIQuaternion
instance allocated withmemCalloc
.static AIQuaternion.Buffer
calloc(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated withmemCalloc
.static AIQuaternion
callocStack()
Returns a newAIQuaternion
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIQuaternion.Buffer
callocStack(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIQuaternion.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIQuaternion
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIQuaternion
create()
Returns a newAIQuaternion
instance allocated withBufferUtils
.static AIQuaternion.Buffer
create(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated withBufferUtils
.static AIQuaternion
create(long address)
Returns a newAIQuaternion
instance for the specified memory address.static AIQuaternion.Buffer
create(long address, int capacity)
Create aAIQuaternion.Buffer
instance at the specified memory.static AIQuaternion
createSafe(long address)
static AIQuaternion.Buffer
createSafe(long address, int capacity)
static AIQuaternion
malloc()
Returns a newAIQuaternion
instance allocated withmemAlloc
.static AIQuaternion.Buffer
malloc(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated withmemAlloc
.static AIQuaternion
mallocStack()
Returns a newAIQuaternion
instance allocated on the thread-localMemoryStack
.static AIQuaternion.Buffer
mallocStack(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated on the thread-localMemoryStack
.static AIQuaternion.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion.Buffer
instance allocated on the specifiedMemoryStack
.static AIQuaternion
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion
instance allocated on the specifiedMemoryStack
.AIQuaternion
set(AIQuaternion src)
Copies the specified struct data to this struct.AIQuaternion
set(float w, float x, float y, float z)
Initializes this struct with the specified values.int
sizeof()
float
w()
Returns the value of thew
field.AIQuaternion
w(float value)
Sets the specified value to thew
field.float
x()
Returns the value of thex
field.AIQuaternion
x(float value)
Sets the specified value to thex
field.float
y()
Returns the value of they
field.AIQuaternion
y(float value)
Sets the specified value to they
field.float
z()
Returns the value of thez
field.AIQuaternion
z(float value)
Sets the specified value to thez
field.
-
-
-
Constructor Detail
-
AIQuaternion
public AIQuaternion(java.nio.ByteBuffer container)
Creates aAIQuaternion
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
-
w
public float w()
Returns the value of thew
field.
-
x
public float x()
Returns the value of thex
field.
-
y
public float y()
Returns the value of they
field.
-
z
public float z()
Returns the value of thez
field.
-
w
public AIQuaternion w(float value)
Sets the specified value to thew
field.
-
x
public AIQuaternion x(float value)
Sets the specified value to thex
field.
-
y
public AIQuaternion y(float value)
Sets the specified value to they
field.
-
z
public AIQuaternion z(float value)
Sets the specified value to thez
field.
-
set
public AIQuaternion set(float w, float x, float y, float z)
Initializes this struct with the specified values.
-
set
public AIQuaternion set(AIQuaternion src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AIQuaternion malloc()
Returns a newAIQuaternion
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIQuaternion calloc()
Returns a newAIQuaternion
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIQuaternion create()
Returns a newAIQuaternion
instance allocated withBufferUtils
.
-
create
public static AIQuaternion create(long address)
Returns a newAIQuaternion
instance for the specified memory address.
-
createSafe
@Nullable public static AIQuaternion createSafe(long address)
-
malloc
public static AIQuaternion.Buffer malloc(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIQuaternion.Buffer calloc(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIQuaternion.Buffer create(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIQuaternion.Buffer create(long address, int capacity)
Create aAIQuaternion.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIQuaternion.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIQuaternion mallocStack()
Returns a newAIQuaternion
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIQuaternion callocStack()
Returns a newAIQuaternion
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIQuaternion mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIQuaternion callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static AIQuaternion.Buffer mallocStack(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIQuaternion.Buffer callocStack(int capacity)
Returns a newAIQuaternion.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static AIQuaternion.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static AIQuaternion.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIQuaternion.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-