Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tweener framework for c++?

Tags:

c++

tweener

for ActionScript there are quite a few "tweening" frameworks to facilitate animating objects. for example TweenLite: http://www.greensock.com/tweenlite/

it allows to animate an arbitrary object with a single line of code:

Pseudocode: tween(myObject, 3.0f, {xpos:300});

what this line of code does is instanciating a new tweening object, which will step by step, during 3 seconds, animate the "xpos" property of 'myObject' from whatever value it currently has to 300. additionally it allows to use a variaty of different interpolation functions.

So in order to animate an object to a new point, i can write a single line of code and forget about it (the tweening object will destroy itself once it finished animating the value).

My Question is, whether there is anything comparable for c++?

I know that those languages are completely different. Anyway - i think it should be possible and would be highly convenient so if anyone knows a framework that does the trick, would be welcome :)

thanks!

like image 413
Mat Avatar asked Aug 17 '10 19:08

Mat


2 Answers

I have stumbled upon libClaw's tweeners, and it looks promising - well documented, pretty mature and more or less alive.

I'm not sure I like the fact that it operates on doubles only whereas I would need it primarily for floats and sometimes ints, but I don't think the double calculation and casting performance penalty should be too big...

like image 61
nietaki Avatar answered Nov 16 '22 02:11

nietaki


How about cpptweener. Of course which is ported from the awesome as3 tweener library.

like image 25
Ryan Christensen Avatar answered Nov 16 '22 04:11

Ryan Christensen