Boost logo

Boost :

Subject: Re: [boost] Progress on the tweener library (was: Interest in a tweener library)
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-07-23 04:27:23


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Julien Jorge
> Sent: Monday, July 23, 2012 7:19 AM
> To: boost_at_[hidden]
> Subject: [boost] Progress on the tweener library (was: Interest in a tweener library)
>
> Hi,
>
> I have created a git repository to receive the Boost.Tweener library.
> It is currently located at
> git://libclaw.git.sourceforge.net/gitroot/libclaw/boost-tweener
> (gitweb:
> http://libclaw.git.sourceforge.net/git/gitweb.cgi?p=libclaw/boost-tweener;a=summary)
>
> I have started the templatization of the classes. Most easing functions are not template yet (only
> easing_none and easing_bounce are template) but will be in a few days. single_tweener has two template
> parameters, which are the type V of the tweened values and the scalar type S associated with V. All other
> classes do not need V and use only S.
>
> There are some points on which I would like to have a feedback:
>
> 1. single_tweener takes a reference to std::swap<V> (see line 90 of
> single_tweener.ipp):
>
> boost::bind( &std::swap<value_type>, boost::ref(val), _1 );
>
> On the non-template version, value_type was double and this line caused a compilation error on Mac:
>
> error: no matching function for call to 'bind(<unresolved overloaded
> function type>, const boost::reference_wrapper<double>,
> boost::arg<1>&)'*
>
> The workaround was to use a custom non-template swap function. Do you have an idea on how to avoid
> the same issue in the new code?
>
> 2. The current directory structure looks like this:
> .
> ├── include
> │ └── boost
> │ └── tweener
> │ ├── detail
> │ │ └── impl
> │ │ └── easing
> │ └── easing
> └── test
>
> There is also a doc and examples folder but they are currently empty and thus not in the git repository. I'm
> not sure about the detail/impl/easing tree. Should I put the implementation of the easing functions in
> boost/tweener/easing/detail/impl instead?
>
> 3. Is there a prefered place to store the git repository?

You will probably save time later (and help acceptance) by following the file structure recommended.

http://www.boost.org/development/requirements.html#Directory_structure

(These Boost structures may seem a bit odd but there are reasons too complicated to discuss here).

Examples should go in the /examples folder and tests in the /test folder ;-)

HTH

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow_at_[hidden]

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