get mesh by name

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
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

get mesh by name

Post by kaliber »

my scenenode has 3 object,how to get mesh by name ??
i want to make one not visible.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: get mesh by name

Post by CuteAlien »

Meshes have no names so far in Irrlicht. What you can sometimes do is use some part of the material (for example the texturename) to recognize a certain meshbuffer. For example you could set a second texture with a specific meaning on the material in your modeling tool and then after loading check for all materials containing that texture and do something with them.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: get mesh by name

Post by hybrid »

Actually, meshes have names (usually their filenames), as long as they are requested from the MeshCache. Here, a scene node is probably more relevant, though. These also have names, one for each object. But in your case the "separate" objects seem to come from one mesh (i.e. mesh file) and are thus in one scene node. And for Irrrlicht, these components are all loaded into one mesh, as separate mesh buffers. And for mesh buffers all from above holds as listed by CuteAlien.
Maybe you're also just looking for a scene loader instead of a mesh loader? Maybe give some more information about this whole story.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: get mesh by name

Post by CuteAlien »

Ah sorry yes - meshes have names. But you have only one mesh per scenenode, so I automatically assumed MeshBuffers are meant. And those don't have names.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply