diff --git a/doc/changelog.dox b/doc/changelog.dox index bbd3a4361..86f21f4d6 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -100,6 +100,12 @@ See also: @ref platforms-android-apps-cmake "Gradle-less Android builds" now properly creates the library output directory beforehand +@subsection changelog-latest-deprecated Deprecated APIs + +- @cpp DebugTools::ForceRendererOptions::scale() @ce is deprecated in favor + of @ref DebugTools::ForceRendererOptions::size(), as that's more consistent + with the documentation and the corresponding setter. + @section changelog-2019-01 2019.01 Released 2019-02-04, tagged as diff --git a/src/Magnum/DebugTools/ForceRenderer.cpp b/src/Magnum/DebugTools/ForceRenderer.cpp index 251bb0c15..b7f0e23b7 100644 --- a/src/Magnum/DebugTools/ForceRenderer.cpp +++ b/src/Magnum/DebugTools/ForceRenderer.cpp @@ -81,7 +81,7 @@ template ForceRenderer::ForceRenderer(SceneG template ForceRenderer::~ForceRenderer() = default; template void ForceRenderer::draw(const MatrixTypeFor& transformationMatrix, SceneGraph::Camera& camera) { - _shader->setTransformationProjectionMatrix(camera.projectionMatrix()*Implementation::forceRendererTransformation(transformationMatrix.transformPoint(_forcePosition), _force)*MatrixTypeFor::scaling(VectorTypeFor{_options->scale()})) + _shader->setTransformationProjectionMatrix(camera.projectionMatrix()*Implementation::forceRendererTransformation(transformationMatrix.transformPoint(_forcePosition), _force)*MatrixTypeFor::scaling(VectorTypeFor{_options->size()})) .setColor(_options->color()); _mesh->draw(*_shader); } diff --git a/src/Magnum/DebugTools/ForceRenderer.h b/src/Magnum/DebugTools/ForceRenderer.h index 5179c3e3f..0fd31cced 100644 --- a/src/Magnum/DebugTools/ForceRenderer.h +++ b/src/Magnum/DebugTools/ForceRenderer.h @@ -68,8 +68,16 @@ class ForceRendererOptions { return *this; } - /** @brief Scale of rendered arrow */ - constexpr Float scale() const { return _size; } + /** @brief Size of rendered arrow */ + constexpr Float size() const { return _size; } + + #ifdef MAGNUM_BUILD_DEPRECATED + /** + * @brief @copybrief size() + * @deprecated Use @ref size() instead. + */ + constexpr CORRADE_DEPRECATED("use size() instead") Float scale() const { return _size; } + #endif /** * @brief Set scale of rendered arrow