6#include <Core/Containers/AlignedAllocator.hpp>
7#include <Core/Math/Math.hpp>
30 virtual inline size_t size()
const = 0;
61template <
typename VALUE_TYPE>
87#pragma omp parallel for
120 return a.first < b.first;
124 auto lower = upper - 1;
143 if (
size() == 1 )
return false;
163 inline VALUE_TYPE
at(
const Scalar& t,
const Interpolator& interpolator )
const {
164 return interpolator( *
this, t );
187 return { i, i, 0_ra };
194 return a.first < b.first;
202 return { i, i, 0_ra };
206 const Scalar t0 = lower->first;
207 const Scalar t1 = upper->first;
208 return { i, i + 1, ( t - t0 ) / ( t1 - t0 ) };
228 return !( *
this == keyframe );
virtual std::vector< Scalar > getTimes() const =0
virtual size_t size() const =0
virtual void moveKeyFrame(size_t i, const Scalar &t)=0
virtual bool removeKeyFrame(size_t i)=0
void insertInterpolatedKeyFrame(const Scalar &t, const Interpolator &interpolator)
bool operator==(const KeyFramedValue &keyframe) const
const KeyFrames & getKeyFrames() const
bool operator!=(const KeyFramedValue &keyframe) const
size_t size() const override
const KeyFrame & operator[](size_t i) const
void insertKeyFrame(const Scalar &t, const VALUE_TYPE &frame)
void moveKeyFrame(size_t i, const Scalar &t) override
KeyFrames m_keyframes
The list of keyframes.
VALUE_TYPE at(const Scalar &t, const Interpolator &interpolator) const
bool removeKeyFrame(size_t i) override
KeyFramedValue(Scalar t, VALUE_TYPE frame)
std::vector< Scalar > getTimes() const override
std::tuple< size_t, size_t, Scalar > findRange(Scalar t) const
std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type areApproxEqual(T x, T y, T espilonBoostFactor=T(10))
Compare two numbers such that |x-y| < espilon*epsilonBoostFactor.
hepler function to manage enum as underlying types in VariableSet