From 174bbc9e4b7ed0104ac07482c9becf622292cbf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 18:23:27 +0200 Subject: [PATCH] SceneGraph: completed documentation review. Worked around all Doxygen issues (they were for deprecated functionality only, so shouldn't be much of a problem anyway). --- src/Magnum/SceneGraph/AbstractCamera.h | 2 +- src/Magnum/SceneGraph/AbstractObject.h | 5 ++-- src/Magnum/SceneGraph/AbstractTranslation.h | 3 +- .../AbstractTranslationRotation2D.h | 4 ++- .../AbstractTranslationRotation3D.h | 11 +++++--- .../AbstractTranslationRotationScaling2D.h | 4 ++- .../AbstractTranslationRotationScaling3D.h | 4 ++- src/Magnum/SceneGraph/Animable.h | 12 ++++---- .../SceneGraph/DualComplexTransformation.h | 2 +- .../SceneGraph/DualQuaternionTransformation.h | 2 +- .../SceneGraph/MatrixTransformation2D.h | 2 +- .../SceneGraph/MatrixTransformation3D.h | 2 +- src/Magnum/SceneGraph/Object.h | 28 +++++++++++-------- .../SceneGraph/RigidMatrixTransformation2D.h | 11 +++++--- .../SceneGraph/RigidMatrixTransformation3D.h | 14 ++++++---- .../SceneGraph/TranslationTransformation.h | 2 +- 16 files changed, 64 insertions(+), 44 deletions(-) diff --git a/src/Magnum/SceneGraph/AbstractCamera.h b/src/Magnum/SceneGraph/AbstractCamera.h index 737912b44..9a6467b37 100644 --- a/src/Magnum/SceneGraph/AbstractCamera.h +++ b/src/Magnum/SceneGraph/AbstractCamera.h @@ -136,7 +136,7 @@ template class AbstractCamera: public AbstractF protected: /** * @brief Constructor - * @param object Object holding the camera + * @param object %Object holding the camera */ explicit AbstractCamera(AbstractObject& object); diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index e6a77c132..cbb29d74d 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -161,9 +161,8 @@ template class AbstractObject #ifdef MAGNUM_BUILD_DEPRECATED /** - * @copybrief transformationMatrices(const std::vector>>&, const MatrixType&) - * @deprecated Use @ref Magnum::SceneGraph::AbstractObject::transformationMatrices(const std::vector>>&, const MatrixType&) "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. - * @todoc The `ref` works when `const` is added, but then the quoted thing is not taken as a part of the reference. The `copybrief` doesn't parse the `const` at all. Doxygen I hate you. + * @copybrief transformationMatrices() + * @deprecated Use @ref Magnum::SceneGraph::AbstractObject::transformationMatrices() "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. */ CORRADE_DEPRECATED("use transformationMatrices(const std::vector>>&, const MatrixType&) instead") std::vector transformationMatrices(const std::vector*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const; diff --git a/src/Magnum/SceneGraph/AbstractTranslation.h b/src/Magnum/SceneGraph/AbstractTranslation.h index b7aff465b..4ccf433d8 100644 --- a/src/Magnum/SceneGraph/AbstractTranslation.h +++ b/src/Magnum/SceneGraph/AbstractTranslation.h @@ -43,7 +43,8 @@ transformation matrix, but it's possible to store translation in e.g. integral coordinates while having floating-point transformation matrix. @see @ref AbstractBasicTranslation2D, @ref AbstractBasicTranslation3D, - @ref AbstractTranslation2D, @ref AbstractTranslation3D, @ref scenegraph + @ref AbstractTranslation2D, @ref AbstractTranslation3D, @ref scenegraph, + @ref TranslationTransformation */ #ifdef DOXYGEN_GENERATING_OUTPUT template diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h b/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h index 91db68c0c..8064916d9 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h @@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for two-dimensional scenes supporting translation and rotation -@see @ref AbstractTranslationRotation2D, @ref scenegraph, @ref AbstractBasicTranslationRotation3D +@see @ref AbstractTranslationRotation2D, @ref scenegraph, + @ref AbstractBasicTranslationRotation3D, + @ref BasicRigidMatrixTransformation2D, @ref BasicDualComplexTransformation @todo Use AbstractBasicTransformation2D when support for GCC 4.6 is dropped */ template class AbstractBasicTranslationRotation2D: public AbstractTranslation<2, T> { diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h b/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h index e03d9b3b9..58afc7e47 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h @@ -36,7 +36,10 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for three-dimensional scenes supporting translation and rotation -@see @ref AbstractTranslationRotation3D @ref scenegraph, @ref AbstractBasicTranslationRotation2D +@see @ref AbstractTranslationRotation3D @ref scenegraph, + @ref AbstractBasicTranslationRotation2D, + @ref BasicRigidMatrixTransformation3D, + @ref BasicDualQuaternionTransformation @todo Use AbstractBasicTransformation3D when support for GCC 4.6 is dropped */ template class AbstractBasicTranslationRotation3D: public AbstractTranslation<3, T> { @@ -66,7 +69,7 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::xAxis())`, see subclasses for more + * `rotate(angle, %Vector3::xAxis())`, see subclasses for more * information. */ AbstractBasicTranslationRotation3D& rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -81,7 +84,7 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::yAxis())`, see subclasses for more + * `rotate(angle, %Vector3::yAxis())`, see subclasses for more * information. */ AbstractBasicTranslationRotation3D& rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -96,7 +99,7 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::zAxis())`, see subclasses for more + * `rotate(angle, %Vector3::zAxis())`, see subclasses for more * information. */ AbstractBasicTranslationRotation3D& rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) { diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h index 1d3d988d8..38d3022db 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h @@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for two-dimensional scenes supporting translation, rotation and scaling -@see @ref AbstractTranslationRotationScaling2D, @ref scenegraph, @ref AbstractBasicTranslationRotationScaling2D +@see @ref AbstractTranslationRotationScaling2D, @ref scenegraph, + @ref AbstractBasicTranslationRotationScaling2D, + @ref BasicMatrixTransformation2D */ template class AbstractBasicTranslationRotationScaling2D: public AbstractBasicTranslationRotation2D { public: diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h index 80e1bf0ef..f87c1167d 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h @@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for three-dimensional scenes supporting translation, rotation and scaling -@see @ref AbstractTranslationRotationScaling3D, @ref scenegraph, @ref AbstractBasicTranslationRotationScaling2D +@see @ref AbstractTranslationRotationScaling3D, @ref scenegraph, + @ref AbstractBasicTranslationRotationScaling2D, + @ref BasicMatrixTransformation3D */ template class AbstractBasicTranslationRotationScaling3D: public AbstractBasicTranslationRotation3D { public: diff --git a/src/Magnum/SceneGraph/Animable.h b/src/Magnum/SceneGraph/Animable.h index e0f490b69..67482e468 100644 --- a/src/Magnum/SceneGraph/Animable.h +++ b/src/Magnum/SceneGraph/Animable.h @@ -56,7 +56,7 @@ enum class AnimationState: UnsignedByte { Running }; -/** @debugoperator{Magnum::SceneGraph::Animable} */ +/** @debugoperatorenum{Magnum::SceneGraph::AnimationState} */ Debug MAGNUM_SCENEGRAPH_EXPORT operator<<(Debug debug, AnimationState value); /** @@ -68,9 +68,9 @@ Adds animation feature to object. Each %Animable is part of some @section Animable-usage Usage 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 @ref animationStep() to -implement your animation, the function provides both absolute animation +@ref animationStep(). You can do it conveniently using multiple inheritance +(see @ref scenegraph-features for introduction). Override @ref animationStep() +to implement your animation, the function provides both absolute animation time and time delta. Example: @code typedef SceneGraph::Object Object3D; @@ -92,8 +92,8 @@ class AnimableObject: public Object3D, SceneGraph::Animable3D { Then add the object to your scene and some animation group. You can also use @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. +without repeat, see @ref setState(), @ref setRepeated() and +@ref setRepeatCount() for more information. @code Scene3D scene; SceneGraph::AnimableGroup3D animables; diff --git a/src/Magnum/SceneGraph/DualComplexTransformation.h b/src/Magnum/SceneGraph/DualComplexTransformation.h index 974c29cb2..4167ab0cd 100644 --- a/src/Magnum/SceneGraph/DualComplexTransformation.h +++ b/src/Magnum/SceneGraph/DualComplexTransformation.h @@ -48,7 +48,7 @@ template class BasicDualComplexTransformation: public AbstractBasicTran /** @brief Underlying transformation type */ typedef Math::DualComplex DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::DualComplex transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/DualQuaternionTransformation.h b/src/Magnum/SceneGraph/DualQuaternionTransformation.h index d424ae0f8..69d75261b 100644 --- a/src/Magnum/SceneGraph/DualQuaternionTransformation.h +++ b/src/Magnum/SceneGraph/DualQuaternionTransformation.h @@ -48,7 +48,7 @@ template class BasicDualQuaternionTransformation: public AbstractBasicT /** @brief Underlying transformation type */ typedef Math::DualQuaternion DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::DualQuaternion transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/MatrixTransformation2D.h b/src/Magnum/SceneGraph/MatrixTransformation2D.h index 5401736ef..8aa30e7ad 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation2D.h @@ -47,7 +47,7 @@ template class BasicMatrixTransformation2D: public AbstractBasicTransla /** @brief Underlying transformation type */ typedef Math::Matrix3 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix3 transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/MatrixTransformation3D.h b/src/Magnum/SceneGraph/MatrixTransformation3D.h index 970ed0bfe..b5b67c84f 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation3D.h @@ -46,7 +46,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla /** @brief Underlying transformation type */ typedef Math::Matrix4 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix4 transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/Object.h b/src/Magnum/SceneGraph/Object.h index d40f3d97b..86d5f560e 100644 --- a/src/Magnum/SceneGraph/Object.h +++ b/src/Magnum/SceneGraph/Object.h @@ -104,13 +104,6 @@ template class Object: public AbstractObject>; friend class Containers::LinkedListItem, Object>; - #ifndef DOXYGEN_GENERATING_OUTPUT - Object(const Object&) = delete; - Object(Object&&) = delete; - Object& operator=(const Object&) = delete; - Object& operator=(Object&&) = delete; - #endif - public: /** @brief Matrix type */ typedef typename DimensionTraits::MatrixType MatrixType; @@ -121,6 +114,12 @@ template class Object: public AbstractObject* parent = nullptr); + /** @brief Copying is not allowed */ + Object(const Object&) = delete; + + /** @brief Moving is not allowed */ + Object(Object&&) = delete; + /** * @brief Destructor * @@ -129,6 +128,12 @@ template class Object: public AbstractObject& operator=(const Object&) = delete; + + /** @brief Moving is not allowed */ + Object& operator=(Object&&) = delete; + /** * @{ @name Scene hierarchy * @@ -253,9 +258,8 @@ template class Object: public AbstractObject>>&, const MatrixType&) - * @deprecated Use @ref Magnum::SceneGraph::Object::transformationMatrices(const std::vector>>&, const MatrixType&) "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. - * @todoc fix this when Doxygen is sane (see this function in AbstractObject) + * @copybrief transformationMatrices() + * @deprecated Use @ref Magnum::SceneGraph::Object::transformationMatrices() "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. */ CORRADE_DEPRECATED("use transformationMatrices(const std::vector>>&, const MatrixType&) instead") std::vector transformationMatrices(const std::vector*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const; @@ -282,8 +286,8 @@ template class Object: public AbstractObject>>, const typename Transformation::DataType&) - * @deprecated Use @ref Magnum::SceneGraph::Object::transformations(std::vector>>, const typename Transformation::DataType&) "transformations(std::vector>>, const typename Transformation::DataType&)" instead. + * @copybrief transformations() + * @deprecated Use @ref Magnum::SceneGraph::Object::transformations() "transformations(std::vector>>, const typename Transformation::DataType&)" instead. * @todoc fix this when Doxygen is sane (see related function in AbstractObject) */ CORRADE_DEPRECATED("use transformations(std::vector>>, const typename Transformation::DataType&) instead") std::vector transformations(const std::vector*>& objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const; diff --git a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h index f34a0de5e..1fb94148e 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h @@ -51,7 +51,7 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr /** @brief Underlying transformation type */ typedef Math::Matrix3 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix3 transformation() const { return _transformation; } /** @@ -105,7 +105,8 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr /** * @copydoc AbstractTranslationRotationScaling2D::translate() - * Same as calling @ref transform() with @ref Math::Matrix3::translation(). + * Same as calling @ref transform() with + * @ref Math::Matrix3::translation(). */ Object>& translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix3::translation(vector), type); @@ -117,7 +118,8 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix3::rotation(). + * Same as calling @ref transform() with + * @ref Math::Matrix3::rotation(). * @see @ref normalizeRotation() */ Object>& rotate(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -131,7 +133,8 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix3::reflection(). + * Same as calling @ref transform() with + * @ref Math::Matrix3::reflection(). */ Object>& reflect(const Math::Vector2& normal, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix3::reflection(normal), type); diff --git a/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h b/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h index a96b6ecb9..1fb75fc20 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h @@ -50,7 +50,7 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr /** @brief Underlying transformation type */ typedef Math::Matrix4 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix4 transformation() const { return _transformation; } /** @@ -131,7 +131,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::rotationX(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::rotationX(). * @see @ref normalizeRotation() */ Object>& rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -144,7 +145,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::rotationY(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::rotationY(). * @see @ref normalizeRotation() */ Object>& rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -157,7 +159,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::rotationZ(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::rotationZ(). * @see @ref normalizeRotation() */ Object>& rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -171,7 +174,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::reflection(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::reflection(). */ Object>& reflect(const Math::Vector3& normal, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix4::reflection(normal), type); diff --git a/src/Magnum/SceneGraph/TranslationTransformation.h b/src/Magnum/SceneGraph/TranslationTransformation.h index db07491e4..600ef2d57 100644 --- a/src/Magnum/SceneGraph/TranslationTransformation.h +++ b/src/Magnum/SceneGraph/TranslationTransformation.h @@ -62,7 +62,7 @@ class TranslationTransformation: public AbstractTranslation::VectorType DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ typename DimensionTraits::VectorType transformation() const { return _transformation; } /**