public class AINode
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Each node has name, a parent node (except for the root node), a transformation relative to its parent and possibly several child nodes. Simple file formats don't support hierarchical structures - for these formats the imported scene does consist of only a single root node without children.
mName –
The name of the node.
The name might be empty (length of zero) but all nodes which need to be referenced by either bones or animations are named. Multiple nodes may have the
same name, except for nodes which are referenced by bones (see AIBone and AIMesh::mBones). Their names must be unique.
Cameras and lights reference a specific node by name - if there are multiple nodes with this name, they are assigned to each of them.
There are no limitations with regard to the characters contained in the name string as it is usually taken directly from the source file.
Implementations should be able to handle tokens such as whitespace, tabs, line feeds, quotation marks, ampersands etc.
Sometimes assimp introduces new nodes not present in the source file into the hierarchy (usually out of necessity because sometimes the source
hierarchy format is simply not compatible). Their names are surrounded by <> e.g. <DummyRootNode>.
mTransformation – The transformation relative to the node's parent.mParent – Parent node. NULL if this node is the root node.mNumChildren – The number of child nodes of this node.mChildren – The child nodes of this node. NULL if mNumChildren is 0.mNumMeshes – The number of meshes of this node.mMeshes – The meshes of this node. Each entry is an index into the mesh list of the AIScene.mMetadata –
Metadata associated with this node or NULL if there is no metadata.
Whether any metadata is generated depends on the source file format. See the importer notes page for more information on every source file format. Importers that don't document any metadata don't write any.
struct aiNode {
struct aiString mName;
struct aiMatrix4x4 mTransformation;
struct aiNode * mParent;
unsigned int mNumChildren;
struct aiNode ** mChildren;
unsigned int mNumMeshes;
unsigned int * mMeshes;
struct aiMetadata * mMetadata;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AINode.Buffer
An array of
AINode structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MCHILDREN
The struct member offsets.
|
static int |
MMESHES
The struct member offsets.
|
static int |
MMETADATA
The struct member offsets.
|
static int |
MNAME
The struct member offsets.
|
static int |
MNUMCHILDREN
The struct member offsets.
|
static int |
MNUMMESHES
The struct member offsets.
|
static int |
MPARENT
The struct member offsets.
|
static int |
MTRANSFORMATION
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AINode(java.nio.ByteBuffer container)
Creates a
AINode instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AINode |
calloc()
Returns a new
AINode instance allocated with memCalloc. |
static AINode.Buffer |
calloc(int capacity)
Returns a new
AINode.Buffer instance allocated with memCalloc. |
static AINode |
callocStack()
Returns a new
AINode instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AINode.Buffer |
callocStack(int capacity)
Returns a new
AINode.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AINode.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AINode.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AINode |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AINode instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AINode |
create()
Returns a new
AINode instance allocated with BufferUtils. |
static AINode.Buffer |
create(int capacity)
Returns a new
AINode.Buffer instance allocated with BufferUtils. |
static AINode |
create(long address)
Returns a new
AINode instance for the specified memory address. |
static AINode.Buffer |
create(long address,
int capacity)
Create a
AINode.Buffer instance at the specified memory. |
static AINode |
createSafe(long address)
|
static AINode.Buffer |
createSafe(long address,
int capacity)
|
static AINode |
malloc()
Returns a new
AINode instance allocated with memAlloc. |
static AINode.Buffer |
malloc(int capacity)
Returns a new
AINode.Buffer instance allocated with memAlloc. |
static AINode |
mallocStack()
Returns a new
AINode instance allocated on the thread-local MemoryStack. |
static AINode.Buffer |
mallocStack(int capacity)
Returns a new
AINode.Buffer instance allocated on the thread-local MemoryStack. |
static AINode.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AINode.Buffer instance allocated on the specified MemoryStack. |
static AINode |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AINode instance allocated on the specified MemoryStack. |
org.lwjgl.PointerBuffer |
mChildren()
Returns a
PointerBuffer view of the data pointed to by the mChildren field. |
AINode |
mChildren(org.lwjgl.PointerBuffer value)
Sets the address of the specified
PointerBuffer to the mChildren field. |
java.nio.IntBuffer |
mMeshes()
Returns a
IntBuffer view of the data pointed to by the mMeshes field. |
AINode |
mMeshes(java.nio.IntBuffer value)
Sets the address of the specified
IntBuffer to the mMeshes field. |
AIMetaData |
mMetadata()
Returns a
AIMetaData view of the struct pointed to by the mMetadata field. |
AINode |
mMetadata(AIMetaData value)
Sets the address of the specified
AIMetaData to the mMetadata field. |
AIString |
mName()
Returns a
AIString view of the mName field. |
AINode |
mName(AIString value)
Copies the specified
AIString to the mName field. |
AINode |
mName(java.util.function.Consumer<AIString> consumer)
Passes the
mName field to the specified Consumer. |
int |
mNumChildren()
Returns the value of the
mNumChildren field. |
int |
mNumMeshes()
Returns the value of the
mNumMeshes field. |
AINode |
mParent()
Returns a
AINode view of the struct pointed to by the mParent field. |
AINode |
mParent(AINode value)
Sets the address of the specified
AINode to the mParent field. |
AIMatrix4x4 |
mTransformation()
Returns a
AIMatrix4x4 view of the mTransformation field. |
AINode |
mTransformation(AIMatrix4x4 value)
Copies the specified
AIMatrix4x4 to the mTransformation field. |
AINode |
mTransformation(java.util.function.Consumer<AIMatrix4x4> consumer)
Passes the
mTransformation field to the specified Consumer. |
static org.lwjgl.PointerBuffer |
nmChildren(long struct)
Unsafe version of
mChildren. |
static void |
nmChildren(long struct,
org.lwjgl.PointerBuffer value)
Unsafe version of
mChildren. |
static java.nio.IntBuffer |
nmMeshes(long struct)
Unsafe version of
mMeshes. |
static void |
nmMeshes(long struct,
java.nio.IntBuffer value)
Unsafe version of
mMeshes. |
static AIMetaData |
nmMetadata(long struct)
Unsafe version of
mMetadata(). |
static void |
nmMetadata(long struct,
AIMetaData value)
Unsafe version of
mMetadata. |
static AIString |
nmName(long struct)
Unsafe version of
mName(). |
static void |
nmName(long struct,
AIString value)
Unsafe version of
mName. |
static int |
nmNumChildren(long struct)
Unsafe version of
mNumChildren(). |
static void |
nmNumChildren(long struct,
int value)
Sets the specified value to the
mNumChildren field of the specified struct. |
static int |
nmNumMeshes(long struct)
Unsafe version of
mNumMeshes(). |
static void |
nmNumMeshes(long struct,
int value)
Sets the specified value to the
mNumMeshes field of the specified struct. |
static AINode |
nmParent(long struct)
Unsafe version of
mParent(). |
static void |
nmParent(long struct,
AINode value)
Unsafe version of
mParent. |
static AIMatrix4x4 |
nmTransformation(long struct)
Unsafe version of
mTransformation(). |
static void |
nmTransformation(long struct,
AIMatrix4x4 value)
Unsafe version of
mTransformation. |
AINode |
set(AINode src)
Copies the specified struct data to this struct.
|
AINode |
set(AIString mName,
AIMatrix4x4 mTransformation,
AINode mParent,
org.lwjgl.PointerBuffer mChildren,
java.nio.IntBuffer mMeshes,
AIMetaData mMetadata)
Initializes this struct with the specified values.
|
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MNAME
public static final int MTRANSFORMATION
public static final int MPARENT
public static final int MNUMCHILDREN
public static final int MCHILDREN
public static final int MNUMMESHES
public static final int MMESHES
public static final int MMETADATA
public AINode(java.nio.ByteBuffer container)
AINode 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 AIMatrix4x4 mTransformation()
AIMatrix4x4 view of the mTransformation field.@Nullable public AINode mParent()
AINode view of the struct pointed to by the mParent field.public int mNumChildren()
mNumChildren field.@Nullable public org.lwjgl.PointerBuffer mChildren()
PointerBuffer view of the data pointed to by the mChildren field.public int mNumMeshes()
mNumMeshes field.@Nullable public java.nio.IntBuffer mMeshes()
IntBuffer view of the data pointed to by the mMeshes field.@Nullable public AIMetaData mMetadata()
AIMetaData view of the struct pointed to by the mMetadata field.public AINode mName(java.util.function.Consumer<AIString> consumer)
mName field to the specified Consumer.public AINode mTransformation(AIMatrix4x4 value)
AIMatrix4x4 to the mTransformation field.public AINode mTransformation(java.util.function.Consumer<AIMatrix4x4> consumer)
mTransformation field to the specified Consumer.public AINode mParent(@Nullable AINode value)
AINode to the mParent field.public AINode mChildren(@Nullable org.lwjgl.PointerBuffer value)
PointerBuffer to the mChildren field.public AINode mMeshes(@Nullable java.nio.IntBuffer value)
IntBuffer to the mMeshes field.public AINode mMetadata(@Nullable AIMetaData value)
AIMetaData to the mMetadata field.public AINode set(AIString mName, AIMatrix4x4 mTransformation, @Nullable AINode mParent, @Nullable org.lwjgl.PointerBuffer mChildren, @Nullable java.nio.IntBuffer mMeshes, @Nullable AIMetaData mMetadata)
public AINode set(AINode src)
src - the source structpublic static AINode malloc()
AINode instance allocated with memAlloc. The instance must be explicitly freed.public static AINode calloc()
AINode instance allocated with memCalloc. The instance must be explicitly freed.public static AINode create()
AINode instance allocated with BufferUtils.public static AINode create(long address)
AINode instance for the specified memory address.@Nullable public static AINode createSafe(long address)
public static AINode.Buffer malloc(int capacity)
AINode.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AINode.Buffer calloc(int capacity)
AINode.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AINode.Buffer create(int capacity)
AINode.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static AINode.Buffer create(long address, int capacity)
AINode.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AINode.Buffer createSafe(long address, int capacity)
public static AINode mallocStack()
AINode instance allocated on the thread-local MemoryStack.public static AINode callocStack()
AINode instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static AINode mallocStack(org.lwjgl.system.MemoryStack stack)
AINode instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static AINode callocStack(org.lwjgl.system.MemoryStack stack)
AINode instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static AINode.Buffer mallocStack(int capacity)
AINode.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static AINode.Buffer callocStack(int capacity)
AINode.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static AINode.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AINode.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static AINode.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AINode.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 AIMatrix4x4 nmTransformation(long struct)
mTransformation().public static int nmNumChildren(long struct)
mNumChildren().@Nullable public static org.lwjgl.PointerBuffer nmChildren(long struct)
mChildren.public static int nmNumMeshes(long struct)
mNumMeshes().@Nullable public static java.nio.IntBuffer nmMeshes(long struct)
mMeshes.@Nullable public static AIMetaData nmMetadata(long struct)
mMetadata().public static void nmTransformation(long struct,
AIMatrix4x4 value)
mTransformation.public static void nmParent(long struct,
@Nullable
AINode value)
mParent.public static void nmNumChildren(long struct,
int value)
mNumChildren field of the specified struct.public static void nmChildren(long struct,
@Nullable
org.lwjgl.PointerBuffer value)
mChildren.public static void nmNumMeshes(long struct,
int value)
mNumMeshes field of the specified struct.public static void nmMeshes(long struct,
@Nullable
java.nio.IntBuffer value)
mMeshes.public static void nmMetadata(long struct,
@Nullable
AIMetaData value)
mMetadata.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.