diff --git a/doc/coding-style.dox b/doc/coding-style.dox index 81c6a7a10..1e0e96b66 100644 --- a/doc/coding-style.dox +++ b/doc/coding-style.dox @@ -21,6 +21,10 @@ needed. You are encouraged to read it first: Headers shouldn't have `using` declarations inside them (unless there is good excuse, see Magnum.h). +Headers have `*.h` extension, @ref compilation-speedup-hpp "template implementation headers" +have `*.hpp` extension (hinting that they are something between `*.h` and +`*.cpp` files). + @subsection cpp-format Code format @subsubsection cpp-naming Naming diff --git a/doc/scenegraph.dox b/doc/scenegraph.dox index 3ea52abf2..4c478397b 100644 --- a/doc/scenegraph.dox +++ b/doc/scenegraph.dox @@ -47,7 +47,8 @@ needs, see @ref AbstractTransformation-subclassing and its children are Object instances. The hierarchy has some transformation type, identical for all objects (because for example having part of the tree in 2D and part in 3D just wouldn't make sense). Common usage is to typedef -%Scene and %Object with desired transformation type: +%Scene and %Object with desired transformation type to save unnecessary typing +later: @code typedef SceneGraph::Scene> Scene3D; typedef SceneGraph::Object> Object3D; @@ -193,6 +194,8 @@ by calling Object::setClean(). Camera, for example, calls it automatically before it starts rendering, as it needs its own inverse transformation to properly draw the objects. +See @ref AbstractFeature-subclassing-caching for more information. + @section scenegraph-construction-order Construction and destruction order There aren't any limitations and usage trade-offs of what you can and can't do diff --git a/src/Context.cpp b/src/Context.cpp index 0f3f839e0..27821ce6f 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -33,6 +33,7 @@ using namespace std; namespace Magnum { +#ifndef DOXYGEN_GENERATING_OUTPUT Debug operator<<(Debug debug, Version value) { switch(value) { #define _c(value, string) case Version::value: return debug << string; @@ -56,6 +57,7 @@ Debug operator<<(Debug debug, Version value) { return debug << "Invalid"; } +#endif const std::vector& Extension::extensions(Version version) { #define _extension(prefix, vendor, extension) \ diff --git a/src/Math/Constants.h b/src/Math/Constants.h index 0cad0759e..0b27ae947 100644 --- a/src/Math/Constants.h +++ b/src/Math/Constants.h @@ -21,7 +21,11 @@ namespace Magnum { namespace Math { -/** @brief Numeric constants */ +/** +@brief Numeric constants + +@see Magnum::Constants +*/ template struct Constants { /* See MathTypeTraits for answer why these are functions and not constants. */ #ifdef DOXYGEN_GENERATING_OUTPUT @@ -60,6 +64,8 @@ Usable for entering e.g. rotation: @code Matrix4::rotation(deg(30.0f), Vector3::yAxis()); @endcode + +This function (and also rad()) is available also in Magnum namespace itself. @see Constants, rad() */ template inline constexpr T deg(T value) { return value*Constants::pi()/180; } diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index ae8f3a6a7..1d96ebbbb 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -30,6 +30,7 @@ namespace Magnum { namespace Math { Provides functions for transformations in 2D. See Matrix4 for 3D transformations. See also @ref matrix-vector for brief introduction. +@see Magnum::Matrix3 @configurationvalueref{Magnum::Math::Matrix3} */ template class Matrix3: public Matrix<3, T> { diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index 296e4dfb4..7d511cfcb 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -30,6 +30,7 @@ namespace Magnum { namespace Math { Provides functions for transformations in 3D. See Matrix3 for 2D transformations. See also @ref matrix-vector for brief introduction. +@see Magnum::Matrix4 @configurationvalueref{Magnum::Math::Matrix4} @todo Shearing @todo Reflection diff --git a/src/Math/Point2D.h b/src/Math/Point2D.h index 76a775b89..f26552d77 100644 --- a/src/Math/Point2D.h +++ b/src/Math/Point2D.h @@ -29,7 +29,7 @@ namespace Magnum { namespace Math { Same as Vector3, except that constructors have default value for Z component set to one. See also @ref matrix-vector for brief introduction. -@see Point3D +@see Magnum::Point2D, Point3D @configurationvalueref{Magnum::Math::Point2D} */ template class Point2D: public Vector3 { diff --git a/src/Math/Point3D.h b/src/Math/Point3D.h index 432ea5c0d..339822217 100644 --- a/src/Math/Point3D.h +++ b/src/Math/Point3D.h @@ -29,7 +29,7 @@ namespace Magnum { namespace Math { Same as Vector4, except that constructors have default value for W component set to one. See also @ref matrix-vector for brief introduction. -@see Point2D +@see Magnum::Point3D, Point2D @configurationvalueref{Magnum::Math::Point3D} */ template class Point3D: public Vector4 { diff --git a/src/Math/Vector2.h b/src/Math/Vector2.h index b9503b14d..61534e2a8 100644 --- a/src/Math/Vector2.h +++ b/src/Math/Vector2.h @@ -28,6 +28,7 @@ namespace Magnum { namespace Math { @tparam T Data type See @ref matrix-vector for brief introduction. +@see Magnum::Vector2 @configurationvalueref{Magnum::Math::Vector2} */ template class Vector2: public Vector<2, T> { diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index f320272e9..84ff16050 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -29,6 +29,7 @@ namespace Magnum { namespace Math { See @ref matrix-vector for brief introduction. See also Point2D for homogeneous two-dimensional coordinates. +@see Magnum::Vector3 @configurationvalueref{Magnum::Math::Vector3} */ template class Vector3: public Vector<3, T> { diff --git a/src/Math/Vector4.h b/src/Math/Vector4.h index be28aa83f..94a680fac 100644 --- a/src/Math/Vector4.h +++ b/src/Math/Vector4.h @@ -29,6 +29,7 @@ namespace Magnum { namespace Math { See @ref matrix-vector for brief introduction. See also Point3D for homogeneous three-dimensional coordinates. +@see Magnum::Vector4 @configurationvalueref{Magnum::Math::Vector4} */ template class Vector4: public Vector<4, T> { diff --git a/src/SceneGraph/Object.h b/src/SceneGraph/Object.h index 898dce20c..0755cafe9 100644 --- a/src/SceneGraph/Object.h +++ b/src/SceneGraph/Object.h @@ -49,6 +49,13 @@ Base of scene graph. Contains specific transformation implementation, takes care of parent/children relationship and contains features. See @ref scenegraph for introduction. +Common usage is to typedef Object with desired transformation type to save +unnecessary typing later, along with Scene and possibly other types, e.g.: +@code +typedef SceneGraph::Scene> Scene3D; +typedef SceneGraph::Object> Object3D; +@endcode + Uses Corrade::Containers::LinkedList for parent/children relationship. Traversing through the list is done like in the following code. It is also possible to go in reverse order using lastChild() and previousSibling().