Added virtual function get_value_for() that can pick the correct data
from a Matrix (and later also for a vector or a float array) (wip)
this is in preparation for adding Sample data for Materials, light and camera
Those animations do not need matrix values, but either simple float arrays
or float vector arrays. I still want to handle those animation samples
in the same way as the Matrix samples. So i try to use a class hierarchy here
with the base class BCSample and derived classes where BCMatrix is the only
implemented subclass so far. (wip)
For Materials, Camera, Lamp actions it turned out that the sampler
can not sample the data at the moment. So for those curves i need
to get the data from the original curves for now. I Added a getter
that would retreive the data from the FCurve instead from the sampled
data if no sampled data is available. This will change (wip)
Known limitation: the Material,Lamp,Camera actions are always
exported with linear interpolation (wip)
Actually the new classes are not depending on Collada itself.
They coul dbe reused for other purposes as well, for example
as a general helper tool for Animation export.
Renamed AnimationCurveCache to BCAnimationCurveContainer
because this is really not a cache but just a set of Data that
prepares the export of FCurves. This container only lives during
export and is otherwiose not used for anything else.
The BCAnimationCurveContainer is not depending on Collada in any way.
Theoretically it could be used also from Python, but this is another story.
Additions in more detail:
Classes:
* BCAnimationCurve
a wrapper for handling FCurves tied to an object within the
Animation Exporter
* BCAnimationCurveContainer
A container to keep all FCurves in one place. It also maintains
creation and deletion of temporary FCurves needed to export data
without interfering with the User's production data in Blender.
* BCMatrix
Handy class for making float mat[4][4] a primetime resident in
the code. Not necessary but nice.
Support functions:
* bc_get_children(std::vector<Object *> &child_set, Object *ob, Scene *scene)
returns the immediate children of an object into a set
* bc_string_after(const std::string& s, const char c)
returns the string after the last occurance of char
* bc_startswith(std::string const & value, std::string const & starting)
returns true if the string starts with the starting sequence
* bc_endswith(std::string const & value, std::string const & ending)
returns true if the string ends with the ending sequence