Page 1 of 1

How to draw filled 2D polygons?

Posted: Fri Jul 07, 2006 11:31 am
by alc
I want to draw a arbitrary filled 2D polygon, but Irrlicht only supports circle-like non-filled polygons in 2D. More specfically, I need to make a dial for a gauge. The gauge itself is a usual 2d image, but the moving dial I cannot figure out how to do. Any clues on how to do this?

Posted: Fri Jul 07, 2006 1:00 pm
by Spintz
I'd just draw it as a 2d image, with transparenct, put the origin at the swivel point and rotate it around that swivel point.

Posted: Sat Jul 08, 2006 1:41 pm
by alc
Well, that was actually my first idea. But I cannot find any method (through Irrlicht, anyway) for rotating an image? I guess you're saying this is possible, but how, then?

Posted: Fri Jul 21, 2006 9:14 pm
by cederron
Just create a plane ( a 3d polygonal plane ) and assign a texture with alpha color to it ( alpha color is a special color that is transparent. Once you have this object loaded as a scene node you can rotate it as much as you want, or scale it, translate, etc.