Page 1 of 1

set vertex position

Posted: Sun Sep 15, 2013 4:49 pm
by byllgrim
how can i get a vertex from a mesh and change its position?

sorry if this was too easy and should be on the newb help board

Re: set vertex position

Posted: Mon Sep 16, 2013 6:47 am
by chronologicaldot
Suppose you have a mesh called "m".

Code: Select all

 
void* vertices = m->getMeshBuffer(0)->getVertices();
 
I put vertices as "void* " to tell you what the function itself returns. In actuality, void* should be replaced by whatever vertex type is used in the mesh. I believe this is irr::video::S3DVertex by default.

Re: set vertex position

Posted: Thu Sep 19, 2013 3:34 pm
by byllgrim
i was set off by the fact that it returned void, and therefore didnt understand that it should be placed in a S3DVertex. Thanks, i will try what you said

edit:
thanks a lot!
http://puu.sh/4vwGX.PNG