I create an object with vertex and indexes.
Everything is in a vertexbuffer. I can display it with drawMeshBuffer(...) IVideoDrivers's function.
The problem is that I can't interact with this object as I should with an IMesh. I want to be able to use the SceneCollisionManager to detect a point I select on my object.
So the question is how can I transform my meshbuffer to an IMesh ?
[SOLVED] MeshBuffer to Mesh
[SOLVED] MeshBuffer to Mesh
Last edited by LeGars on Mon Feb 19, 2007 2:26 pm, edited 1 time in total.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=17028
Also look at IMesh.h and SMesh.h and Irr help. You will find there all you need.
Also look at IMesh.h and SMesh.h and Irr help. You will find there all you need.
Thanks for the link,
I discover that usefull method : addMeshBuffer(...)
Exactly what I was looking for.
I just add a new constructor to SMesh.h :
I discover that usefull method : addMeshBuffer(...)
Exactly what I was looking for.
I just add a new constructor to SMesh.h :
Code: Select all
SMesh(IMeshBuffer* mb)
{
this->addMeshBuffer(mb);
}
I Prefer to add this constructor because I work with the DeusEx's .Net wrapper and the addMeshbuffer method is not implemented.
Because I do not completly undestand how this wrapper works, I add this to the original source and create my own contructor in the wrapper.
Yeah I know it sounds crazy, but my project's demo deadline approch and I don't have enough time to create an optimized and personalized wrapper...
So, this is the reason
When my project will end, I will invest myself in Irrlicht's .Net but I don't already know in which wrapper (DeusEx or Irrlicht)...
Because I do not completly undestand how this wrapper works, I add this to the original source and create my own contructor in the wrapper.
Yeah I know it sounds crazy, but my project's demo deadline approch and I don't have enough time to create an optimized and personalized wrapper...
So, this is the reason
When my project will end, I will invest myself in Irrlicht's .Net but I don't already know in which wrapper (DeusEx or Irrlicht)...