From 9cb0b77d1ea7db4c37ea51d813ff37016767bfc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 18 Feb 2013 18:06:09 +0100 Subject: [PATCH] Math: added underlying type typedef for remaining types. Also updated and unified documentation. --- src/Math/Dual.h | 7 ++++++- src/Math/DualQuaternion.h | 3 +++ src/Math/Matrix3.h | 2 +- src/Math/Matrix4.h | 2 +- src/Math/Quaternion.h | 3 +++ src/Math/RectangularMatrix.h | 4 ++-- src/Math/Vector.h | 4 ++-- 7 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/Math/Dual.h b/src/Math/Dual.h index ba75f66a1..b5f70f4b7 100644 --- a/src/Math/Dual.h +++ b/src/Math/Dual.h @@ -26,11 +26,16 @@ namespace Magnum { namespace Math { -/** @brief %Dual number */ +/** +@brief %Dual number +@tparam T Underlying data type +*/ template class Dual { template friend class Dual; public: + typedef T Type; /**< @brief Underlying data type */ + /** * @brief Default constructor * diff --git a/src/Math/DualQuaternion.h b/src/Math/DualQuaternion.h index 5ede6da05..88f55582e 100644 --- a/src/Math/DualQuaternion.h +++ b/src/Math/DualQuaternion.h @@ -27,11 +27,14 @@ namespace Magnum { namespace Math { /** @brief %Dual quaternion +@tparam T Underlying data type @see Dual, Quaternion */ template class DualQuaternion: public Dual> { public: + typedef T Type; /**< @brief Underlying data type */ + /** * @brief Rotation dual quaternion * @param angle Rotation angle (counterclockwise, in radians) diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index e76bbf8f2..5a181213d 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -26,7 +26,7 @@ namespace Magnum { namespace Math { /** @brief 3x3 matrix for transformations in 2D -@tparam T Data type +@tparam T Underlying data type Provides functions for transformations in 2D. See Matrix4 for 3D transformations. See also @ref matrix-vector for brief introduction. diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index 6fa43559b..55234ba82 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -26,7 +26,7 @@ namespace Magnum { namespace Math { /** @brief 4x4 matrix for transformations in 3D -@tparam T Data type +@tparam T Underlying data type Provides functions for transformations in 3D. See Matrix3 for 2D transformations. See also @ref matrix-vector for brief introduction. diff --git a/src/Math/Quaternion.h b/src/Math/Quaternion.h index 2b83b8d70..4e7cc1edf 100644 --- a/src/Math/Quaternion.h +++ b/src/Math/Quaternion.h @@ -32,11 +32,14 @@ namespace Magnum { namespace Math { /** @brief %Quaternion +@tparam T Underlying data type @see DualQuaternion, Magnum::Quaternion */ template class Quaternion { public: + typedef T Type; /**< @brief Underlying data type */ + /** * @brief Dot product * diff --git a/src/Math/RectangularMatrix.h b/src/Math/RectangularMatrix.h index f9df7752b..29189eab9 100644 --- a/src/Math/RectangularMatrix.h +++ b/src/Math/RectangularMatrix.h @@ -27,7 +27,7 @@ namespace Magnum { namespace Math { @brief Rectangular matrix @tparam cols Column count @tparam rows Row count -@tparam T Data type +@tparam T Underlying data type See @ref matrix-vector for brief introduction. See also Matrix (square) and Vector. @@ -42,7 +42,7 @@ template class RectangularMatrix { template friend class RectangularMatrix; public: - typedef T Type; /**< @brief Data type */ + typedef T Type; /**< @brief Underlying data type */ const static std::size_t Cols = cols; /**< @brief %Matrix column count */ const static std::size_t Rows = rows; /**< @brief %Matrix row count */ diff --git a/src/Math/Vector.h b/src/Math/Vector.h index f1c603a0d..843061517 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -35,7 +35,7 @@ namespace Magnum { namespace Math { /** @brief %Vector @tparam size %Vector size -@tparam T Data type +@tparam T Underlying data type See @ref matrix-vector for brief introduction. @configurationvalueref{Magnum::Math::Vector} @@ -46,7 +46,7 @@ template class Vector { template friend class Vector; public: - typedef T Type; /**< @brief Data type */ + typedef T Type; /**< @brief Underlying data type */ const static std::size_t Size = size; /**< @brief %Vector size */ /**