From d0673816efb02e6e58b1860bb7e264731aad10a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 22 Feb 2019 11:21:40 +0100 Subject: [PATCH] Animation: fix TrackView to have the same default extrapolation as Track. --- doc/changelog.dox | 4 ++++ src/Magnum/Animation/Track.h | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 86f21f4d6..9746d6be0 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -60,6 +60,10 @@ See also: - The @ref ResourceManager class now accepts also @ref Corrade::Containers::Pointer instances in addition to raw pointers +- Default extrapolation of @ref Animation::TrackView was changed from + @ref Animation::Extrapolation::Extrapolated to + @ref Animation::Extrapolation::Constant to be consistent with + @ref Animation::Track @subsubsection changelog-latest-changes-audio Audio library diff --git a/src/Magnum/Animation/Track.h b/src/Magnum/Animation/Track.h index ed1b64c41..877b6468f 100644 --- a/src/Magnum/Animation/Track.h +++ b/src/Magnum/Animation/Track.h @@ -537,7 +537,7 @@ template&, const Containers::StridedArrayView&, Interpolator, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ - /*implicit*/ TrackView(const Containers::StridedArrayView& keys, const Containers::StridedArrayView& values, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Extrapolated) noexcept: TrackView{keys, values, interpolator, extrapolation, extrapolation} {} + /*implicit*/ TrackView(const Containers::StridedArrayView& keys, const Containers::StridedArrayView& values, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{keys, values, interpolator, extrapolation, extrapolation} {} /** * @brief Construct with custom interpolator from an interleaved array @@ -555,7 +555,7 @@ template>, Interpolator, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ - explicit TrackView(Containers::ArrayView> data, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Extrapolated) noexcept: TrackView{data, interpolator, extrapolation, extrapolation} {} + explicit TrackView(Containers::ArrayView> data, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{data, interpolator, extrapolation, extrapolation} {} /** * @brief Construct with both generic and custom interpolator @@ -578,7 +578,7 @@ template&, const Containers::StridedArrayView&, Interpolation, Interpolator, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ - /*implicit*/ TrackView(const Containers::StridedArrayView& keys, const Containers::StridedArrayView& values, Interpolation interpolation, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Extrapolated) noexcept: TrackView{keys, values, interpolation, interpolator, extrapolation, extrapolation} {} + /*implicit*/ TrackView(const Containers::StridedArrayView& keys, const Containers::StridedArrayView& values, Interpolation interpolation, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{keys, values, interpolation, interpolator, extrapolation, extrapolation} {} /** * @brief Construct with both generic and custom interpolator from an interleaved array @@ -597,7 +597,7 @@ template>, Interpolation, Interpolator, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ - /*implicit*/ TrackView(Containers::ArrayView> data, Interpolation interpolation, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Extrapolated) noexcept: TrackView{data, interpolation, interpolator, extrapolation, extrapolation} {} + /*implicit*/ TrackView(Containers::ArrayView> data, Interpolation interpolation, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{data, interpolation, interpolator, extrapolation, extrapolation} {} /** * @brief Construct with generic interpolation behavior @@ -619,7 +619,7 @@ template&, const Containers::StridedArrayView&, Interpolation, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ - /*implicit*/ TrackView(const Containers::StridedArrayView& keys, const Containers::StridedArrayView& values, Interpolation interpolation, Extrapolation extrapolation = Extrapolation::Extrapolated) noexcept: TrackView{keys, values, interpolation, extrapolation, extrapolation} {} + /*implicit*/ TrackView(const Containers::StridedArrayView& keys, const Containers::StridedArrayView& values, Interpolation interpolation, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{keys, values, interpolation, extrapolation, extrapolation} {} /** * @brief Construct with generic interpolation behavior from an interleaved array @@ -637,7 +637,7 @@ template>, Interpolation, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ - /*implicit*/ TrackView(Containers::ArrayView> data, Interpolation interpolation, Extrapolation extrapolation = Extrapolation::Extrapolated) noexcept: TrackView{data, interpolation, extrapolation, extrapolation} {} + /*implicit*/ TrackView(Containers::ArrayView> data, Interpolation interpolation, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{data, interpolation, extrapolation, extrapolation} {} /** * @brief Interpolation function