diff --git a/src/Magnum/Animation/Track.h b/src/Magnum/Animation/Track.h index 74736f244..dfcad07da 100644 --- a/src/Magnum/Animation/Track.h +++ b/src/Magnum/Animation/Track.h @@ -549,6 +549,8 @@ template @ce (where @p K_ / @p V_ are * with @cpp const @ce removed) when they are @cpp const @ce. */ + /** @todo drop this, supplying strided array views is the usual + workflow at this point */ typedef typename std::conditional::value, const std::pair::type, typename std::remove_const::type>, std::pair>::type KeyValueType; /** @brief Animation result type */ @@ -599,12 +601,16 @@ template&, const Containers::StridedArrayView1D&, Interpolator, Extrapolation, Extrapolation). */ + /** @todo drop this, supplying strided array views is the usual + workflow at this point */ /*implicit*/ TrackView(Containers::ArrayView data, Interpolator interpolator, Extrapolation before, Extrapolation after) noexcept: TrackView{Containers::StridedArrayView1D{data, data ? &data[0].first : nullptr, data.size(), sizeof(std::pair)}, Containers::StridedArrayView1D{data, data ? &data[0].second : nullptr, data.size(), sizeof(std::pair)}, interpolator, before, after} {} /** @overload * Equivalent to calling @ref TrackView(Containers::ArrayView, Interpolator, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ + /** @todo drop this, supplying strided array views is the usual + workflow at this point */ explicit TrackView(Containers::ArrayView data, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{data, interpolator, extrapolation, extrapolation} {} /** @@ -641,12 +647,16 @@ template&, const Containers::StridedArrayView1D&, Interpolator, Extrapolation, Extrapolation). */ + /** @todo drop this, supplying strided array views is the usual + workflow at this point */ /*implicit*/ TrackView(Containers::ArrayView data, Interpolation interpolation, Interpolator interpolator, Extrapolation before, Extrapolation after) noexcept: TrackViewStorage{Containers::StridedArrayView1D{data, data ? &data[0].first : nullptr, data.size(), sizeof(std::pair)}, Containers::StridedArrayView1D{data, data ? &data[0].second : nullptr, data.size(), sizeof(std::pair)}, interpolation, interpolator, before, after} {} /** @overload * Equivalent to calling @ref TrackView(Containers::ArrayView, Interpolation, Interpolator, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ + /** @todo drop this, supplying strided array views is the usual + workflow at this point */ /*implicit*/ TrackView(Containers::ArrayView data, Interpolation interpolation, Interpolator interpolator, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{data, interpolation, interpolator, extrapolation, extrapolation} {} /** @@ -681,12 +691,16 @@ template&, const Containers::StridedArrayView1D&, Interpolator, Extrapolation, Extrapolation). */ + /** @todo drop this, supplying strided array views is the usual + workflow at this point */ /*implicit*/ TrackView(Containers::ArrayView data, Interpolation interpolation, Extrapolation before, Extrapolation after) noexcept: TrackView{Containers::StridedArrayView1D{data, data ? &data[0].first : nullptr, data.size(), sizeof(std::pair)}, Containers::StridedArrayView1D{data, data ? &data[0].second : nullptr, data.size(), sizeof(std::pair)}, interpolation, before, after} {} /** @overload * Equivalent to calling @ref TrackView(Containers::ArrayView, Interpolation, Extrapolation, Extrapolation) * with both @p before and @p after set to @p extrapolation. */ + /** @todo drop this, supplying strided array views is the usual + workflow at this point */ /*implicit*/ TrackView(Containers::ArrayView data, Interpolation interpolation, Extrapolation extrapolation = Extrapolation::Constant) noexcept: TrackView{data, interpolation, extrapolation, extrapolation} {} /** @brief Convert a mutable view to a const one */ diff --git a/src/Magnum/Trade/AbstractImporter.cpp b/src/Magnum/Trade/AbstractImporter.cpp index f363ae97c..8bda00fa6 100644 --- a/src/Magnum/Trade/AbstractImporter.cpp +++ b/src/Magnum/Trade/AbstractImporter.cpp @@ -429,6 +429,8 @@ Containers::Optional AbstractImporter::animation(const UnsignedIn CORRADE_ASSERT(isOpened(), "Trade::AbstractImporter::animation(): no file opened", {}); CORRADE_ASSERT(id < doAnimationCount(), "Trade::AbstractImporter::animation(): index" << id << "out of range for" << doAnimationCount() << "entries", {}); Containers::Optional animation = doAnimation(id); + /** @todo maybe this should also disallow custom interpolators? since thise + would be dangling on plugin unload */ CORRADE_ASSERT(!animation || ((!animation->_data.deleter() || animation->_data.deleter() == static_cast(Implementation::nonOwnedArrayDeleter) || animation->_data.deleter() == ArrayAllocator::deleter) && (!animation->_tracks.deleter() || animation->_tracks.deleter() == static_cast(Implementation::nonOwnedArrayDeleter))), diff --git a/src/Magnum/Trade/AnimationData.h b/src/Magnum/Trade/AnimationData.h index 05a92eced..2de24976b 100644 --- a/src/Magnum/Trade/AnimationData.h +++ b/src/Magnum/Trade/AnimationData.h @@ -280,6 +280,9 @@ class AnimationTrackData { * @param target Track target * @param view Type-erased @ref Animation::TrackView instance */ + /** @todo stop taking TrackViewStorage and instead directly take the + key/value views, interpolator/interpolation and extrapolation -- + it's just 6 overloads and makes usage much better */ explicit AnimationTrackData(AnimationTrackType type, AnimationTrackType resultType, AnimationTrackTargetType targetType, UnsignedLong target, Animation::TrackViewStorage view) noexcept: _type{type}, _resultType{resultType}, _targetType{targetType}, _target{target}, _view{view} {} /** @overload diff --git a/src/Magnum/Trade/LightData.h b/src/Magnum/Trade/LightData.h index f41bc9e93..902f2ef39 100644 --- a/src/Magnum/Trade/LightData.h +++ b/src/Magnum/Trade/LightData.h @@ -121,6 +121,7 @@ class MAGNUM_TRADE_EXPORT LightData { * @brief Light type * * @see @ref type() + * @todo move this to LightType outside of the class for consistency */ enum class Type: UnsignedByte { /* Zero reserved for an invalid value */ diff --git a/src/Magnum/Trade/SkinData.h b/src/Magnum/Trade/SkinData.h index d64f05c63..a3c5fa8f5 100644 --- a/src/Magnum/Trade/SkinData.h +++ b/src/Magnum/Trade/SkinData.h @@ -90,6 +90,8 @@ template class SkinData { /** @brief Move assignment */ SkinData& operator=(SkinData&& other) noexcept; + /** @todo expose DataFlags (so users can know if the data are externally owned, at least) */ + /** * @brief Joint IDs *