Loading mesh from *.irr file
-
- Posts: 27
- Joined: Wed Dec 12, 2007 7:05 pm
Loading mesh from *.irr file
The title tels it all...I wanna load mesh from irrlicht file.My scene manager is called "scene_manager".
-
- Posts: 27
- Joined: Wed Dec 12, 2007 7:05 pm
-
- Posts: 27
- Joined: Wed Dec 12, 2007 7:05 pm
It is pretty easy. You now know that the .irr format describes an entire scene, so
Travis
- Load the scene.
- Now that you have a scene, you need to locate the scene node that holds the mesh you wish to access. The scene manager has methods for locating nodes by name, type or id.
- Check the type of the scene node, and cast the scene node pointer to the correct derived scene node type.
- Ask the derived scene node for its mesh.
Travis
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
-
- Posts: 27
- Joined: Wed Dec 12, 2007 7:05 pm
Viron, you need to write a tutorial on this and then add it to your signature, it would save so much time Or just post something, feel free to add it into the irrlicht manual.. Just add chapter 11 on irredit if you wish
Also Ivo it wont work This question has been asked hundreds of times. I wonder why niko does not just make a mesh exporter for irredit, on the subject would it even be possible.
Also Ivo it wont work This question has been asked hundreds of times. I wonder why niko does not just make a mesh exporter for irredit, on the subject would it even be possible.
Programming Blog: http://www.uberwolf.com
sceneManager->getMesh loads a mesh from an external file - when you load a .irr file it loads all the meshes and scene nodes automatically. Once you have loaded the .irr file you can get a specified mesh by:
this works only if you no the name of a node who 'owns' the mesh
Code: Select all
sceneManager->loadScene("scene.irr"); //load the scene
ISceneNode* node = getNodeFromName(name); //get the scene node from its name
//turn type ISceneNode into type IMeshSceneNode
IMeshSceneNode* meshSceneNode = (IMeshSceneNode*) node;
return meshSceneNode->getMesh(); //return the mesh nodes mesh
"Internet, whats that?"
-Bill Gates
-Bill Gates