From 5c1f47444f7f7b55ea4c030af5d039e4f2940d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 1 Nov 2013 13:40:28 +0100 Subject: [PATCH] SceneGraph: doc++ --- src/SceneGraph/AbstractCamera.h | 25 +++++++-------- src/SceneGraph/AbstractFeature.h | 12 +++---- src/SceneGraph/AbstractFeature.hpp | 2 +- src/SceneGraph/AbstractGroupedFeature.h | 10 +++--- src/SceneGraph/AbstractObject.h | 22 ++++++++++--- src/SceneGraph/AbstractTransformation.h | 10 ++++++ src/SceneGraph/Animable.h | 10 +++--- src/SceneGraph/Animable.hpp | 2 +- src/SceneGraph/Camera2D.h | 11 ++++--- src/SceneGraph/Camera3D.h | 11 ++++--- src/SceneGraph/FeatureGroup.h | 4 +-- src/SceneGraph/FeatureGroup.hpp | 2 +- src/SceneGraph/Object.h | 42 ++++++++++++++----------- src/SceneGraph/Object.hpp | 2 +- 14 files changed, 96 insertions(+), 69 deletions(-) diff --git a/src/SceneGraph/AbstractCamera.h b/src/SceneGraph/AbstractCamera.h index f1a03ada6..3a03d8603 100644 --- a/src/SceneGraph/AbstractCamera.h +++ b/src/SceneGraph/AbstractCamera.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractCamera, enum Magnum::SceneGraph::AspectRatioPolicy, alias Magnum::SceneGraph::AbstractBasicCamera2D, Magnum::SceneGraph::AbstractBasicCamera3D, typedef Magnum::SceneGraph::AbstractCamera2D, Magnum::SceneGraph::AbstractCamera3D + * @brief Class @ref Magnum::SceneGraph::AbstractCamera, enum @ref Magnum::SceneGraph::AspectRatioPolicy, alias @ref Magnum::SceneGraph::AbstractBasicCamera2D, @ref Magnum::SceneGraph::AbstractBasicCamera3D, typedef @ref Magnum::SceneGraph::AbstractCamera2D, @ref Magnum::SceneGraph::AbstractCamera3D */ #include "Math/Matrix3.h" @@ -39,7 +39,7 @@ namespace Magnum { namespace SceneGraph { /** @brief Camera aspect ratio policy -@see AbstractCamera::setAspectRatioPolicy() +@see @ref AbstractCamera::setAspectRatioPolicy() */ enum class AspectRatioPolicy: UnsignedByte { NotPreserved, /**< Don't preserve aspect ratio (default) */ @@ -60,16 +60,15 @@ instead. @section AbstractCamera-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into SceneGraph library. -For other specializations (e.g. using Double type) you have to use -AbstractCamera.hpp implementation file to avoid linker errors. See also -relevant sections in -@ref Camera2D-explicit-specializations "Camera2D" and -@ref Camera3D-explicit-specializations "Camera3D" class documentation or +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref AbstractCamera.hpp implementation file to avoid linker errors. See +also relevant sections in @ref Camera2D-explicit-specializations "Camera2D" +and @ref Camera3D-explicit-specializations "Camera3D" class documentation or @ref compilation-speedup-hpp for more information. - - @ref AbstractCamera "AbstractCamera<2, Float>" - - @ref AbstractCamera "AbstractCamera<3, Float>" +- @ref AbstractCamera2D +- @ref AbstractCamera3D @see @ref scenegraph, @ref AbstractBasicCamera2D, @ref AbstractBasicCamera3D, @ref Drawable, @ref DrawableGroup @@ -101,7 +100,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Abstrac * * Projection matrix handles e.g. perspective distortion and is applied * as last. - * @see projectionSize() + * @see @ref projectionSize() */ typename DimensionTraits::MatrixType projectionMatrix() const { return _projectionMatrix; } @@ -109,7 +108,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Abstrac * @brief Size of (near) XY plane in current projection * * Returns size of near XY plane computed from projection matrix. - * @see projectionMatrix() + * @see @ref projectionMatrix() */ Math::Vector2 projectionSize() const { return {T(2.0)/_projectionMatrix[0].x(), T(2.0)/_projectionMatrix[1].y()}; @@ -123,7 +122,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Abstrac * * Stores viewport size internally and recalculates projection matrix * according to aspect ratio policy. - * @see setAspectRatioPolicy() + * @see @ref setAspectRatioPolicy() */ virtual void setViewport(const Vector2i& size); diff --git a/src/SceneGraph/AbstractFeature.h b/src/SceneGraph/AbstractFeature.h index b61648af9..695cedad6 100644 --- a/src/SceneGraph/AbstractFeature.h +++ b/src/SceneGraph/AbstractFeature.h @@ -149,13 +149,13 @@ which is automatically extracted from the reference in our constructor. @section AbstractFeature-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into %SceneGraph library. -For other specializations (e.g. using Double type) you have to use -AbstractFeature.hpp implementation file to avoid linker errors. See also -@ref compilation-speedup-hpp for more information. +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref AbstractFeature.hpp implementation file to avoid linker errors. See +also @ref compilation-speedup-hpp for more information. - - @ref AbstractFeature "AbstractFeature<2, Float>" - - @ref AbstractFeature "AbstractFeature<3, Float>" +- @ref AbstractFeature2D +- @ref AbstractFeature3D @see @ref AbstractBasicFeature2D, @ref AbstractBasicFeature3D, @ref AbstractFeature2D, @ref AbstractFeature3D diff --git a/src/SceneGraph/AbstractFeature.hpp b/src/SceneGraph/AbstractFeature.hpp index 0684c4670..f9cd4ba4d 100644 --- a/src/SceneGraph/AbstractFeature.hpp +++ b/src/SceneGraph/AbstractFeature.hpp @@ -25,7 +25,7 @@ */ /** @file - * @brief @ref compilation-speedup-hpp "Template implementation" for AbstractFeature.h + * @brief @ref compilation-speedup-hpp "Template implementation" for @ref AbstractFeature.h */ #include "AbstractFeature.h" diff --git a/src/SceneGraph/AbstractGroupedFeature.h b/src/SceneGraph/AbstractGroupedFeature.h index 2a280a5e9..9f9126940 100644 --- a/src/SceneGraph/AbstractGroupedFeature.h +++ b/src/SceneGraph/AbstractGroupedFeature.h @@ -54,13 +54,13 @@ typedef SceneGraph::FeatureGroup3D DrawableGroup; @section AbstractGroupedFeature-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into %SceneGraph library. -For other specializations (e.g. using Double type) you have to use -AbstractGroupedFeature.hpp implementation file to avoid linker errors. See also +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref FeatureGroup.hpp implementation file to avoid linker errors. See also @ref compilation-speedup-hpp for more information. - - @ref AbstractFeatureGroup "AbstractFeatureGroup<2, Float>" - - @ref AbstractFeatureGroup "AbstractFeatureGroup<3, Float>" +- @ref FeatureGroup2D +- @ref FeatureGroup3D @see @ref scenegraph, @ref AbstractBasicGroupedFeature2D, @ref AbstractBasicGroupedFeature3D, @ref AbstractGroupedFeature2D, diff --git a/src/SceneGraph/AbstractObject.h b/src/SceneGraph/AbstractObject.h index fc8cfcf93..c2b1e15fa 100644 --- a/src/SceneGraph/AbstractObject.h +++ b/src/SceneGraph/AbstractObject.h @@ -42,18 +42,30 @@ namespace Magnum { namespace SceneGraph { @brief Base for objects Provides minimal interface for features, not depending on object transformation -implementation. This class is not directly instantiatable, use Object subclass -instead. See also @ref scenegraph for more information. +implementation. This class is not directly instantiatable, use @ref Object +subclass instead. See also @ref scenegraph for more information. -Uses Corrade::Containers::LinkedList for storing features. Traversing through -the list is done like in the following code. It is also possible to go in -reverse order using lastFeature() and AbstractFeature::previousFeature(). +Uses @ref Corrade::Containers::LinkedList for storing features. Traversing +through the list is done like in the following code. It is also possible to go +in reverse order using @ref lastFeature() and @ref AbstractFeature::previousFeature(). @code for(AbstractFeature* feature = o->firstFeature(); feature; feature = feature->nextFeature()) { // ... } @endcode +@section AbstractObject-explicit-specializations Explicit template specializations + +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref Object.hpp implementation file to avoid linker errors. See also +relevant sections in @ref Object-explicit-specializations "Object" and +@ref AbstractTransformation-explicit-specializations "AbstractTransformation" +class documentation or @ref compilation-speedup-hpp for more information. + +- @ref AbstractObject2D +- @ref AbstractObject3D + @see @ref AbstractBasicObject2D, @ref AbstractBasicObject3D, @ref AbstractObject2D, @ref AbstractObject3D */ diff --git a/src/SceneGraph/AbstractTransformation.h b/src/SceneGraph/AbstractTransformation.h index 418eb1292..206ece1c6 100644 --- a/src/SceneGraph/AbstractTransformation.h +++ b/src/SceneGraph/AbstractTransformation.h @@ -38,6 +38,16 @@ namespace Magnum { namespace SceneGraph { Provides transformation implementation for @ref Object instances. +@section AbstractTransformation-explicit-specializations Explicit template specializations + +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref Object.hpp implementation file to avoid linker errors. See +@ref compilation-speedup-hpp for more information. + +- @ref AbstractTransformation2D +- @ref AbstractTransformation3D + @see @ref scenegraph, @ref AbstractBasicTransformation2D, @ref AbstractBasicTransformation3D, @ref AbstractTransformation2D, @ref AbstractTransformation3D diff --git a/src/SceneGraph/Animable.h b/src/SceneGraph/Animable.h index 4f30f5932..9a5b66576 100644 --- a/src/SceneGraph/Animable.h +++ b/src/SceneGraph/Animable.h @@ -129,13 +129,13 @@ calling @ref AnimableGroup::step(), saving precious frame time. @section Animable-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into %SceneGraph library. -For other specializations (e.g. using Double type) you have to use -Animable.hpp implementation file to avoid linker errors. See also +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref Animable.hpp implementation file to avoid linker errors. See also @ref compilation-speedup-hpp for more information. - - @ref Animable "Animable<2, Float>", @ref AnimableGroup "AnimableGroup<2, Float>" - - @ref Animable "Animable<3, Float>", @ref AnimableGroup "AnimableGroup<3, Float>" +- @ref Animable2D, @ref AnimableGroup2D +- @ref Animable3D, @ref AnimableGroup3D @see @ref scenegraph, @ref BasicAnimable2D, @ref BasicAnimable3D, @ref Animable2D, @ref Animable3D, @ref AnimableGroup diff --git a/src/SceneGraph/Animable.hpp b/src/SceneGraph/Animable.hpp index 5ba80c88f..046811d2d 100644 --- a/src/SceneGraph/Animable.hpp +++ b/src/SceneGraph/Animable.hpp @@ -25,7 +25,7 @@ */ /** @file - * @brief @ref compilation-speedup-hpp "Template implementation" for Animable.h and AnimableGroup.h + * @brief @ref compilation-speedup-hpp "Template implementation" for @ref Animable.h and @ref AnimableGroup.h */ #include "AnimableGroup.h" diff --git a/src/SceneGraph/Camera2D.h b/src/SceneGraph/Camera2D.h index b11be1474..7d0b982b6 100644 --- a/src/SceneGraph/Camera2D.h +++ b/src/SceneGraph/Camera2D.h @@ -46,12 +46,13 @@ camera.setProjection({4.0f/3.0f, 1.0f}) @section Camera2D-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into SceneGraph library. -For other specializations (e.g. using Double type) you have to use Camera2D.hpp -implementation file to avoid linker errors. See @ref compilation-speedup-hpp -for more information. +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref Camera2D.hpp implementation file to avoid linker errors. See also +relevant section in @ref AbstractCamera-explicit-specializations "AbstractCamera" +class documentation or @ref compilation-speedup-hpp for more information. - - @ref BasicCamera2D "BasicCamera2D" +- @ref Camera2D @see @ref scenegraph, @ref Camera2D, @ref BasicCamera3D, @ref Drawable, @ref DrawableGroup diff --git a/src/SceneGraph/Camera3D.h b/src/SceneGraph/Camera3D.h index ac18cd66f..c33c843c0 100644 --- a/src/SceneGraph/Camera3D.h +++ b/src/SceneGraph/Camera3D.h @@ -51,12 +51,13 @@ camera.setPerspective({}, 0.001f, 100.0f) @section Camera3D-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into SceneGraph library. -For other specializations (e.g. using Double type) you have to use Camera3D.hpp -implementation file to avoid linker errors. See @ref compilation-speedup-hpp -for more information. +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type) you have to +use @ref Camera3D.hpp implementation file to avoid linker errors. See also +relevant section in @ref AbstractCamera-explicit-specializations "AbstractCamera" +class documentation or @ref compilation-speedup-hpp for more information. - - @ref BasicCamera3D "BasicCamera3D" +- @ref Camera3D @see @ref scenegraph, @ref Camera3D, @ref BasicCamera2D, @ref Drawable, @ref DrawableGroup diff --git a/src/SceneGraph/FeatureGroup.h b/src/SceneGraph/FeatureGroup.h index 742c4b2c2..09f617c17 100644 --- a/src/SceneGraph/FeatureGroup.h +++ b/src/SceneGraph/FeatureGroup.h @@ -39,7 +39,7 @@ namespace Magnum { namespace SceneGraph { /** @brief Base for group of features -See FeatureGroup. +See @ref FeatureGroup. */ template class MAGNUM_SCENEGRAPH_EXPORT AbstractFeatureGroup { template friend class FeatureGroup; @@ -56,7 +56,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Abstrac /** @brief Group of features -See AbstractGroupedFeature for more information. +See @ref AbstractGroupedFeature for more information. @see @ref scenegraph, @ref BasicFeatureGroup2D, @ref BasicFeatureGroup3D, @ref FeatureGroup2D, @ref FeatureGroup3D */ diff --git a/src/SceneGraph/FeatureGroup.hpp b/src/SceneGraph/FeatureGroup.hpp index 4caf9855e..7bc285dac 100644 --- a/src/SceneGraph/FeatureGroup.hpp +++ b/src/SceneGraph/FeatureGroup.hpp @@ -25,7 +25,7 @@ */ /** @file - * @brief @ref compilation-speedup-hpp "Template implementation" for FeatureGroup.h + * @brief @ref compilation-speedup-hpp "Template implementation" for @ref FeatureGroup.h */ #include "FeatureGroup.h" diff --git a/src/SceneGraph/Object.h b/src/SceneGraph/Object.h index 277edfee9..733c4a786 100644 --- a/src/SceneGraph/Object.h +++ b/src/SceneGraph/Object.h @@ -56,16 +56,16 @@ Base of scene graph. Contains specific transformation implementation, takes care of parent/children relationship and contains features. See @ref scenegraph for introduction. -Common usage is to typedef Object with desired transformation type to save -unnecessary typing later, along with Scene and possibly other types, e.g.: +Common usage is to typedef @ref Object with desired transformation type to save +unnecessary typing later, along with @ref Scene and possibly other types, e.g.: @code typedef SceneGraph::Scene Scene3D; typedef SceneGraph::Object Object3D; @endcode -Uses Corrade::Containers::LinkedList for parent/children relationship. +Uses @ref Corrade::Containers::LinkedList for parent/children relationship. Traversing through the list is done like in the following code. It is also -possible to go in reverse order using lastChild() and previousSibling(). +possible to go in reverse order using @ref lastChild() and @ref previousSibling(). @code for(Object* child = o->firstChild(); child; child = child->nextSibling()) { // ... @@ -74,21 +74,25 @@ for(Object* child = o->firstChild(); child; child = child->nextSibling()) { @section Object-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into SceneGraph library. -For other specializations (e.g. using Double type or special transformation -class) you have to use Object.hpp implementation file to avoid linker errors. -See @ref compilation-speedup-hpp for more information. - - - @ref DualComplexTransformation "Object>" - - @ref DualQuaternionTransformation "Object>" - - @ref MatrixTransformation2D "Object>" - - @ref MatrixTransformation3D "Object>" - - @ref RigidMatrixTransformation2D "Object>" - - @ref RigidMatrixTransformation3D "Object>" - - @ref TranslationTransformation2D "Object>" - - @ref TranslationTransformation3D "Object>" - -@see Scene, AbstractFeature, AbstractTransformation, DebugTools::ObjectRenderer +The following specialization are explicitly compiled into @ref SceneGraph +library. For other specializations (e.g. using @ref Double type or special +transformation class) you have to use @ref Object.hpp implementation file to +avoid linker errors. See also relevant sections in +@ref AbstractObject-explicit-specializations "AbstractObject" and +@ref AbstractTransformation-explicit-specializations "AbstractTransformation" +class documentation or @ref compilation-speedup-hpp for more information. + +- @ref DualComplexTransformation "Object" +- @ref DualQuaternionTransformation "Object" +- @ref MatrixTransformation2D "Object" +- @ref MatrixTransformation3D "Object" +- @ref RigidMatrixTransformation2D "Object" +- @ref RigidMatrixTransformation3D "Object" +- @ref TranslationTransformation2D "Object" +- @ref TranslationTransformation3D "Object" + +@see @ref Scene, @ref AbstractFeature, @ref AbstractTransformation, + @ref DebugTools::ObjectRenderer */ template class MAGNUM_SCENEGRAPH_EXPORT Object: public AbstractObject, public Transformation #ifndef DOXYGEN_GENERATING_OUTPUT diff --git a/src/SceneGraph/Object.hpp b/src/SceneGraph/Object.hpp index 71acb4ed1..f30ae68ed 100644 --- a/src/SceneGraph/Object.hpp +++ b/src/SceneGraph/Object.hpp @@ -25,7 +25,7 @@ */ /** @file - * @brief @ref compilation-speedup-hpp "Template implementation" for Object.h + * @brief @ref compilation-speedup-hpp "Template implementation" for @ref AbstractObject.h, @ref AbstractTransformation.h and @ref Object.h */ #include "AbstractTransformation.h"