Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just readed this tutorial about load a 3D model file: Its render routine uses a recursive_render function to scan all node.

My question:

  1. What is a aiNode struct store?
  2. What different form this method and above method:

    for (int i=0; imNumMesh; ++i) { draw scene->mMeshes[i]; }

Thanks for reading!

share|improve this question
up vote 2 down vote accepted

1) The aiNode struct is defined in the Assimp library. Here you can find it its definition on the official documentation:

Public Attributes
aiNode **       mChildren       // The child nodes of this node.
unsigned int *  mMeshes         // The meshes of this node.
aiString        mName           // The name of the node.
unsigned int    mNumChildren    // The number of child nodes of this node.
unsigned int    mNumMeshes      // The number of meshes of this node.
aiNode *        mParent         // Parent node.
aiMatrix4x4     mTransformation // The transformation relative to the node's parent. 

2) I don't know what is the difference between "your method" and recursive_render, but looks like you are missing a lot of information (childs, etc). I'd have a closer look to recursive_render

share|improve this answer
thanks for reply, that is what i do not understands, why they are divided model into more "nodes" but not only meshes? – Bình Nguyên Jun 20 '12 at 15:29
For a definition of "node", I recommend that you read the section about "The Node Hierarchy" from "A node can potentially refer to single or multiple meshes. The meshes are not stored inside the node, but instead in an array of aiMesh inside the aiScene. A node only refers to them by their array index. This also means that multiple nodes can refer to the same mesh, which provides a simple form of instancing." – Dan Jun 20 '12 at 15:45
thanks for your reply :) – Bình Nguyên Jun 20 '12 at 15:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.