Boost logo

Boost :

Subject: Re: [boost] Interest in a tweener library
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2012-07-13 11:29:47


Hi,

Indeed, this library is very interesting, in particular in my domain (video
games and other interactive and animated softwares).
I used cpptweener before and wanted to update it to get more modern, but
didn't found the time to in the end.

I have some questions after having read the documentation page and some of
the API doc:

1. Why does these types always accept double only? Is there a specific
reason? I think this is greatly limiting the potential use of the library,
because most use I've seen and done don't use double and sometime use
custom value types. So I think it needs to be templatized to allow the user
to provide the value type.
2. If you templatize, then I would like to know the kind of concepts
accepted by each ease function. This kind of library is very useful when
you can use the same code to interpolate, for example, 2D and 3D vectors,
instead of just a value. So it is important to says clearly which
operations have to be implemented for the value type to work with the ease.
3. My understanding of the tweening concepts isn't complete, but maybe you
can light me up: isn't there special maths that need to be supported if you
want to "tween" an orientation value? (I mean any object that represent an
orientation). Interpolation of orientation/rotation is as useful as other
values to me.
4. I see in tweener_group/sequence that the insert function take a const
reference to a tweener. This is a bit obscure: does it imply a copy of the
tweener or does it mean that I have to keep the lifetime of the tweener
during the existence of the group/sequence? If it is a copy (I hope it is)
then making the copy in the interface would be both useful and explicit. If
not, using smart pointers would be necessary (to me at least).
5. Why is the clone function in base_tweener needed?
6. I suppose that there is no problem using lambdas to define update
functions?
7. On performance side, shouldn't ease functions be inlined or template
instead of implemented in the cpp file?
8. The difference between single_tweener and tweener isn't clear to me. Can
you explain?

Thanks

Joel Lamotte


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk