From 8acd03778e1c8af507d6854f6fcb6027b37718b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 8 Feb 2014 19:54:09 +0100 Subject: [PATCH] SceneGraph: documentation updates and fixes. --- src/Magnum/SceneGraph/AbstractObject.h | 50 +++++++++---------- .../SceneGraph/AbstractTransformation.h | 8 +-- src/Magnum/SceneGraph/AbstractTranslation.h | 7 +-- .../AbstractTranslationRotation2D.h | 4 +- .../AbstractTranslationRotation3D.h | 33 +++++++----- .../AbstractTranslationRotationScaling2D.h | 6 +-- .../AbstractTranslationRotationScaling3D.h | 7 +-- .../SceneGraph/DualComplexTransformation.h | 21 ++++---- .../SceneGraph/DualQuaternionTransformation.h | 21 ++++---- .../SceneGraph/MatrixTransformation2D.h | 15 +++--- .../SceneGraph/MatrixTransformation3D.h | 18 +++---- src/Magnum/SceneGraph/Object.h | 37 ++++++++++---- .../SceneGraph/RigidMatrixTransformation2D.h | 30 +++++------ .../SceneGraph/RigidMatrixTransformation3D.h | 39 ++++++++------- src/Magnum/SceneGraph/Scene.h | 4 +- src/Magnum/SceneGraph/SceneGraph.h | 2 +- .../SceneGraph/TranslationTransformation.h | 5 +- 17 files changed, 169 insertions(+), 138 deletions(-) diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index 11600ded7..cc204eb36 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractObject, alias Magnum::SceneGraph::AbstractBasicObject2D, Magnum::SceneGraph::AbstractBasicObject3D, typedef Magnum::SceneGraph::AbstractObject2D, Magnum::SceneGraph::AbstractObject3D + * @brief Class @ref Magnum::SceneGraph::AbstractObject, alias @ref Magnum::SceneGraph::AbstractBasicObject2D, @ref Magnum::SceneGraph::AbstractBasicObject3D, typedef @ref Magnum::SceneGraph::AbstractObject2D, @ref Magnum::SceneGraph::AbstractObject3D */ #include @@ -129,7 +129,8 @@ template class AbstractObject /** * @brief Transformation matrix * - * @see Object::transformation() + * See also `transformation()` function of various transformation + * classes. */ MatrixType transformationMatrix() const { return doTransformationMatrix(); @@ -138,7 +139,7 @@ template class AbstractObject /** * @brief Transformation matrix relative to root object * - * @see Object::absoluteTransformation() + * @see @ref Object::absoluteTransformation() */ MatrixType absoluteTransformationMatrix() const { return doAbsoluteTransformationMatrix(); @@ -150,8 +151,8 @@ template class AbstractObject * All transformations are premultiplied with @p initialTransformationMatrix, * if specified. * @warning This function cannot check if all objects are of the same - * Object type, use typesafe Object::transformationMatrices() when - * possible. + * @ref Object type, use typesafe @ref Object::transformationMatrices() + * when possible. */ std::vector transformationMatrices(const std::vector*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const { return doTransformationMatrices(objects, initialTransformationMatrix); @@ -170,7 +171,8 @@ template class AbstractObject * * Only dirty objects in the list are cleaned. * @warning This function cannot check if all objects are of the same - * Object type, use typesafe Object::setClean() when possible. + * @ref Object type, use typesafe @ref Object::setClean() when + * possible. */ static void setClean(const std::vector*>& objects) { if(objects.empty()) return; @@ -181,10 +183,8 @@ template class AbstractObject * @brief Whether absolute transformation is dirty * * Returns `true` if transformation of the object or any parent has - * changed since last call to setClean(), `false` otherwise. - * - * All objects are dirty by default. - * + * changed since last call to @ref setClean(), `false` otherwise. All + * objects are dirty by default. * @see @ref scenegraph-caching */ bool isDirty() const { return doIsDirty(); } @@ -192,26 +192,26 @@ template class AbstractObject /** * @brief Set object absolute transformation as dirty * - * Calls AbstractFeature::markDirty() on all object features and - * recursively calls setDirty() on every child object which is not + * Calls @ref AbstractFeature::markDirty() on all object features and + * recursively calls @ref setDirty() on every child object which is not * already dirty. If the object is already marked as dirty, the * function does nothing. - * @see @ref scenegraph-caching, setClean(), isDirty() + * @see @ref scenegraph-caching, @ref setClean(), @ref isDirty() */ void setDirty() { doSetDirty(); } /** * @brief Clean object absolute transformation * - * Calls AbstractFeature::clean() and/or AbstractFeature::cleanInverted() + * Calls @ref AbstractFeature::clean() and/or @ref AbstractFeature::cleanInverted() * on all object features which have caching enabled and recursively - * calls setClean() on every parent which is not already clean. If the - * object is already clean, the function does nothing. + * calls @ref setClean() on every parent which is not already clean. If + * the object is already clean, the function does nothing. * - * See also setClean(const std::vector& objects), which cleans given - * set of objects more efficiently than when calling setClean() on - * each object individually. - * @see @ref scenegraph-caching, setDirty(), isDirty() + * See also @ref setClean(const std::vector*>&), + * which cleans given set of objects more efficiently than when calling + * @ref setClean() on each object individually. + * @see @ref scenegraph-caching, @ref setDirty(), @ref isDirty() */ void setClean() { doSetClean(); } @@ -235,8 +235,8 @@ template class AbstractObject /** @brief Base object for two-dimensional scenes -Convenience alternative to %AbstractObject<2, T>. See AbstractObject -for more information. +Convenience alternative to %AbstractObject<2, T>. See +@ref AbstractObject for more information. @note Not available on GCC < 4.7. Use %AbstractObject<2, T> instead. @see @ref AbstractObject2D, @ref AbstractBasicObject3D */ @@ -258,10 +258,10 @@ typedef AbstractObject<2, Float> AbstractObject2D; /** @brief Base object for three-dimensional scenes -Convenience alternative to %AbstractObject<3, T>. See AbstractObject -for more information. +Convenience alternative to %AbstractObject<3, T>. See +@ref AbstractObject for more information. @note Not available on GCC < 4.7. Use %AbstractObject<3, T> instead. -@see AbstractObject2D +@see @ref AbstractObject3D, @ref AbstractBasicObject2D */ template using AbstractBasicObject3D = AbstractObject<3, T>; #endif diff --git a/src/Magnum/SceneGraph/AbstractTransformation.h b/src/Magnum/SceneGraph/AbstractTransformation.h index d6034052e..45c4236f4 100644 --- a/src/Magnum/SceneGraph/AbstractTransformation.h +++ b/src/Magnum/SceneGraph/AbstractTransformation.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractTransformation, alias Magnum::SceneGraph::AbstractBasicTransformation2D, Magnum::SceneGraph::AbstractBasicTransformation3D, typedef Magnum::SceneGraph::AbstractTransformation2D, Magnum::SceneGraph::AbstractTransformation3D, enum Magnum::SceneGraph::TransformationType + * @brief Class @ref Magnum::SceneGraph::AbstractTransformation, alias @ref Magnum::SceneGraph::AbstractBasicTransformation2D, @ref Magnum::SceneGraph::AbstractBasicTransformation3D, typedef @ref Magnum::SceneGraph::AbstractTransformation2D, @ref Magnum::SceneGraph::AbstractTransformation3D, enum @ref Magnum::SceneGraph::TransformationType */ #include "Magnum/SceneGraph/SceneGraph.h" @@ -80,7 +80,7 @@ template class AbstractTransformation { #else private: #endif - /** @brief Polymorphic implementation for resetTransformation() */ + /** @brief Polymorphic implementation for @ref resetTransformation() */ virtual void doResetTransformation() = 0; }; @@ -102,7 +102,7 @@ enum class TransformationType: UnsignedByte { @brief Base transformation for two-dimensional scenes Convenience alternative to %AbstractTransformation<2, T>. See -AbstractTransformation for more information. +@ref AbstractTransformation for more information. @note Not available on GCC < 4.7. Use %AbstractTransformation<2, T> instead. @see @ref AbstractTransformation2D, @ref AbstractBasicTransformation3D @@ -126,7 +126,7 @@ typedef AbstractTransformation<2, Float> AbstractTransformation2D; @brief Base transformation for three-dimensional scenes Convenience alternative to %AbstractTransformation<3, T>. See -AbstractTransformation for more information. +@ref AbstractTransformation for more information. @note Not available on GCC < 4.7. Use %AbstractTransformation<3, T> instead. @see @ref AbstractTransformation3D, @ref AbstractBasicTransformation2D diff --git a/src/Magnum/SceneGraph/AbstractTranslation.h b/src/Magnum/SceneGraph/AbstractTranslation.h index 91877a597..b7aff465b 100644 --- a/src/Magnum/SceneGraph/AbstractTranslation.h +++ b/src/Magnum/SceneGraph/AbstractTranslation.h @@ -60,8 +60,9 @@ class AbstractTranslation: public AbstractTransformation { * @param type Transformation type * @return Reference to self (for method chaining) * - * @see @ref Vector2::xAxis(), @ref Vector2::yAxis(), @ref Vector3::xAxis(), - * @ref Vector3::yAxis(), @ref Vector3::zAxis() + * @see @ref Math::Vector2::xAxis(), @ref Math::Vector2::yAxis(), + * @ref Math::Vector3::xAxis(), @ref Math::Vector3::yAxis(), + * @ref Math::Vector3::zAxis() */ AbstractTranslation& translate(const typename DimensionTraits::VectorType& vector, TransformationType type = TransformationType::Global) { doTranslate(vector, type); @@ -76,7 +77,7 @@ class AbstractTranslation: public AbstractTransformation { #else private: #endif - /** @brief Polymorphic implementation for translate() */ + /** @brief Polymorphic implementation for @ref translate() */ virtual void doTranslate(const typename DimensionTraits::VectorType& vector, TransformationType type) = 0; }; diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h b/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h index efff4b4ba..91db68c0c 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractBasicTranslationRotation2D, typedef Magnum::SceneGraph::AbstractTranslationRotation2D + * @brief Class @ref Magnum::SceneGraph::AbstractBasicTranslationRotation2D, typedef @ref Magnum::SceneGraph::AbstractTranslationRotation2D */ #include "Magnum/SceneGraph/AbstractTranslation.h" @@ -70,7 +70,7 @@ template class AbstractBasicTranslationRotation2D: public AbstractTrans #else private: #endif - /** @brief Polymorphic implementation for rotate() */ + /** @brief Polymorphic implementation for @ref rotate() */ virtual void doRotate(Math::Rad angle, TransformationType type) = 0; }; diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h b/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h index d06f01ebc..e03d9b3b9 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractBasicTranslationRotation3D, typedef Magnum::SceneGraph::AbstractTranslationRotation3D + * @brief Class @ref Magnum::SceneGraph::AbstractBasicTranslationRotation3D, typedef @ref Magnum::SceneGraph::AbstractTranslationRotation3D */ #include "Magnum/SceneGraph/AbstractTranslation.h" @@ -50,8 +50,9 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @param type Transformation type * @return Reference to self (for method chaining) * - * @see rotateX(), rotateY(), rotateZ(), Vector3::xAxis(), - * Vector3::yAxis(), Vector3::zAxis() + * @see @ref rotateX(), @ref rotateY(), @ref rotateZ(), + * @ref Math::Vector3::xAxis(), @ref Math::Vector3::yAxis(), + * @ref Math::Vector3::zAxis() */ AbstractBasicTranslationRotation3D& rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) { doRotate(angle, normalizedAxis, type); @@ -65,7 +66,8 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::xAxis())`. + * `rotate(angle, Vector3::xAxis())`, see subclasses for more + * information. */ AbstractBasicTranslationRotation3D& rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) { doRotateX(angle, type); @@ -79,7 +81,8 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::yAxis())`. + * `rotate(angle, Vector3::yAxis())`, see subclasses for more + * information. */ AbstractBasicTranslationRotation3D& rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) { doRotateX(angle, type); @@ -93,7 +96,8 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::zAxis())`. + * `rotate(angle, Vector3::zAxis())`, see subclasses for more + * information. */ AbstractBasicTranslationRotation3D& rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) { doRotateZ(angle, type); @@ -116,31 +120,34 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans #else private: #endif - /** @brief Polymorphic implementation for rotate() */ + /** @brief Polymorphic implementation for @ref rotate() */ virtual void doRotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type) = 0; /** - * @brief Polymorphic implementation for rotateX() + * @brief Polymorphic implementation for @ref rotateX() * - * Default implementation calls rotate() with Math::Vector3::xAxis(). + * Default implementation calls @ref rotate() with + * @ref Math::Vector3::xAxis(). */ virtual void doRotateX(Math::Rad angle, TransformationType type) { rotate(angle, Math::Vector3::xAxis(), type); } /** - * @brief Polymorphic implementation for rotateY() + * @brief Polymorphic implementation for @ref rotateY() * - * Default implementation calls rotate() with Math::Vector3::yAxis(). + * Default implementation calls @ref rotate() with + * @ref Math::Vector3::yAxis(). */ virtual void doRotateY(Math::Rad angle, TransformationType type) { rotate(angle, Math::Vector3::yAxis(), type); } /** - * @brief Polymorphic implementation for rotateZ() + * @brief Polymorphic implementation for @ref rotateZ() * - * Default implementation calls rotate() with Math::Vector3::zAxis(). + * Default implementation calls @ref rotate() with + * @ref Math::Vector3::zAxis(). */ virtual void doRotateZ(Math::Rad angle, TransformationType type) { rotate(angle, Math::Vector3::zAxis(), type); diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h index fb8d1019c..1d3d988d8 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractBasicTranslationRotationScaling2D, typedef Magnum::SceneGraph::AbstractTranslationRotationScaling2D + * @brief Class @ref Magnum::SceneGraph::AbstractBasicTranslationRotationScaling2D, typedef @ref Magnum::SceneGraph::AbstractTranslationRotationScaling2D */ #include "Magnum/SceneGraph/AbstractTranslationRotation2D.h" @@ -48,7 +48,7 @@ template class AbstractBasicTranslationRotationScaling2D: public Abstra * @param type Transformation type * @return Reference to self (for method chaining) * - * @see Vector2::xScale(), Vector2::yScale() + * @see @ref Math::Vector2::xScale(), @ref Math::Vector2::yScale() */ AbstractBasicTranslationRotationScaling2D& scale(const Math::Vector2& vector, TransformationType type = TransformationType::Global) { doScale(vector, type); @@ -79,7 +79,7 @@ template class AbstractBasicTranslationRotationScaling2D: public Abstra #else private: #endif - /** @brief Polymorphic implementation for scale() */ + /** @brief Polymorphic implementation for @ref scale() */ virtual void doScale(const Math::Vector2& vector, TransformationType type) = 0; }; diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h index 8b2104d7b..80e1bf0ef 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::AbstractBasicTranslationRotationScaling3D, typedef Magnum::SceneGraph::AbstractTranslationRotationScaling3D + * @brief Class @ref Magnum::SceneGraph::AbstractBasicTranslationRotationScaling3D, typedef @ref Magnum::SceneGraph::AbstractTranslationRotationScaling3D */ #include "Magnum/SceneGraph/AbstractTranslationRotation3D.h" @@ -48,7 +48,8 @@ template class AbstractBasicTranslationRotationScaling3D: public Abstra * @param type Transformation type * @return Reference to self (for method chaining) * - * @see Vector3::xScale(), Vector3::yScale(), Vector3::zScale() + * @see @ref Math::Vector3::xScale(), @ref Math::Vector3::yScale(), + * @ref Math::Vector3::zScale() */ AbstractBasicTranslationRotationScaling3D& scale(const Math::Vector3& vector, TransformationType type = TransformationType::Global) { doScale(vector, type); @@ -91,7 +92,7 @@ template class AbstractBasicTranslationRotationScaling3D: public Abstra #else private: #endif - /** @brief Polymorphic implementation for scale() */ + /** @brief Polymorphic implementation for @ref scale() */ virtual void doScale(const Math::Vector3& vector, TransformationType type) = 0; }; diff --git a/src/Magnum/SceneGraph/DualComplexTransformation.h b/src/Magnum/SceneGraph/DualComplexTransformation.h index f82584bed..974c29cb2 100644 --- a/src/Magnum/SceneGraph/DualComplexTransformation.h +++ b/src/Magnum/SceneGraph/DualComplexTransformation.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicDualComplexTransformation, typedef Magnum::SceneGraph::DualComplexTransformation + * @brief Class @ref Magnum::SceneGraph::BasicDualComplexTransformation, typedef @ref Magnum::SceneGraph::DualComplexTransformation */ #include "Magnum/Math/DualComplex.h" @@ -39,12 +39,13 @@ namespace Magnum { namespace SceneGraph { @brief Two-dimensional transformation implemented using dual complex numbers This class allows only rigid transformation (i.e. only rotation and -translation). -@see @ref DualComplexTransformation, @ref scenegraph, Math::DualComplex, @ref BasicDualQuaternionTransformation +translation). Uses @ref Math::DualComplex as underlying transformation type. +@see @ref DualComplexTransformation, @ref scenegraph, + @ref BasicDualQuaternionTransformation */ template class BasicDualComplexTransformation: public AbstractBasicTranslationRotation2D { public: - /** @brief Transformation type */ + /** @brief Underlying transformation type */ typedef Math::DualComplex DataType; /** @brief Object transformation */ @@ -55,7 +56,7 @@ template class BasicDualComplexTransformation: public AbstractBasicTran * @return Reference to self (for method chaining) * * Expects that the dual complex number is normalized. - * @see DualComplex::isNormalized() + * @see @ref Math::DualComplex::isNormalized() */ Object>& setTransformation(const Math::DualComplex& transformation) { CORRADE_ASSERT(transformation.isNormalized(), @@ -75,7 +76,7 @@ template class BasicDualComplexTransformation: public AbstractBasicTran * * Normalizes the rotation part to prevent rounding errors when rotating * the object subsequently. - * @see DualComplex::normalized() + * @see @ref Math::DualComplex::normalized() */ Object>& normalizeRotation() { return setTransformationInternal(_transformation.normalized()); @@ -88,7 +89,7 @@ template class BasicDualComplexTransformation: public AbstractBasicTran * @return Reference to self (for method chaining) * * Expects that the dual complex number is normalized. - * @see DualComplex::isNormalized() + * @see @ref Math::DualComplex::isNormalized() */ Object>& transform(const Math::DualComplex& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isNormalized(), @@ -99,7 +100,7 @@ template class BasicDualComplexTransformation: public AbstractBasicTran /** * @copydoc AbstractTranslationRotationScaling2D::translate() - * Same as calling transform() with DualComplex::translation(). + * Same as calling @ref transform() with @ref Math::DualComplex::translation(). */ Object>& translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) { return transformInternal(Math::DualComplex::translation(vector), type); @@ -111,8 +112,8 @@ template class BasicDualComplexTransformation: public AbstractBasicTran * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with DualComplex::rotation(). - * @see normalizeRotation() + * Same as calling @ref transform() with @ref Math::DualComplex::rotation(). + * @see @ref normalizeRotation() */ Object>& rotate(Math::Rad angle, TransformationType type = TransformationType::Global) { return transformInternal(Math::DualComplex::rotation(angle), type); diff --git a/src/Magnum/SceneGraph/DualQuaternionTransformation.h b/src/Magnum/SceneGraph/DualQuaternionTransformation.h index 5b2837c8e..d424ae0f8 100644 --- a/src/Magnum/SceneGraph/DualQuaternionTransformation.h +++ b/src/Magnum/SceneGraph/DualQuaternionTransformation.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicDualQuaternionTransformation, typedef Magnum::SceneGraph::DualQuaternionTransformation + * @brief Class @ref Magnum::SceneGraph::BasicDualQuaternionTransformation, typedef @ref Magnum::SceneGraph::DualQuaternionTransformation */ #include "Magnum/Math/DualQuaternion.h" @@ -39,8 +39,9 @@ namespace Magnum { namespace SceneGraph { @brief Three-dimensional transformation implemented using dual quaternions This class allows only rigid transformation (i.e. only rotation and -translation). -@see @ref DualQuaternionTransformation @ref scenegraph, Math::DualQuaternion, @ref BasicDualComplexTransformation +translation). Uses @ref Math::DualQuaternion as underlying transformation type. +@see @ref DualQuaternionTransformation @ref scenegraph, + @ref BasicDualComplexTransformation */ template class BasicDualQuaternionTransformation: public AbstractBasicTranslationRotation3D { public: @@ -55,7 +56,7 @@ template class BasicDualQuaternionTransformation: public AbstractBasicT * @return Reference to self (for method chaining) * * Expects that the dual quaternion is normalized. - * @see DualQuaternion::isNormalized() + * @see @ref Math::DualQuaternion::isNormalized() */ Object>& setTransformation(const Math::DualQuaternion& transformation) { CORRADE_ASSERT(transformation.isNormalized(), @@ -75,7 +76,7 @@ template class BasicDualQuaternionTransformation: public AbstractBasicT * * Normalizes the rotation part to prevent rounding errors when rotating * the object subsequently. - * @see DualQuaternion::normalized() + * @see @ref Math::DualQuaternion::normalized() */ Object>& normalizeRotation() { return setTransformationInternal(_transformation.normalized()); @@ -88,7 +89,7 @@ template class BasicDualQuaternionTransformation: public AbstractBasicT * @return Reference to self (for method chaining) * * Expects that the dual quaternion is normalized. - * @see DualQuaternion::isNormalized() + * @see @ref Math::DualQuaternion::isNormalized() */ Object>& transform(const Math::DualQuaternion& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isNormalized(), @@ -99,7 +100,7 @@ template class BasicDualQuaternionTransformation: public AbstractBasicT /** * @copydoc AbstractTranslationRotationScaling3D::translate() - * Same as calling transform() with DualQuaternion::translation(). + * Same as calling @ref transform() with @ref Math::DualQuaternion::translation(). */ Object>& translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) { return transformInternal(Math::DualQuaternion::translation(vector), type); @@ -112,9 +113,9 @@ template class BasicDualQuaternionTransformation: public AbstractBasicT * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with DualQuaternion::rotation(). - * @see Vector3::xAxis(), Vector3::yAxis(), Vector3::zAxis(), - * normalizeRotation() + * Same as calling @ref transform() with @ref Math::DualQuaternion::rotation(). + * @see @ref Math::Vector3::xAxis(), @ref Math::Vector3::yAxis(), + * @ref Math::Vector3::zAxis(), @ref normalizeRotation() */ Object>& rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) { return transformInternal(Math::DualQuaternion::rotation(angle, normalizedAxis), type); diff --git a/src/Magnum/SceneGraph/MatrixTransformation2D.h b/src/Magnum/SceneGraph/MatrixTransformation2D.h index 943801086..5401736ef 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation2D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicMatrixTransformation2D, typedef Magnum::SceneGraph::MatrixTransformation2D + * @brief Class @ref Magnum::SceneGraph::BasicMatrixTransformation2D, typedef @ref Magnum::SceneGraph::MatrixTransformation2D */ #include "Magnum/Math/Matrix3.h" @@ -38,8 +38,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Two-dimensional transformation implemented using matrices -Uses Math::Matrix3 as underlying type. -@see @ref MatrixTransformation2D, @ref scenegraph, @ref BasicRigidMatrixTransformation2D, @ref BasicMatrixTransformation3D +Uses @ref Math::Matrix3 as underlying transformation type. +@see @ref MatrixTransformation2D, @ref scenegraph, + @ref BasicRigidMatrixTransformation2D, @ref BasicMatrixTransformation3D */ template class BasicMatrixTransformation2D: public AbstractBasicTranslationRotationScaling2D { public: @@ -83,7 +84,7 @@ template class BasicMatrixTransformation2D: public AbstractBasicTransla /** * @copydoc AbstractTranslationRotationScaling2D::translate() - * Same as calling transform() with Matrix3::translation(). + * Same as calling @ref transform() with @ref Math::Matrix3::translation(). */ Object>& translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) { return transform(Math::Matrix3::translation(vector), type); @@ -91,7 +92,7 @@ template class BasicMatrixTransformation2D: public AbstractBasicTransla /** * @copydoc AbstractTranslationRotationScaling2D::rotate() - * Same as calling transform() with Matrix3::rotation(). + * Same as calling @ref transform() with @ref Math::Matrix3::rotation(). */ Object>& rotate(Math::Rad angle, TransformationType type = TransformationType::Global) { return transform(Math::Matrix3::rotation(angle), type); @@ -99,7 +100,7 @@ template class BasicMatrixTransformation2D: public AbstractBasicTransla /** * @copydoc AbstractTranslationRotationScaling2D::scale() - * Same as calling transform() with Matrix3::scaling(). + * Same as calling @ref transform() with @ref Math::Matrix3::scaling(). */ Object>& scale(const Math::Vector2& vector, TransformationType type = TransformationType::Global) { return transform(Math::Matrix3::scaling(vector), type); @@ -112,7 +113,7 @@ template class BasicMatrixTransformation2D: public AbstractBasicTransla * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix3::reflection(). + * Same as calling @ref transform() with @ref Math::Matrix3::reflection(). */ Object>& reflect(const Math::Vector2& normal, TransformationType type = TransformationType::Global) { return transform(Math::Matrix3::reflection(normal), type); diff --git a/src/Magnum/SceneGraph/MatrixTransformation3D.h b/src/Magnum/SceneGraph/MatrixTransformation3D.h index 0251a1d6a..970ed0bfe 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation3D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicMatrixTransformation3D, typedef Magnum::SceneGraph::MatrixTransformation3D + * @brief Class @ref Magnum::SceneGraph::BasicMatrixTransformation3D, typedef @ref Magnum::SceneGraph::MatrixTransformation3D */ #include "Magnum/Math/Matrix4.h" @@ -38,7 +38,7 @@ namespace Magnum { namespace SceneGraph { /** @brief Three-dimensional transformation implemented using matrices -Uses Math::Matrix4 as underlying type. +Uses @ref Math::Matrix4 as underlying transformation type. @see @ref MatrixTransformation3D, @ref scenegraph, @ref BasicRigidMatrixTransformation3D, @ref BasicMatrixTransformation2D */ template class BasicMatrixTransformation3D: public AbstractBasicTranslationRotationScaling3D { @@ -83,7 +83,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla /** * @copydoc AbstractTranslationRotationScaling3D::translate() - * Same as calling transform() with Matrix4::translation(). + * Same as calling @ref transform() with @ref Math::Matrix4::translation(). */ Object>& translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) { return transform(Math::Matrix4::translation(vector), type); @@ -91,7 +91,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla /** * @copydoc AbstractTranslationRotationScaling3D::rotate() - * Same as calling transform() with Matrix4::rotation(). + * Same as calling @ref transform() with @ref Math::Matrix4::rotation(). */ Object>& rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) { return transform(Math::Matrix4::rotation(angle, normalizedAxis), type); @@ -103,7 +103,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::rotationX(). + * Same as calling @ref transform() with @ref Math::Matrix4::rotationX(). */ Object>& rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) { return transform(Math::Matrix4::rotationX(angle), type); @@ -115,7 +115,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::rotationY(). + * Same as calling @ref transform() with @ref Math::Matrix4::rotationY(). */ Object>& rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) { return transform(Math::Matrix4::rotationY(angle), type); @@ -127,7 +127,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::rotationZ(). + * Same as calling @ref transform() with @ref Math::Matrix4::rotationZ(). */ Object>& rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) { return transform(Math::Matrix4::rotationZ(angle), type); @@ -135,7 +135,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla /** * @copydoc AbstractTranslationRotationScaling3D::scale() - * Same as calling transform() with Matrix4::scaling(). + * Same as calling @ref transform() with @ref Math::Matrix4::scaling(). */ Object>& scale(const Math::Vector3& vector, TransformationType type = TransformationType::Global) { return transform(Math::Matrix4::scaling(vector), type); @@ -148,7 +148,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::reflection(). + * Same as calling @ref transform() with @ref Math::Matrix4::reflection(). */ Object>& reflect(const Math::Vector3& normal, TransformationType type = TransformationType::Global) { return transform(Math::Matrix4::reflection(normal), type); diff --git a/src/Magnum/SceneGraph/Object.h b/src/Magnum/SceneGraph/Object.h index 4d4563c63..634b50597 100644 --- a/src/Magnum/SceneGraph/Object.h +++ b/src/Magnum/SceneGraph/Object.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::Object + * @brief Class @ref Magnum::SceneGraph::Object */ #include @@ -196,7 +196,7 @@ template class Object: public AbstractObject& setParent(Object* parent); @@ -204,8 +204,9 @@ template class Object: public AbstractObject& setParentKeepTransformation(Object* parent); @@ -216,7 +217,8 @@ template class Object: public AbstractObject::toMatrix(Transformation::transformation()); @@ -225,7 +227,7 @@ template class Object: public AbstractObject::toMatrix(absoluteTransformation()); @@ -234,7 +236,7 @@ template class Object: public AbstractObject class Object: public AbstractObject transformationMatrices(const std::vector*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const; @@ -252,7 +254,7 @@ template class Object: public AbstractObject class Object: public AbstractObject*> objects); @@ -281,7 +283,20 @@ template class Object: public AbstractObject*>), + * which cleans given set of objects more efficiently than when calling + * @ref setClean() on each object individually. + * @see @ref scenegraph-caching, @ref setDirty(), @ref isDirty() + */ + /* note: doc verbatim copied from AbstractObject::setClean() */ void setClean(); /*@}*/ diff --git a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h index bb492e4db..f34a0de5e 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicRigidMatrixTransformation2D, typedef Magnum::SceneGraph::RigidMatrixTransformation2D + * @brief Class @ref Magnum::SceneGraph::BasicRigidMatrixTransformation2D, typedef @ref Magnum::SceneGraph::RigidMatrixTransformation2D */ #include "Magnum/Math/Matrix3.h" @@ -39,11 +39,12 @@ namespace Magnum { namespace SceneGraph { /** @brief Two-dimensional rigid transformation implemented using matrices -Unlike BasicMatrixTransformation2D this class allows only rotation, reflection -and translation (no scaling or setting arbitrary transformations). This allows -to use Matrix3::invertedRigid() for faster computation of inverse -transformations. -@see @ref RigidMatrixTransformation2D, @ref scenegraph, @ref BasicRigidMatrixTransformation3D +Unlike @ref BasicMatrixTransformation2D this class allows only rotation, +reflection and translation (no scaling or setting arbitrary transformations). +This allows to use @ref Math::Matrix3::invertedRigid() for faster computation +of inverse transformations. +@see @ref RigidMatrixTransformation2D, @ref scenegraph, + @ref BasicRigidMatrixTransformation3D */ template class BasicRigidMatrixTransformation2D: public AbstractBasicTranslationRotation2D { public: @@ -58,7 +59,7 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @return Reference to self (for method chaining) * * Expects that the matrix represents rigid transformation. - * @see Matrix3::isRigidTransformation() + * @see @ref Math::Matrix3::isRigidTransformation() */ Object>& setTransformation(const Math::Matrix3& transformation) { CORRADE_ASSERT(transformation.isRigidTransformation(), @@ -76,8 +77,9 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @brief Normalize rotation part * @return Reference to self (for method chaining) * - * Normalizes the rotation part using Math::Algorithms::gramSchmidt() - * to prevent rounding errors when rotating the object subsequently. + * Normalizes the rotation part using + * @ref Math::Algorithms::gramSchmidtOrthonormalize() to prevent + * rounding errors when rotating the object subsequently. */ Object>& normalizeRotation() { return setTransformationInternal(Math::Matrix3::from( @@ -92,7 +94,7 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @return Reference to self (for method chaining) * * Expects that the matrix represents rigid transformation. - * @see Matrix3::isRigidTransformation() + * @see @ref Math::Matrix3::isRigidTransformation() */ Object>& transform(const Math::Matrix3& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isRigidTransformation(), @@ -103,7 +105,7 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr /** * @copydoc AbstractTranslationRotationScaling2D::translate() - * Same as calling transform() with 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); @@ -115,8 +117,8 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix3::rotation(). - * @see normalizeRotation() + * Same as calling @ref transform() with @ref Math::Matrix3::rotation(). + * @see @ref normalizeRotation() */ Object>& rotate(Math::Rad angle, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix3::rotation(angle), type); @@ -129,7 +131,7 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with 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 53d68903b..a96b6ecb9 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::BasicRigidMatrixTransformation3D, typedef Magnum::SceneGraph::RigidMatrixTransformation3D + * @brief Class @ref Magnum::SceneGraph::BasicRigidMatrixTransformation3D, typedef @ref Magnum::SceneGraph::RigidMatrixTransformation3D */ #include "Magnum/Math/Matrix4.h" @@ -39,10 +39,10 @@ namespace Magnum { namespace SceneGraph { /** @brief Three-dimensional rigid transformation implemented using matrices -Unlike BasicMatrixTransformation3D this class allows only rotation, reflection -and translation (no scaling or setting arbitrary transformations). This allows -to use Matrix4::invertedRigid() for faster computation of inverse -transformations. +Unlike @ref BasicMatrixTransformation3D this class allows only rotation, +reflection and translation (no scaling or setting arbitrary transformations). +This allows to use @ref Math::Matrix4::invertedRigid() for faster computation +of inverse transformations. @see @ref RigidMatrixTransformation3D, @ref scenegraph, @ref BasicRigidMatrixTransformation2D */ template class BasicRigidMatrixTransformation3D: public AbstractBasicTranslationRotation3D { @@ -58,7 +58,7 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @return Reference to self (for method chaining) * * Expects that the matrix represents rigid transformation. - * @see Matrix4::isRigidTransformation() + * @see @ref Matrix4::isRigidTransformation() */ Object>& setTransformation(const Math::Matrix4& transformation) { CORRADE_ASSERT(transformation.isRigidTransformation(), @@ -76,7 +76,7 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @brief Normalize rotation part * @return Reference to self (for method chaining) * - * Normalizes the rotation part using Math::Algorithms::gramSchmidt() + * Normalizes the rotation part using @ref Math::Algorithms::gramSchmidtOrthonormalize() * to prevent rounding errors when rotating the object subsequently. */ Object>& normalizeRotation() { @@ -92,7 +92,7 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @return Reference to self (for method chaining) * * Expects that the matrix represents rigid transformation. - * @see Matrix4::isRigidTransformation() + * @see @ref Math::Matrix4::isRigidTransformation() */ Object>& transform(const Math::Matrix4& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isRigidTransformation(), @@ -103,7 +103,7 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr /** * @copydoc AbstractTranslationRotationScaling3D::translate() - * Same as calling transform() with Matrix4::translation(). + * Same as calling @ref transform() with @ref Math::Matrix4::translation(). */ Object>& translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix4::translation(vector), type); @@ -116,9 +116,10 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::rotation(). - * @see rotateX(), rotateY(), rotateZ(), Vector3::xAxis(), - * Vector3::yAxis(), Vector3::zAxis(), normalizeRotation() + * Same as calling @ref transform() with @ref Math::Matrix4::rotation(). + * @see @ref rotateX(), @ref rotateY(), @ref rotateZ(), + * @ref normalizeRotation(), @ref Math::Vector3::xAxis(), + * @ref Math::Vector3::yAxis(), @ref Math::Vector3::zAxis() */ Object>& rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix4::rotation(angle, normalizedAxis), type); @@ -130,8 +131,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::rotationX(). - * @see normalizeRotation() + * Same as calling @ref transform() with @ref Math::Matrix4::rotationX(). + * @see @ref normalizeRotation() */ Object>& rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix4::rotationX(angle), type); @@ -143,8 +144,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::rotationY(). - * @see normalizeRotation() + * Same as calling @ref transform() with @ref Math::Matrix4::rotationY(). + * @see @ref normalizeRotation() */ Object>& rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix4::rotationY(angle), type); @@ -156,8 +157,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with Matrix4::rotationZ(). - * @see normalizeRotation() + * Same as calling @ref transform() with @ref Math::Matrix4::rotationZ(). + * @see @ref normalizeRotation() */ Object>& rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix4::rotationZ(angle), type); @@ -170,7 +171,7 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling transform() with 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/Scene.h b/src/Magnum/SceneGraph/Scene.h index e1b375a6a..2153fa1e6 100644 --- a/src/Magnum/SceneGraph/Scene.h +++ b/src/Magnum/SceneGraph/Scene.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::SceneGraph::Scene + * @brief Class @ref Magnum::SceneGraph::Scene */ #include "Magnum/SceneGraph/Object.h" @@ -36,7 +36,7 @@ namespace Magnum { namespace SceneGraph { /** @brief %Scene -Basically Object which cannot have parent or non-default transformation. +Basically @ref Object which cannot have parent or non-default transformation. See @ref scenegraph for introduction. */ template class Scene: public Object { diff --git a/src/Magnum/SceneGraph/SceneGraph.h b/src/Magnum/SceneGraph/SceneGraph.h index 67a7b4f52..ba8573537 100644 --- a/src/Magnum/SceneGraph/SceneGraph.h +++ b/src/Magnum/SceneGraph/SceneGraph.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Forward declarations for Magnum::SceneGraph namespace + * @brief Forward declarations for @ref Magnum::SceneGraph namespace */ #include diff --git a/src/Magnum/SceneGraph/TranslationTransformation.h b/src/Magnum/SceneGraph/TranslationTransformation.h index b3d36fe72..db07491e4 100644 --- a/src/Magnum/SceneGraph/TranslationTransformation.h +++ b/src/Magnum/SceneGraph/TranslationTransformation.h @@ -103,8 +103,9 @@ class TranslationTransformation: public AbstractTranslation>& translate(const typename DimensionTraits::VectorType& vector, TransformationType = TransformationType::Global) { _transformation += vector;