At the moment, with the major use case, which is playing back glTF
animations, one can't use atStrict() because there Extrapolation is
specified to be always Constant. The atStrict() function behaves as
Extrapolate and one would need to patch the imported tracks to add
explicit keyframes at the beginning/end of the duration that emulate the
Constant behavior.
I managed to work around that for Emscripten 1.38.5 by adding an
explicit definition of noexcept Player::Track copy
constructor/assignment, but that didn't solve anything for Emscripten,
iOS or Android. Since I can't reproduce that on *anything* I have on
this machine and it seems that the problem somehow just goes away when
using a more recent Clang, I decided to just remove the noexcept
specifier altogether.
I had a temptation to make it noexcept everywhere except Clang, but that
might add potential portability issues (code that works with GCC would
suddenly break on Clang without any clear reason).
Note that I don't mean all possible underlying types, just all possible
vector classes. This is needed for splines etc. which may be templated
and have result type a generic vector, for example.
For consistency with all other views such as Containers::ArrayView as
these are all relatively light types and so the construction should be
lightweight as well. OTOH, Track constructors are still explicit because
they're heavy and the user should experience the heaviness firsthand.
This reduces the templated code a bit, as I moved the index assertion to
the *.cpp file. Also the function now returns a reference to avoid
needless copies -- it's a view, but still quite a heavy view.
Moreover, this will prevent from passing e.g. integer-based keys to
Trade::AnimationData. And this also now allows me to add duration() to
Trade::AnimationData. I also moved all accessors that don't need a
concrete value type to this base class.
I introduced *strong* enum with values, in a subnamespace, that have the
same name as completely unrelated typedefs. Guess what?! It breaks ALL
LINKS TO THOSE TYPEDEFS! **EVERYWHERE!!!**
Or via an enum + func ptr. Main goal of this is to provide a hint to
users who want to supply their own interpolator (for example with a
different perf/correctness tradeoff, or a optimized/inlined/batch
version etc.).
Will be used to supply general desired interpolation method to tracks to
make it possible for the user to decide about a particular interpolator
function for given type.
Important: the rotation() accessor now allows non-uniform scaling but
expects orthogonality (previously it allowed non-orthogonal rotation
axes but disallowed non-uniform scaling).
Documentation of all these accessors is further improved now as well.
The data are immutable by design, so it's a special "move constructor".
Usable when a plugin in proxying image import to external importers
(such as AnyImageImporter) and wants to attach its own state to the
result.