diff --git a/doc/transformations.dox b/doc/transformations.dox index ebf276b2d..9a95ad7e1 100644 --- a/doc/transformations.dox +++ b/doc/transformations.dox @@ -29,6 +29,7 @@ namespace Magnum { @tableofcontents @m_footernavigation +@m_keyword{Transformations} Transformations are essential operations involved in scene management --- object relations, hierarchies, animations etc. They extend basic vectors and matrices diff --git a/src/Magnum/Math/CubicHermite.h b/src/Magnum/Math/CubicHermite.h index 6d4022fb0..b5ed30df2 100644 --- a/src/Magnum/Math/CubicHermite.h +++ b/src/Magnum/Math/CubicHermite.h @@ -277,9 +277,9 @@ extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utili /** @relatesalso CubicHermite @brief Constant interpolation of two cubic Hermite spline points -@param a First value -@param b Second value -@param t Interpolation phase +@param a First spline point +@param b Second spline point +@param t Interpolation phase (from range @f$ [0; 1] @f$) Given segment points @f$ \boldsymbol{p}_i @f$, in-tangents @f$ \boldsymbol{m}_i @f$ and out-tangents @f$ \boldsymbol{n}_i @f$, the interpolated value @f$ \boldsymbol{p} @f$ @@ -304,7 +304,7 @@ template T select(const CubicHermite& a, const CubicHermite @brief Linear interpolation of two cubic Hermite points @param a First spline point @param b Second spline point -@param t Interpolation phase +@param t Interpolation phase (from range @f$ [0; 1] @f$) Given segment points @f$ \boldsymbol{p}_i @f$, in-tangents @f$ \boldsymbol{m}_i @f$ and out-tangents @f$ \boldsymbol{n}_i @f$, the interpolated value @f$ \boldsymbol{p} @f$ @@ -329,16 +329,11 @@ template T lerp(const CubicHermite& a, const CubicHermite&, const CubicHermite&, U) this adds -a normalization step after. Given segment points @f$ \boldsymbol{p}_i @f$, -in-tangents @f$ \boldsymbol{m}_i @f$ and out-tangents @f$ \boldsymbol{n}_i @f$, -the interpolated value @f$ \boldsymbol{p} @f$ at phase @f$ t @f$ is: @f[ - \boldsymbol{p}(t) = \frac{(1 - t) \boldsymbol{p}_a + t \boldsymbol{p}_b}{|(1 - t) \boldsymbol{p}_a + t \boldsymbol{p}_b|} -@f] - Equivalent to calling @ref lerp(const Complex&, const Complex&, T) on -@ref CubicHermite::point() extracted from @p a and @p b. Expects that -@ref CubicHermite::point() is a normalized complex number in both @p a and @p b. +@ref CubicHermite::point() extracted from @p a and @p b. Compared to +@ref lerp(const CubicHermite&, const CubicHermite&, U) this adds a +normalization step after. Expects that @ref CubicHermite::point() is a +normalized complex number in both @p a and @p b. @see @ref Complex::isNormalized(), @ref lerp(const CubicHermiteQuaternion&, const CubicHermiteQuaternion&, T), @ref select(const CubicHermite&, const CubicHermite&, U), @@ -351,16 +346,11 @@ template Complex lerp(const CubicHermiteComplex& a, const CubicHe /** @relatesalso CubicHermite @brief Linear interpolation of two cubic Hermite quaternions -Unlike @ref lerp(const CubicHermite&, const CubicHermite&, U) this adds a -normalization step after. Given segment points @f$ \boldsymbol{p}_i @f$, -in-tangents @f$ \boldsymbol{m}_i @f$ and out-tangents @f$ \boldsymbol{n}_i @f$, -the interpolated value @f$ \boldsymbol{p} @f$ at phase @f$ t @f$ is: @f[ - \boldsymbol{p}(t) = \frac{(1 - t) \boldsymbol{p}_a + t \boldsymbol{p}_b}{|(1 - t) \boldsymbol{p}_a + t \boldsymbol{p}_b|} -@f] - Equivalent to calling @ref lerp(const Quaternion&, const Quaternion&, T) -on @ref CubicHermite::point() extracted from @p a and @p b. Expects that -@ref CubicHermite::point() is a normalized quaternion in both @p a and @p b. +on @ref CubicHermite::point() extracted from @p a and @p b. Compared to +@ref lerp(const CubicHermite&, const CubicHermite&, U) this adds a +normalization step after. Expects that @ref CubicHermite::point() is a +normalized quaternion in both @p a and @p b. @see @ref Quaternion::isNormalized(), @ref lerp(const CubicHermiteComplex&, const CubicHermiteComplex&, T), @ref select(const CubicHermite&, const CubicHermite&, U), @@ -385,7 +375,7 @@ at phase @f$ t @f$ is: @f[ @see @ref splerp(const CubicHermiteComplex&, const CubicHermiteComplex&, T), @ref splerp(const CubicHermiteQuaternion&, const CubicHermiteQuaternion&, T), @ref select(const CubicHermite&, const CubicHermite&, U), - @ref lerp(const CubicHermite&, const CubicHermite&, U), + @ref lerp(const CubicHermite&, const CubicHermite&, U) */ template T splerp(const CubicHermite& a, const CubicHermite& b, U t) { return (U(2)*t*t*t - U(3)*t*t + U(1))*a.point() +