I'm trying to create a cylinder scene node... but I don't see any sort of "addCylinderSceneNode" method -- is there any way to add a cylinder without having to create my own custom scene node?
I looked into custom scene nodes, and I really don't want to dive into specifying all the triangles myself (especially since my cylinder will be stretching and rotating). If there's an easier way, I'd be very happy .
Thanks!
Drawing a cyliner
Re: Drawing a cyliner
Nope there isn't one. I'm glad to hear that you looked before posting. :)Caspian wrote:I'm trying to create a cylinder scene node... but I don't see any sort of "addCylinderSceneNode" method
Yes. You can use an IMeshSceneNode. You can either make the cylinder in a modelling program and then load the mesh like the example programs do for more complicated meshes, or you can create your own mesh buffer, stuff that into a mesh and set the mesh for the scene node.Caspian wrote:is there any way to add a cylinder without having to create my own custom scene node?
Then the best thing to do is to find or make a model of a cylinder and use that.Caspian wrote:I looked into custom scene nodes, and I really don't want to dive into specifying all the triangles myself
Scale and rotation can be done independently from the mesh. If you are going to scale and rotate the cylinder often, you would make a single cylinder primitive that has fixed dimensions [say a diameter of 1 and a length of 1]. If you wanted to make the diameter grow, you would apply a scale factor to the scene node that holds the mesh. So to make the cylinder 2x as tall, you set the scale to core::vector3df(1, 2, 1).Caspian wrote:especially since my cylinder will be stretching and rotating
Travis