diff --git a/src/SceneGraph/AbstractCamera.h b/src/SceneGraph/AbstractCamera.h index eb2a66ae4..003c9d574 100644 --- a/src/SceneGraph/AbstractCamera.h +++ b/src/SceneGraph/AbstractCamera.h @@ -167,8 +167,8 @@ template class AbstractCamera: public AbstractF /** @brief Base camera for two-dimensional scenes -Convenience alternative to %AbstractCamera<2, T>. See AbstractCamera -for more information. +Convenience alternative to %AbstractCamera<2, T>. See +@ref AbstractCamera for more information. @note Not available on GCC < 4.7. Use %AbstractCamera<2, T> instead. @see @ref AbstractCamera2D, @ref AbstractBasicCamera3D */ @@ -190,8 +190,8 @@ typedef AbstractCamera<2, Float> AbstractCamera2D; /** @brief Base camera for three-dimensional scenes -Convenience alternative to %AbstractCamera<3, T>. See AbstractCamera -for more information. +Convenience alternative to %AbstractCamera<3, T>. See +@ref AbstractCamera for more information. @note Not available on GCC < 4.7. Use %AbstractCamera<3, T> instead. @see @ref AbstractCamera3D, @ref AbstractBasicCamera2D */ diff --git a/src/SceneGraph/AbstractCamera.hpp b/src/SceneGraph/AbstractCamera.hpp index cc1ef8e2e..684ec1ddb 100644 --- a/src/SceneGraph/AbstractCamera.hpp +++ b/src/SceneGraph/AbstractCamera.hpp @@ -25,7 +25,7 @@ */ /** @file - * @brief @ref compilation-speedup-hpp "Template implementation" for AbstractCamera.h + * @brief @ref compilation-speedup-hpp "Template implementation" for @ref AbstractCamera.h */ #include "AbstractCamera.h" diff --git a/src/SceneGraph/AbstractFeature.h b/src/SceneGraph/AbstractFeature.h index 5580afa9c..8f2a585c5 100644 --- a/src/SceneGraph/AbstractFeature.h +++ b/src/SceneGraph/AbstractFeature.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractFeature, alias Magnum::SceneGraph::BasicAbstractFeature2D, Magnum::SceneGraph::BasicAbstractFeature3D, typedef Magnum::SceneGraph::AbstractFeature2D, Magnum::SceneGraph::AbstractFeature3D, enum Magnum::SceneGraph::CachedTransformation, enum set Magnum::SceneGraph::CachedTransformations + * @brief Class @ref Magnum::SceneGraph::AbstractFeature, alias @ref Magnum::SceneGraph::AbstractBasicFeature2D, @ref Magnum::SceneGraph::AbstractBasicFeature3D, typedef @ref Magnum::SceneGraph::AbstractFeature2D, @ref Magnum::SceneGraph::AbstractFeature3D, enum @ref Magnum::SceneGraph::CachedTransformation, enum set @ref Magnum::SceneGraph::CachedTransformations */ #include @@ -39,9 +39,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Which transformation to cache in given feature -@see @ref scenegraph-caching, CachedTransformations, - AbstractFeature::setCachedTransformations(), AbstractFeature::clean(), - AbstractFeature::cleanInverted() +@see @ref scenegraph-caching, @ref CachedTransformations, + @ref AbstractFeature::setCachedTransformations(), @ref AbstractFeature::clean(), + @ref AbstractFeature::cleanInverted() @todo Provide also simpler representations from which could benefit other transformation implementations, as they won't need to e.g. create transformation matrix from quaternion? @@ -50,14 +50,16 @@ enum class CachedTransformation: UnsignedByte { /** * Absolute transformation is cached. * - * If enabled, clean() is called when cleaning object. + * If enabled, @ref AbstractFeature::clean() is called when cleaning + * object. */ Absolute = 1 << 0, /** * Inverted absolute transformation is cached. * - * If enabled, cleanInverted() is called when cleaning object. + * If enabled, @ref AbstractFeature::cleanInverted() is called when + * cleaning object. */ InvertedAbsolute = 1 << 1 }; @@ -65,8 +67,8 @@ enum class CachedTransformation: UnsignedByte { /** @brief Which transformations to cache in this feature -@see @ref scenegraph-caching, AbstractFeature::setCachedTransformations(), - AbstractFeature::clean(), AbstractFeature::cleanInverted() +@see @ref scenegraph-caching, @ref AbstractFeature::setCachedTransformations(), + @ref AbstractFeature::clean(), @ref AbstractFeature::cleanInverted() */ typedef Containers::EnumSet CachedTransformations; @@ -75,11 +77,11 @@ CORRADE_ENUMSET_OPERATORS(CachedTransformations) /** @brief Base for object features -Contained in Object, takes care of transformation caching. See @ref scenegraph -for introduction. +Contained in @ref Object, takes care of transformation caching. See +@ref scenegraph for introduction. -Uses Corrade::Containers::LinkedList for accessing holder object and sibling -features. +Uses @ref Corrade::Containers::LinkedList for accessing holder object and +sibling features. @section AbstractFeature-subclassing Subclassing @@ -94,9 +96,9 @@ it from scratch every time to achieve better performance. See @ref scenegraph-caching for introduction. In order to have caching, you must enable it first, because by default the -caching is disabled. You can enable it using setCachedTransformations() and -then implement corresponding cleaning function(s) -- either clean(), -cleanInverted() or both. Example: +caching is disabled. You can enable it using @ref setCachedTransformations() +and then implement corresponding cleaning function(s) -- either @ref clean(), +@ref cleanInverted() or both. Example: @code class CachingFeature: public SceneGraph::AbstractFeature3D { public: @@ -119,16 +121,16 @@ Before using the cached value explicitly request object cleaning by calling @subsection AbstractFeature-subclassing-transformation Accessing object transformation -Features has by default access only to AbstractObject, which is base of Object -not depending on any particular transformation implementation. This has the -advantage that features doesn't have to be implemented for all possible +Features has by default access only to @ref AbstractObject, which is base of +@ref Object not depending on any particular transformation implementation. This +has the advantage that features doesn't have to be implemented for all possible transformation implementations, thus preventing code duplication. However it -is impossible to transform the object using only pointer to AbstractObject. +is impossible to transform the object using only pointer to @ref AbstractObject. The transformations have interfaces for common functionality, so the feature can use that interface instead of being specialized for all relevant transformation implementations. Using small trick we are able to get pointer -to both AbstractObject and needed transformation from one constructor +to both @ref AbstractObject and needed transformation from one constructor parameter: @code class TransformingFeature: public SceneGraph::AbstractFeature3D { @@ -231,7 +233,7 @@ template class AbstractFeature /** * @brief Which transformations are cached * - * @see @ref scenegraph-caching, clean(), cleanInverted() + * @see @ref scenegraph-caching, @ref clean(), @ref cleanInverted() */ CachedTransformations cachedTransformations() const { return _cachedTransformations; @@ -241,8 +243,8 @@ template class AbstractFeature /** * @brief Set transformations to be cached * - * Based on which transformation types are enabled, clean() or - * cleanInverted() is called when cleaning absolute object + * Based on which transformation types are enabled, @ref clean() or + * @ref cleanInverted() is called when cleaning absolute object * transformation. * * Nothing is enabled by default. @@ -257,7 +259,7 @@ template class AbstractFeature * * Reimplement only if you want to invalidate some external data when * object is marked as dirty. All expensive computations should be - * done in clean() and cleanInverted(). + * done in @ref clean() and @ref cleanInverted(). * * Default implementation does nothing. * @see @ref scenegraph-caching @@ -299,8 +301,8 @@ template class AbstractFeature /** @brief Base feature for two-dimensional scenes -Convenience alternative to %AbstractFeature<2, T>. See AbstractFeature -for more information. +Convenience alternative to %AbstractFeature<2, T>. See +@ref AbstractFeature for more information. @note Not available on GCC < 4.7. Use %AbstractFeature<2, T> instead. @see @ref AbstractFeature2D, @ref AbstractBasicFeature3D */ @@ -322,8 +324,8 @@ typedef AbstractFeature<2, Float> AbstractFeature2D; /** @brief Base feature for three-dimensional scenes -Convenience alternative to %AbstractFeature<3, T>. See AbstractFeature -for more information. +Convenience alternative to %AbstractFeature<3, T>. See +@ref AbstractFeature for more information. @note Not available on GCC < 4.7. Use %AbstractFeature<3, T> instead. @see AbstractFeature2D */ diff --git a/src/SceneGraph/AbstractGroupedFeature.h b/src/SceneGraph/AbstractGroupedFeature.h index 9f9126940..d274ec41a 100644 --- a/src/SceneGraph/AbstractGroupedFeature.h +++ b/src/SceneGraph/AbstractGroupedFeature.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractGroupedFeature, alias Magnum::SceneGraph::AbstractBasicGroupedFeature2D, Magnum::SceneGraph::AbstractBasicGroupedFeature3D, Magnum::SceneGraph::AbstractGroupedFeature2D, Magnum::SceneGraph::AbstractGroupedFeature3D + * @brief Class @ref Magnum::SceneGraph::AbstractGroupedFeature, alias @ref Magnum::SceneGraph::AbstractBasicGroupedFeature2D, @ref Magnum::SceneGraph::AbstractBasicGroupedFeature3D, @ref Magnum::SceneGraph::AbstractGroupedFeature2D, @ref Magnum::SceneGraph::AbstractGroupedFeature3D */ #include @@ -38,12 +38,12 @@ namespace Magnum { namespace SceneGraph { /** @brief Base for grouped features -Used together with FeatureGroup. +Used together with @ref FeatureGroup. @section AbstractGroupedFeature-subclassing Subclassing Usage is via subclassing the feature using [CRTP](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern) -and typedef'ing FeatureGroup to accept only given type, e.g.: +and typedef'ing @ref FeatureGroup to accept only given type, e.g.: @code class Drawable: public SceneGraph::AbstractGroupedFeature3D { // ... @@ -76,7 +76,7 @@ template class AbstractGroupedFe * @param group Group this feature belongs to * * Adds the feature to the object and to group, if specified. - * @see FeatureGroup::add() + * @see @ref FeatureGroup::add() */ explicit AbstractGroupedFeature(AbstractObject& object, FeatureGroup* group = nullptr): AbstractFeature(object), _group(nullptr) { if(group) group->add(static_cast(*this)); @@ -111,7 +111,7 @@ template class AbstractGroupedFe @brief Base grouped feature for two-dimensional scenes Convenience alternative to %AbstractGroupedFeature<2, Derived, T>. See -AbstractGroupedFeature for more information. +@ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %AbstractGroupedFeature<2, Derived, T> instead. @see @ref AbstractGroupedFeature2D, @ref AbstractBasicGroupedFeature3D @@ -122,7 +122,7 @@ template using AbstractBasicGroupedFeature2D = AbstractG @brief Base grouped feature for two-dimensional float scenes Convenience alternative to %AbstractBasicGroupedFeature2D. -See AbstractGroupedFeature for more information. +See @ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %AbstractGroupedFeature<2, Derived, Float> instead. @see @ref AbstractGroupedFeature3D @@ -133,7 +133,7 @@ template using AbstractGroupedFeature2D = AbstractBasicGroupedFea @brief Base grouped feature for three-dimensional scenes Convenience alternative to %AbstractGroupedFeature<3, Derived, T>. See -AbstractGroupedFeature for more information. +@ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %AbstractGroupedFeature<3, Derived, T> instead. @see @ref AbstractGroupedFeature3D, @ref AbstractBasicGroupedFeature2D @@ -144,7 +144,7 @@ template using AbstractBasicGroupedFeature3D = AbstractG @brief Base grouped feature for three-dimensional float scenes Convenience alternative to %AbstractBasicGroupedFeature3D. -See AbstractGroupedFeature for more information. +See @ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %AbstractGroupedFeature<3, Derived, Float> instead. @see @ref AbstractGroupedFeature2D diff --git a/src/SceneGraph/Animable.h b/src/SceneGraph/Animable.h index 453d6def2..b1e9a5c09 100644 --- a/src/SceneGraph/Animable.h +++ b/src/SceneGraph/Animable.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::Animable, alias Magnum::SceneGraph::BasicAnimable2D, Magnum::SceneGraph::BasicAnimable3D, typedef Magnum::SceneGraph::Animable2D, Magnum::SceneGraph::Animable3D, enum Magnum::SceneGraph::AnimationState + * @brief Class @ref Magnum::SceneGraph::Animable, alias @ref Magnum::SceneGraph::BasicAnimable2D, @ref Magnum::SceneGraph::BasicAnimable3D, typedef @ref Magnum::SceneGraph::Animable2D, @ref Magnum::SceneGraph::Animable3D, enum @ref Magnum::SceneGraph::AnimationState */ #include "AbstractGroupedFeature.h" @@ -37,7 +37,7 @@ namespace Magnum { namespace SceneGraph { /** @brief Animation state -@see Animable::setState() +@see @ref Animable::setState() */ enum class AnimationState: UnsignedByte { /** @@ -62,14 +62,14 @@ Debug MAGNUM_SCENEGRAPH_EXPORT operator<<(Debug debug, AnimationState value); /** @brief %Animable -Adds animation feature to object. Each %Animable is part of some AnimableGroup, -which takes care of running the animations. +Adds animation feature to object. Each %Animable is part of some +@ref AnimableGroup, which takes care of running the animations. @section Animable-usage Usage -First thing is add Animable feature to some object and implement +First thing is to add @ref Animable feature to some object and implement animationStep(). You can do it conveniently using multiple inheritance (see -@ref scenegraph-features for introduction). Override animationStep() to +@ref scenegraph-features for introduction). Override @ref animationStep() to implement your animation, the function provides both absolute animation time and time delta. Example: @code @@ -90,9 +90,10 @@ class AnimableObject: public Object3D, SceneGraph::Animable3D { @endcode Then add the object to your scene and some animation group. You can also use -AnimableGroup::add() and AnimableGroup::remove() instead of passing the group -in the constructor. The animation is initially in stopped state and without -repeat, see setState(), setRepeated() and setRepeatCount() for more information. +@ref AnimableGroup::add() and @ref AnimableGroup::remove() instead of passing +the group in the constructor. The animation is initially in stopped state and +without repeat, see @ref setState(), @ref setRepeated() and @ref setRepeatCount() +for more information. @code Scene3D scene; SceneGraph::AnimableGroup3D animables; @@ -102,10 +103,10 @@ SceneGraph::AnimableGroup3D animables; // ... @endcode -Animation step is performed by calling AnimableGroup::step() in your draw event -implementation. The function expects absolute time from relative to some fixed -point in the past and time delta (i.e. duration of the frame). You can use -Timeline for that, see its documentation for more information. +Animation step is performed by calling @ref AnimableGroup::step() in your draw +event implementation. The function expects absolute time from relative to some +fixed point in the past and time delta (i.e. duration of the frame). You can +use @ref Timeline for that, see its documentation for more information. @code Timeline timeline; timeline.start(); @@ -121,15 +122,15 @@ void MyApplication::drawEvent() { @section Animable-performance Using animable groups to improve performance -AnimableGroup is optimized for case when no animation is running -- it just -puts itself to rest and waits until some animation changes its state to +@ref AnimableGroup is optimized for case when no animation is running -- it +just puts itself to rest and waits until some animation changes its state to @ref AnimationState::Running again. If you put animations which are not pernamently running to separate group, they will not be always traversed when calling @ref AnimableGroup::step(), saving precious frame time. @section Animable-explicit-specializations Explicit template specializations -The following specialization are explicitly compiled into @ref SceneGraph +The following specializations 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. @@ -151,7 +152,8 @@ template class Animable: public AbstractGrouped * * Creates stopped non-repeating animation with infinite duration, * adds the feature to the object and also to group, if specified. - * @see setDuration(), setState(), setRepeated(), AnimableGroup::add() + * @see @ref setDuration(), @ref setState(), @ref setRepeated(), + * @ref AnimableGroup::add() */ explicit Animable(AbstractObject& object, AnimableGroup* group = nullptr); @@ -179,7 +181,7 @@ template class Animable: public AbstractGrouped /** * @brief Whether the animation is repeated * - * @see repeatCount() + * @see @ref repeatCount() */ bool isRepeated() const { return _repeated; } @@ -188,7 +190,7 @@ template class Animable: public AbstractGrouped * @return Reference to self (for method chaining) * * Default is `false`. - * @see setRepeatCount() + * @see @ref setRepeatCount() */ Animable& setRepeated(bool repeated) { _repeated = repeated; @@ -198,7 +200,7 @@ template class Animable: public AbstractGrouped /** * @brief Repeat count * - * @see isRepeated() + * @see @ref isRepeated() */ UnsignedShort repeatCount() const { return _repeatCount; } @@ -208,7 +210,7 @@ template class Animable: public AbstractGrouped * * Has effect only if repeated animation is enabled. `0` means * infinitely repeated animation. Default is `0`. - * @see setRepeated() + * @see @ref setRepeated() */ Animable& setRepeatCount(UnsignedShort count) { _repeatCount = count; @@ -338,7 +340,7 @@ template class Animable: public AbstractGrouped /** @brief %Animable for two-dimensional scenes -Convenience alternative to %Animable<2, T>. See Animable for more +Convenience alternative to %Animable<2, T>. See @ref Animable for more information. @note Not available on GCC < 4.7. Use %Animable<2, T> instead. @see @ref Animable2D, @ref BasicAnimable3D @@ -361,7 +363,7 @@ typedef Animable<2, Float> Animable2D; /** @brief %Animable for three-dimensional scenes -Convenience alternative to %Animable<3, T>. See Animable for more +Convenience alternative to %Animable<3, T>. See @ref Animable for more information. @note Not available on GCC < 4.7. Use %Animable<3, T> instead. @see @ref Animable3D, @ref BasicAnimable2D diff --git a/src/SceneGraph/AnimableGroup.h b/src/SceneGraph/AnimableGroup.h index d88623fb9..e9da03a08 100644 --- a/src/SceneGraph/AnimableGroup.h +++ b/src/SceneGraph/AnimableGroup.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AnimableGroup, alias Magnum::SceneGraph::BasicAnimableGroup2D, Magnum::SceneGraph::BasicAnimableGroup3D, typedef Magnum::SceneGraph::AnimableGroup2D, Magnum::SceneGraph::AnimableGroup3D + * @brief Class @ref Magnum::SceneGraph::AnimableGroup, alias @ref Magnum::SceneGraph::BasicAnimableGroup2D, @ref Magnum::SceneGraph::BasicAnimableGroup3D, typedef @ref Magnum::SceneGraph::AnimableGroup2D, @ref Magnum::SceneGraph::AnimableGroup3D */ #include "FeatureGroup.h" @@ -37,7 +37,7 @@ namespace Magnum { namespace SceneGraph { /** @brief Group of animables -See Animable for more information. +See @ref Animable for more information. @see @ref scenegraph, @ref BasicAnimableGroup2D, @ref BasicAnimableGroup3D, @ref AnimableGroup2D, @ref AnimableGroup3D */ @@ -53,19 +53,19 @@ template class AnimableGroup: public FeatureGro /** * @brief Count of running animations * - * @see step() + * @see @ref step() */ std::size_t runningCount() const { return _runningCount; } /** * @brief Perform animation step - * @param time Absolute time (e.g. Timeline::previousFrameTime()) - * @param delta Time delta for current frame (e.g. Timeline::previousFrameDuration()) + * @param time Absolute time (e.g. @ref Timeline::previousFrameTime()) + * @param delta Time delta for current frame (e.g. @ref Timeline::previousFrameDuration()) * * If there are no running animations the function does nothing. - * @see runningCount() + * @see @ref runningCount() */ - void step(const Float time, const Float delta); + void step(Float time, Float delta); private: std::size_t _runningCount; diff --git a/src/SceneGraph/Camera2D.h b/src/SceneGraph/Camera2D.h index 610af6419..c25b193bf 100644 --- a/src/SceneGraph/Camera2D.h +++ b/src/SceneGraph/Camera2D.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicCamera2D, typedef Magnum::SceneGraph::Camera2D + * @brief Class @ref Magnum::SceneGraph::BasicCamera2D, typedef @ref Magnum::SceneGraph::Camera2D */ #include "AbstractCamera.h" @@ -64,7 +64,7 @@ template class BasicCamera2D: public AbstractCamera<2, T> { * @param object %Object holding this feature * * Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions). - * @see setProjection() + * @see @ref setProjection() */ explicit BasicCamera2D(AbstractObject<2, T>& object); @@ -85,7 +85,7 @@ template class BasicCamera2D: public AbstractCamera<2, T> { * @param size Size of the view * @return Reference to self (for method chaining) * - * @see Matrix3::projection() + * @see @ref Matrix3::projection() */ BasicCamera2D& setProjection(const Math::Vector2& size); diff --git a/src/SceneGraph/Camera2D.hpp b/src/SceneGraph/Camera2D.hpp index 302d74e9b..ea85b5c76 100644 --- a/src/SceneGraph/Camera2D.hpp +++ b/src/SceneGraph/Camera2D.hpp @@ -25,7 +25,7 @@ */ /** @file - * @brief @ref compilation-speedup-hpp "Template implementation" for Camera2D.h + * @brief @ref compilation-speedup-hpp "Template implementation" for @ref Camera2D.h */ #include "AbstractCamera.hpp" diff --git a/src/SceneGraph/Camera3D.h b/src/SceneGraph/Camera3D.h index d6744d953..0cc8c9694 100644 --- a/src/SceneGraph/Camera3D.h +++ b/src/SceneGraph/Camera3D.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicCamera3D, typedef Magnum::SceneGraph::Camera3D + * @brief Class @ref Magnum::SceneGraph::BasicCamera3D, typedef @ref Magnum::SceneGraph::Camera3D */ #include "AbstractCamera.h" @@ -89,7 +89,7 @@ template class BasicCamera3D: public AbstractCamera<3, T> { * @param far Far clipping plane * @return Reference to self (for method chaining) * - * @see setPerspective(), Matrix4::orthographicProjection() + * @see @ref setPerspective(), @ref Matrix4::orthographicProjection() */ BasicCamera3D& setOrthographic(const Math::Vector2& size, T near, T far); @@ -100,7 +100,7 @@ template class BasicCamera3D: public AbstractCamera<3, T> { * @param far Far clipping plane * @return Reference to self (for method chaining) * - * @see setOrthographic(), Matrix4::perspectiveProjection() + * @see @ref setOrthographic(), @ref Matrix4::perspectiveProjection() */ BasicCamera3D& setPerspective(const Math::Vector2& size, T near, T far); @@ -112,7 +112,7 @@ template class BasicCamera3D: public AbstractCamera<3, T> { * @param far Far clipping plane * @return Reference to self (for method chaining) * - * @see setOrthographic(), Matrix4::perspectiveProjection() + * @see @ref setOrthographic(), @ref Matrix4::perspectiveProjection() */ BasicCamera3D& setPerspective(Math::Rad fov, T aspectRatio, T near, T far); diff --git a/src/SceneGraph/Camera3D.hpp b/src/SceneGraph/Camera3D.hpp index bef3b77e9..597f22fd0 100644 --- a/src/SceneGraph/Camera3D.hpp +++ b/src/SceneGraph/Camera3D.hpp @@ -25,7 +25,7 @@ */ /** @file - * @brief @ref compilation-speedup-hpp "Template implementation" for Camera3D.h + * @brief @ref compilation-speedup-hpp "Template implementation" for @ref Camera3D.h */ #include "AbstractCamera.hpp" diff --git a/src/SceneGraph/Drawable.h b/src/SceneGraph/Drawable.h index 292907f57..d5023301c 100644 --- a/src/SceneGraph/Drawable.h +++ b/src/SceneGraph/Drawable.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::Drawable, Magnum::SceneGraph::DrawableGroup, alias Magnum::SceneGraph::BasicDrawable2D, Magnum::SceneGraph::BasicDrawable3D, Magnum::SceneGraph::BasicDrawableGroup2D, Magnum::SceneGraph::BasicDrawableGroup3D, typedef Magnum::SceneGraph::Drawable2D, Magnum::SceneGraph::Drawable3D, Magnum::SceneGraph::DrawableGroup2D, Magnum::SceneGraph::DrawableGroup3D + * @brief Class @ref Magnum::SceneGraph::Drawable, @ref Magnum::SceneGraph::DrawableGroup, alias @ref Magnum::SceneGraph::BasicDrawable2D, @ref Magnum::SceneGraph::BasicDrawable3D, @ref Magnum::SceneGraph::BasicDrawableGroup2D, @ref Magnum::SceneGraph::BasicDrawableGroup3D, typedef @ref Magnum::SceneGraph::Drawable2D, @ref Magnum::SceneGraph::Drawable3D, @ref Magnum::SceneGraph::DrawableGroup2D, @ref Magnum::SceneGraph::DrawableGroup3D */ #include "AbstractGroupedFeature.h" @@ -35,14 +35,15 @@ namespace Magnum { namespace SceneGraph { /** @brief %Drawable -Adds drawing function to the object. Each %Drawable is part of some DrawableGroup -and the whole group is drawn with particular camera using AbstractCamera::draw(). +Adds drawing function to the object. Each %Drawable is part of some +@ref DrawableGroup and the whole group is drawn with particular camera using +@ref AbstractCamera::draw(). @section Drawable-usage Usage -First thing is add Drawable feature to some object and implement draw(). You -can do it conveniently using multiple inheritance (see @ref scenegraph-features -for introduction). Example: +First thing is to add @ref Drawable feature to some object and implement +@ref draw(). You can do it conveniently using multiple inheritance (see +@ref scenegraph-features for introduction). Example: @code typedef SceneGraph::Object Object3D; typedef SceneGraph::Scene Scene3D; @@ -60,8 +61,8 @@ class DrawableObject: public Object3D, SceneGraph::Drawable3D { @endcode Then you add these objects to your scene and some drawable group and transform -them as you like. You can also use DrawableGroup::add() and -DrawableGroup::remove(). +them as you like. You can also use @ref DrawableGroup::add() and +@ref DrawableGroup::remove(). @code Scene3D scene; SceneGraph::DrawableGroup3D drawables; @@ -74,9 +75,10 @@ SceneGraph::DrawableGroup3D drawables; // ... @endcode -The last thing you need is Camera attached to some object (thus using its +The last thing you need is camera attached to some object (thus using its transformation) and with it you can perform drawing in your draw event -implementation. See Camera2D and Camera3D documentation for more information. +implementation. See @ref Camera2D and @ref Camera3D documentation for more +information. @code Camera3D camera(&cameraObject); @@ -91,10 +93,10 @@ void MyApplication::drawEvent() { @section Drawable-performance Using drawable groups to improve performance You can organize your drawables to multiple groups to minimize OpenGL state -changes - for example put all objects using the same shader, the same light +changes -- for example put all objects using the same shader, the same light setup etc into one group, then put all transparent into another and set common -parameters once for whole group instead of setting them again in each draw() -implementation. Example: +parameters once for whole group instead of setting them again in each +@ref draw() implementation. Example: @code Shaders::PhongShader shader; SceneGraph::DrawableGroup3D phongObjects, transparentObjects; @@ -135,7 +137,7 @@ template class Drawable: public AbstractGrouped * @param drawables Group this drawable belongs to * * Adds the feature to the object and also to the group, if specified. - * Otherwise you can use DrawableGroup::add(). + * Otherwise you can use @ref DrawableGroup::add(). */ explicit Drawable(AbstractObject& object, DrawableGroup* drawables = nullptr); @@ -159,7 +161,8 @@ template class Drawable: public AbstractGrouped * to camera * @param camera Camera * - * Projection matrix can be retrieved from AbstractCamera::projectionMatrix(). + * Projection matrix can be retrieved from + * @ref SceneGraph::AbstractCamera::projectionMatrix() "AbstractCamera::projectionMatrix()". */ virtual void draw(const typename DimensionTraits::MatrixType& transformationMatrix, AbstractCamera& camera) = 0; }; @@ -168,7 +171,7 @@ template class Drawable: public AbstractGrouped /** @brief %Drawable for two-dimensional scenes -Convenience alternative to %Drawable<2, T>. See Drawable for more +Convenience alternative to %Drawable<2, T>. See @ref Drawable for more information. @note Not available on GCC < 4.7. Use %Drawable<2, T> instead. @see @ref Drawable2D, @ref BasicDrawable3D @@ -191,7 +194,7 @@ typedef Drawable<2, Float> Drawable2D; /** @brief %Drawable for three-dimensional scenes -Convenience alternative to %Drawable<3, T>. See Drawable for more +Convenience alternative to %Drawable<3, T>. See @ref Drawable for more information. @note Not available on GCC < 4.7. Use %Drawable<3, T> instead. @see @ref Drawable3D, @ref BasicDrawable3D @@ -227,7 +230,7 @@ template class DrawableGroup: public FeatureGro /** @brief Group of drawables for two-dimensional scenes -Convenience alternative to %DrawableGroup<2, T>. See Drawable for +Convenience alternative to %DrawableGroup<2, T>. See @ref Drawable for more information. @note Not available on GCC < 4.7. Use %Drawable<2, T> instead. @see @ref DrawableGroup2D, @ref BasicDrawableGroup3D @@ -250,7 +253,7 @@ typedef DrawableGroup<2, Float> DrawableGroup2D; /** @brief Group of drawables for three-dimensional scenes -Convenience alternative to %DrawableGroup<3, T>. See Drawable for +Convenience alternative to %DrawableGroup<3, T>. See @ref Drawable for more information. @note Not available on GCC < 4.7. Use %Drawable<3, T> instead. @see @ref DrawableGroup3D, @ref BasicDrawableGroup2D diff --git a/src/SceneGraph/FeatureGroup.h b/src/SceneGraph/FeatureGroup.h index 5934020fc..efa7acb03 100644 --- a/src/SceneGraph/FeatureGroup.h +++ b/src/SceneGraph/FeatureGroup.h @@ -25,7 +25,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractFeatureGroup, Magnum::SceneGraph::FeatureGroup, alias Magnum::SceneGraph::BasicFeatureGroup2D, Magnum::SceneGraph::BasicFeatureGroup3D, Magnum::SceneGraph::FeatureGroup2D, Magnum::SceneGraph::FeatureGroup3D + * @brief Class @ref Magnum::SceneGraph::AbstractFeatureGroup, @ref Magnum::SceneGraph::FeatureGroup, alias @ref Magnum::SceneGraph::BasicFeatureGroup2D, @ref Magnum::SceneGraph::BasicFeatureGroup3D, @ref Magnum::SceneGraph::FeatureGroup2D, @ref Magnum::SceneGraph::FeatureGroup3D */ #include @@ -98,7 +98,7 @@ template class FeatureGroup: pub * @return Reference to self (for method chaining) * * If the features is part of another group, it is removed from it. - * @see remove(), AbstractGroupedFeature::AbstractGroupedFeature() + * @see @ref remove(), @ref AbstractGroupedFeature::AbstractGroupedFeature() */ FeatureGroup& add(Feature& feature); @@ -107,7 +107,7 @@ template class FeatureGroup: pub * @return Reference to self (for method chaining) * * The feature must be part of the group. - * @see add() + * @see @ref add() */ FeatureGroup& remove(Feature& feature); }; @@ -117,7 +117,7 @@ template class FeatureGroup: pub @brief Base feature group for two-dimensional scenes Convenience alternative to %FeatureGroup<2, Feature, T>. See -AbstractGroupedFeature for more information. +@ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %FeatureGroup<2, Feature, T> instead. @see @ref FeatureGroup2D, @ref BasicFeatureGroup3D @@ -128,7 +128,7 @@ template using BasicFeatureGroup2D = FeatureGroup<2, Fea @brief Base feature group for two-dimensional float scenes Convenience alternative to %BasicFeatureGroup2D. See -AbstractGroupedFeature for more information. +@ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %FeatureGroup<2, Feature, Float> instead. @see @ref FeatureGroup3D @@ -139,7 +139,7 @@ template using FeatureGroup2D = BasicFeatureGroup2D%FeatureGroup<3, Feature, T>. See -AbstractGroupedFeature for more information. +@ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %FeatureGroup<3, Feature, T> instead. @see @ref FeatureGroup3D, @ref BasicFeatureGroup2D @@ -150,7 +150,7 @@ template using BasicFeatureGroup3D = FeatureGroup<3, Fea @brief Base feature group for three-dimensional float scenes Convenience alternative to %BasicFeatureGroup3D. See -AbstractGroupedFeature for more information. +@ref AbstractGroupedFeature for more information. @note Not available on GCC < 4.7. Use %FeatureGroup<3, Feature, Float> instead. @see @ref FeatureGroup2D