Page 1 of 1

How do I get an object from a .irr file?

Posted: Tue Apr 04, 2017 11:58 pm
by MrHypercube
What can I say? I already put the question in the title.

Re: How do I get an object from a .irr file?

Posted: Wed Apr 05, 2017 2:21 am
by kornwaretm
well if you talking about the irr file it self, then it is a mater of reading xml file (check xml reading example). if you talking about the loaded scene, there are many ways, such as
1. sceneManager->getSceneNodeFromId(id); // specify id in the editor
2. sceneManager->getSceneNodeFromName(name); // specify id in the editor
3. sceneCollisionManager->getCollisionResultPosition(); // check the doc i forgot the parameters, one of them is "out node", for example check collision tutorial
4. sceneCollisionManager->getSceneNodeFromCameraBB();// check the doc i forgot the parameters, one of them is "out node", for example check collision tutorial
5. sceneCollisionManager->getSceneNodeFromRayBB();// check the doc i forgot the parameters, one of them is "out node", for example check collision tutorial

here are links
collision tutorial http://irrlicht.sourceforge.net/docu/example007.html
xml tutorial http://irrlicht.sourceforge.net/docu/example025.html

here is irredit interface, notice the id and name input text. fill it with desired name or id, probably there would be performance difference between using sign integer (id) and string (c8*) when calling getSceneNodeFrom id or getSceneNodeFromName, but it will not significantly noticeable depends on the node count, never test this though.
Image