Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
|
A node in the imported hierarchy. More...
#include <scene.h>
Public Member Functions | |
void | addChildren (unsigned int numChildren, aiNode **children) |
Will add new children. More... | |
aiNode () | |
Constructor. More... | |
aiNode (const std::string &name) | |
Construction from a specific name. More... | |
aiNode * | FindNode (const aiString &name) |
const aiNode * | FindNode (const aiString &name) const |
Searches for a node with a specific name, beginning at this nodes. More... | |
aiNode * | FindNode (const char *name) |
const aiNode * | FindNode (const char *name) const |
~aiNode () | |
Destructor. More... | |
Public Attributes | |
C_STRUCT aiNode ** | mChildren |
The child nodes of this node. More... | |
unsigned int * | mMeshes |
The meshes of this node. More... | |
C_STRUCT aiMetadata * | mMetaData |
Metadata associated with this node or nullptr if there is no metadata. More... | |
C_STRUCT aiString | mName |
The name of the node. More... | |
unsigned int | mNumChildren |
The number of child nodes of this node. More... | |
unsigned int | mNumMeshes |
The number of meshes of this node. More... | |
C_STRUCT aiNode * | mParent |
Parent node. More... | |
C_STRUCT aiMatrix4x4 | mTransformation |
The transformation relative to the node's parent. More... | |
A node in the imported hierarchy.
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.
aiNode::aiNode | ( | ) |
Constructor.
|
explicit |
Construction from a specific name.
aiNode::~aiNode | ( | ) |
Destructor.
void aiNode::addChildren | ( | unsigned int | numChildren, |
aiNode ** | children | ||
) |
Will add new children.
numChildren | Number of children to add. |
children | The array with pointers showing to the children. |
Searches for a node with a specific name, beginning at this nodes.
Normally you will call this method on the root node of the scene.
name | Name to search for |
aiNode * aiNode::FindNode | ( | const char * | name | ) |
const aiNode * aiNode::FindNode | ( | const char * | name | ) | const |
unsigned int* aiNode::mMeshes |
The meshes of this node.
Each entry is an index into the mesh list of the aiScene.
C_STRUCT aiMetadata* aiNode::mMetaData |
Metadata associated with this node or nullptr 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.
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>
.
unsigned int aiNode::mNumChildren |
The number of child nodes of this node.
unsigned int aiNode::mNumMeshes |
The number of meshes of this node.
C_STRUCT aiMatrix4x4 aiNode::mTransformation |
The transformation relative to the node's parent.