my scenenode has 3 object,how to get mesh by name ??
i want to make one not visible.
get mesh by name
Re: get mesh by name
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: get mesh by name
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.
Maybe you're also just looking for a scene loader instead of a mesh loader? Maybe give some more information about this whole story.
Re: get mesh by name
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm