Assimp: aiNode Struct Reference

assimp - Open Asset Import Library

A node in the imported hierarchy. More...

Public Member Functions

 aiNode ()
 Constructor. More...
 
 aiNode (const std::string &name)
 Construction from a specific name. More...
 
const aiNodeFindNode (const aiString &name) const
 Searches for a node with a specific name, beginning at this nodes. More...
 
aiNodeFindNode (const aiString &name)
 
const aiNodeFindNode (const char *name) const
 
aiNodeFindNode (const char *name)
 
 ~aiNode ()
 Destructor. More...
 

Public Attributes

aiNode ** mChildren
 The child nodes of this node. More...
 
unsigned int * mMeshes
 The meshes of this node. More...
 
aiMetadatamMetaData
 Metadata associated with this node or NULL if there is no metadata. More...
 
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...
 
aiNodemParent
 Parent node. More...
 
aiMatrix4x4 mTransformation
 The transformation relative to the node's parent. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

aiNode::aiNode ( )
inline

Constructor.

aiNode::aiNode ( const std::string &  name)
inlineexplicit

Construction from a specific name.

aiNode::~aiNode ( )
inline

Destructor.

Member Function Documentation

const aiNode* aiNode::FindNode ( const aiString name) const
inline

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.

Parameters
nameName to search for
Returns
NULL or a valid Node if the search was successful.
aiNode* aiNode::FindNode ( const aiString name)
inline
const aiNode* aiNode::FindNode ( const char *  name) const
inline
aiNode* aiNode::FindNode ( const char *  name)
inline

Member Data Documentation

aiNode** aiNode::mChildren

The child nodes of this node.

NULL if mNumChildren is 0.

unsigned int* aiNode::mMeshes

The meshes of this node.

Each entry is an index into the mesh list of the aiScene.

aiMetadata* aiNode::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.

aiString aiNode::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> 

.

unsigned int aiNode::mNumChildren

The number of child nodes of this node.

unsigned int aiNode::mNumMeshes

The number of meshes of this node.

aiNode* aiNode::mParent

Parent node.

NULL if this node is the root node.

aiMatrix4x4 aiNode::mTransformation

The transformation relative to the node's parent.

The documentation for this struct was generated from the following file:
Generated on Sun Feb 21 2016 19:42:29 for Assimp by   doxygen 1.8.11