Page 1 of 1

Get submesh information?

Posted: Thu Aug 14, 2014 6:59 am
by Samuel
Hello everyone,

Does anyone know of a way to get a hold of a meshes submesh information after the mesh has been loaded?
I'm mainly looking for how many submeshes exist within the mesh.
I know I can figure out how many a mesh has outside of Purebasic, but for this program I'm working on that's not really a good option.

Any examples or ideas are appreciated.

Re: Get submesh information?

Posted: Thu Aug 14, 2014 7:27 am
by applePi
how many submeshes exist within the mesh.
i haven't noticed it before, it is SubMeshCount()
as an example, add this
Result = SubMeshCount(0)
Debug Result
after line 88 in the example MeshManual.pb in Examples\3D\ folder, and it will return 5, the number of faces of the pyramid

Re: Get submesh information?

Posted: Thu Aug 14, 2014 7:33 am
by Samuel
Thanks ApplePi!
I looked through the help files at least 3 times and I guess I missed it every time. :lol:
I need to go pick up some glasses because it looks like I need them. :D