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

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
MrHypercube
Posts: 1
Joined: Tue Apr 04, 2017 11:56 pm

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

Post by MrHypercube »

What can I say? I already put the question in the title.
kornwaretm
Competition winner
Posts: 189
Joined: Tue Oct 16, 2007 3:53 am
Location: Indonesia
Contact:

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

Post 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
Post Reply