Browse Source

Math: added underlying type typedef for remaining types.

Also updated and unified documentation.
pull/7/head
Vladimír Vondruš 13 years ago
parent
commit
9cb0b77d1e
  1. 7
      src/Math/Dual.h
  2. 3
      src/Math/DualQuaternion.h
  3. 2
      src/Math/Matrix3.h
  4. 2
      src/Math/Matrix4.h
  5. 3
      src/Math/Quaternion.h
  6. 4
      src/Math/RectangularMatrix.h
  7. 4
      src/Math/Vector.h

7
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 T> class Dual {
template<class U> friend class Dual;
public:
typedef T Type; /**< @brief Underlying data type */
/**
* @brief Default constructor
*

3
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 T> class DualQuaternion: public Dual<Quaternion<T>> {
public:
typedef T Type; /**< @brief Underlying data type */
/**
* @brief Rotation dual quaternion
* @param angle Rotation angle (counterclockwise, in radians)

2
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.

2
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.

3
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 T> class Quaternion {
public:
typedef T Type; /**< @brief Underlying data type */
/**
* @brief Dot product
*

4
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<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
template<std::size_t, std::size_t, class> 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 */

4
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<std::size_t size, class T> class Vector {
template<std::size_t, class> 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 */
/**

Loading…
Cancel
Save