count mesh triangles
count mesh triangles
how do i easily find out (during irrlicht runtime) how many triangles a specific mesh has?
momentary i make a meshbuffer and get the triangle count with getIndexCount(); ... but i don't know if this is right o.o
but now, i'll try your variant
----
edit: another prob:
i've got the indices pointer with getIndices();, but how do i get the indices themselves so i can do something like that o.o?
but now, i'll try your variant
----
edit: another prob:
i've got the indices pointer with getIndices();, but how do i get the indices themselves so i can do something like that o.o?
Code: Select all
for(i=0;i<indexcount;i++){
triangle[i].indices[0] = >insert index i*3 here<;
triangle[i].indices[1] = >insert index i*3+1 here<;
triangle[i].indices[2] = >insert index i*3+2 here<;
}-
madinitaly
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
Code: Select all
u16* Indices = myMesh->getMeshBuffer (0)->getIndices ();