From e3d87fb00bf3e6025b220990ed2483a882a0d552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 17:30:18 +0200 Subject: [PATCH] DebugTools: completed documentation review. --- src/Magnum/DebugTools/DebugTools.h | 2 +- src/Magnum/DebugTools/ForceRenderer.h | 5 ++--- src/Magnum/DebugTools/ObjectRenderer.h | 5 ++--- src/Magnum/DebugTools/Profiler.h | 24 ++++++++++++------------ src/Magnum/DebugTools/ResourceManager.h | 2 +- src/Magnum/DebugTools/ShapeRenderer.h | 10 +++++----- 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/Magnum/DebugTools/DebugTools.h b/src/Magnum/DebugTools/DebugTools.h index 6b6ed238a..a8ff1c809 100644 --- a/src/Magnum/DebugTools/DebugTools.h +++ b/src/Magnum/DebugTools/DebugTools.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Forward declarations for Magnum::DebugTools namespace + * @brief Forward declarations for @ref Magnum::DebugTools namespace */ #include "Magnum/Types.h" diff --git a/src/Magnum/DebugTools/ForceRenderer.h b/src/Magnum/DebugTools/ForceRenderer.h index 74d67c8c7..80c97837a 100644 --- a/src/Magnum/DebugTools/ForceRenderer.h +++ b/src/Magnum/DebugTools/ForceRenderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ForceRenderer, Magnum::DebugTools::ForceRendererOptions, typedef Magnum::DebugTools::ForceRenderer2D, Magnum::DebugTools::ForceRenderer3D + * @brief Class @ref Magnum::DebugTools::ForceRenderer, @ref Magnum::DebugTools::ForceRendererOptions, typedef @ref Magnum::DebugTools::ForceRenderer2D, @ref Magnum::DebugTools::ForceRenderer3D */ #include "Magnum/Color.h" @@ -122,10 +122,9 @@ template class MAGNUM_DEBUGTOOLS_EXPORT ForceRenderer: p /** @overload */ ForceRenderer(SceneGraph::AbstractObject&, const typename DimensionTraits::VectorType&, typename DimensionTraits::VectorType&&, ResourceKey = ResourceKey(), SceneGraph::DrawableGroup* = nullptr) = delete; - protected: + private: void draw(const typename DimensionTraits::MatrixType& transformationMatrix, SceneGraph::AbstractCamera& camera) override; - private: const typename DimensionTraits::VectorType forcePosition; const typename DimensionTraits::VectorType& force; diff --git a/src/Magnum/DebugTools/ObjectRenderer.h b/src/Magnum/DebugTools/ObjectRenderer.h index 79a352142..70371d95f 100644 --- a/src/Magnum/DebugTools/ObjectRenderer.h +++ b/src/Magnum/DebugTools/ObjectRenderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ObjectRenderer, Magnum::DebugTools::ObjectRendererOptions, typedef Magnum::DebugTools::ObjectRenderer2D, Magnum::DebugTools::ObjectRenderer3D + * @brief Class @ref Magnum::DebugTools::ObjectRenderer, @ref Magnum::DebugTools::ObjectRendererOptions, typedef @ref Magnum::DebugTools::ObjectRenderer2D, @ref Magnum::DebugTools::ObjectRenderer3D */ #include "Magnum/Resource.h" @@ -97,10 +97,9 @@ template class MAGNUM_DEBUGTOOLS_EXPORT ObjectRenderer: */ explicit ObjectRenderer(SceneGraph::AbstractObject& object, ResourceKey options = ResourceKey(), SceneGraph::DrawableGroup* drawables = nullptr); - protected: + private: void draw(const typename DimensionTraits::MatrixType& transformationMatrix, SceneGraph::AbstractCamera& camera) override; - private: Resource options; Resource> shader; Resource mesh; diff --git a/src/Magnum/DebugTools/Profiler.h b/src/Magnum/DebugTools/Profiler.h index 9c6a4cfff..a824988a4 100644 --- a/src/Magnum/DebugTools/Profiler.h +++ b/src/Magnum/DebugTools/Profiler.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::Profiler + * @brief Class @ref Magnum::DebugTools::Profiler */ #include @@ -43,7 +43,7 @@ namespace Magnum { namespace DebugTools { @brief %Profiler Measures time passed during specified sections of each frame. It's meant to be -used in rendering and event loops (e.g. Platform::Sdl2Application::drawEvent()), +used in rendering and event loops (e.g. @ref Platform::Sdl2Application::drawEvent()), but it's possible to use it standalone elsewhere. Example usage: @code DebugTools::Profiler p; @@ -94,7 +94,7 @@ p.printStatistics(); @endcode It's possible to start profiler only for certain parts of the code and then -stop it again using stop(), if you are not interested in profiling the rest. +stop it again using @ref stop(), if you are not interested in profiling the rest. @todo Some unit testing @todo More time intervals @@ -104,14 +104,14 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { /** * @brief Section ID * - * @see otherSection, addSection(), start(Section) + * @see @ref otherSection, @ref addSection(), @ref start(Section) */ typedef UnsignedInt Section; /** * @brief Default section * - * @see start() + * @see @ref start() */ static const Section otherSection = 0; @@ -130,15 +130,15 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { * @brief Add named section * * @attention This function cannot be called if profiling is enabled. - * @see otherSection, start(Section), stop() + * @see @ref otherSection, @ref start(Section), @ref stop() */ Section addSection(const std::string& name); /** * @brief Whether profiling is enabled * - * If the profiling is not enabled, calls to start() and stop() have - * no effect. + * If the profiling is not enabled, calls to @ref start() and + * @ref stop() have no effect. */ bool isEnabled() { return enabled; } @@ -146,14 +146,14 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { * @brief Enable profiling * * Clears already mesaured data. - * @see disable(), isEnabled() + * @see @ref disable(), @ref isEnabled() */ void enable(); /** * @brief Disable profiling * - * @see enable(), isEnabled() + * @see @ref enable(), @ref isEnabled() */ void disable(); @@ -162,14 +162,14 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { * * If profiling is already running, current time is saved for previous * section. - * @see @ref otherSection, start(Section) + * @see @ref otherSection, @ref start(Section) */ void start(Section section); /** * @brief Start profiling of "other" section * - * Same as calling `start(Profiler::otherSection)`. + * Same as calling `start(DebugTools::Profiler::otherSection)`. * @note Does nothing if profiling is disabled. */ void start() { start(otherSection); } diff --git a/src/Magnum/DebugTools/ResourceManager.h b/src/Magnum/DebugTools/ResourceManager.h index 06b18acac..d47742059 100644 --- a/src/Magnum/DebugTools/ResourceManager.h +++ b/src/Magnum/DebugTools/ResourceManager.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ResourceManager + * @brief Class @ref Magnum::DebugTools::ResourceManager */ #ifndef MAGNUM_RESOURCEMANAGER_DEFINE_INTERNALINSTANCE diff --git a/src/Magnum/DebugTools/ShapeRenderer.h b/src/Magnum/DebugTools/ShapeRenderer.h index d1b62165a..4c8aa875a 100644 --- a/src/Magnum/DebugTools/ShapeRenderer.h +++ b/src/Magnum/DebugTools/ShapeRenderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ShapeRenderer, Magnum::DebugTools::ShapeRendererOptions, typedef Magnum::DebugTools::ShapeRenderer2D, Magnum::DebugTools::ShapeRenderer3D + * @brief Class @ref Magnum::DebugTools::ShapeRenderer, @ref Magnum::DebugTools::ShapeRendererOptions, typedef @ref Magnum::DebugTools::ShapeRenderer2D, @ref Magnum::DebugTools::ShapeRenderer3D */ #include "Magnum/Color.h" @@ -56,7 +56,7 @@ class ShapeRendererOptions { /** * @brief Shape rendering mode * - * @see setRenderMode() + * @see @ref setRenderMode() */ enum class RenderMode: UnsignedByte { Wireframe, /**< Wireframe rendering */ @@ -138,7 +138,9 @@ new DebugTools::ShapeRenderer2D(shape, "red", debugDrawables); @todo Different drawing style for inverted shapes? (marking the "inside" somehow) */ template class MAGNUM_DEBUGTOOLS_EXPORT ShapeRenderer: public SceneGraph::Drawable { + #ifndef DOXYGEN_GENERATING_OUTPUT friend void Implementation::createDebugMesh<>(ShapeRenderer&, const Shapes::Implementation::AbstractShape&); + #endif public: /** @@ -157,11 +159,9 @@ template class MAGNUM_DEBUGTOOLS_EXPORT ShapeRenderer: p ~ShapeRenderer(); - protected: - /** @todoc Remove Float when Doxygen properly treats this as override */ + private: void draw(const typename DimensionTraits::MatrixType& transformationMatrix, SceneGraph::AbstractCamera& camera) override; - private: Resource options; std::vector*> renderers; };