How to create capsule mesh ???
How to create capsule mesh ???
How to create capsule mesh? There is nothing like this in CGeometryCreator ! I need both Index Buffers and Vertex Buffers with Texture Coordinates and Normals.
Re: How to create capsule mesh ???
Create a sphere and scale it. Real capsule (cylinder + 2 half-spheres) is not yet there I think, so you would have to do that yourself.
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
Re: How to create capsule mesh ???
Didnt think about it, lol.
Still, it would be cool to add "createCapsuleMesh" to CGeometryCreator.
Still, it would be cool to add "createCapsuleMesh" to CGeometryCreator.
Re: How to create capsule mesh ???
maybe create 2 halfspheres from one full sphere or 2 skydomes and add a cylinder in the middle, if thats what you seek
EDIT: at least you have to recalculate UV-coords, but the big question is, how many textures shall be used 1,2 or 3?
the createSphereMesh in CGeometryCreator seems to separate indices in top and bottom half, so this would be easy to adapt,
just go the indices for top, save the vertices at these indices with added half cylinder height to cap-mesh, save vertices with substracted half cylinder height and finally the cylinder itself.
EDIT: at least you have to recalculate UV-coords, but the big question is, how many textures shall be used 1,2 or 3?
the createSphereMesh in CGeometryCreator seems to separate indices in top and bottom half, so this would be easy to adapt,
just go the indices for top, save the vertices at these indices with added half cylinder height to cap-mesh, save vertices with substracted half cylinder height and finally the cylinder itself.