PDA

View Full Version : The best approach to program an interactive graphical application?



Cruz
9th July 2009, 12:42
Hello there!

I'm about to start a new Qt project. The task is to develop a little interactive 2D simulation of a walking stick figure and I'm wondering what's the best approach to use.

The stick figure is only a head with two legs and it's controled by providing sequences of joint angles for the hips. From the given joint angles plus a very simple physics engine a pose of the stick figure is calculated and rendered on the screen. Additionally it should be possible to give the stick figure a little push with the mouse.

Which way should I go? Should I use the standard painting methods that Qt provides together with QTtransform? Or is the Graphics View Framework a better choice? Or should I try to use SVG or even OpenGL?

Thanks,
Cruz

alisami
9th July 2009, 13:14
Are you going to have some interaction with the mouse and perform some operations on the figure or are you intending to just draw the figure using some inputs from some text boxes?
If you only want to draw the result to the screen, you can choose either choice.
My choice would be the Graphics View Framework and you can develop the above easily. Also it would be easier for you to extend your requirements if you want to.
You can check the elastic nodes example to see the Graphics View Framework in action.
If you give some detailed information, we can provide a better answer.

alisami

nish
9th July 2009, 14:13
at animation frameworks comes with a ready made example of stick man