Browse Source

Math: removed autolink-preventing % noise, removed unneeded HTML tags.

pull/77/head
Vladimír Vondruš 12 years ago
parent
commit
7dd224ed21
  1. 4
      src/Magnum/Math/Algorithms/GramSchmidt.h
  2. 8
      src/Magnum/Math/BoolVector.h
  3. 4
      src/Magnum/Math/Complex.h
  4. 4
      src/Magnum/Math/Dual.h
  5. 6
      src/Magnum/Math/DualComplex.h
  6. 6
      src/Magnum/Math/DualQuaternion.h
  7. 16
      src/Magnum/Math/Geometry/Distance.h
  8. 18
      src/Magnum/Math/Geometry/Intersection.h
  9. 18
      src/Magnum/Math/Matrix.h
  10. 4
      src/Magnum/Math/Matrix3.h
  11. 10
      src/Magnum/Math/Matrix4.h
  12. 10
      src/Magnum/Math/Quaternion.h
  13. 28
      src/Magnum/Math/Range.h
  14. 34
      src/Magnum/Math/RectangularMatrix.h
  15. 14
      src/Magnum/Math/Vector.h
  16. 4
      src/Magnum/Math/Vector2.h
  17. 6
      src/Magnum/Math/Vector3.h

4
src/Magnum/Math/Algorithms/GramSchmidt.h

@ -35,7 +35,7 @@ namespace Magnum { namespace Math { namespace Algorithms {
/** /**
@brief In-place Gram-Schmidt matrix orthogonalization @brief In-place Gram-Schmidt matrix orthogonalization
@param[in,out] matrix %Matrix to perform orthogonalization on @param[in,out] matrix Matrix to perform orthogonalization on
*/ */
template<std::size_t cols, std::size_t rows, class T> void gramSchmidtOrthogonalizeInPlace(RectangularMatrix<cols, rows, T>& matrix) { template<std::size_t cols, std::size_t rows, class T> void gramSchmidtOrthogonalizeInPlace(RectangularMatrix<cols, rows, T>& matrix) {
static_assert(cols <= rows, "Unsupported matrix aspect ratio"); static_assert(cols <= rows, "Unsupported matrix aspect ratio");
@ -58,7 +58,7 @@ template<std::size_t cols, std::size_t rows, class T> RectangularMatrix<cols, ro
/** /**
@brief In-place Gram-Schmidt matrix orthonormalization @brief In-place Gram-Schmidt matrix orthonormalization
@param[in,out] matrix %Matrix to perform orthonormalization on @param[in,out] matrix Matrix to perform orthonormalization on
*/ */
template<std::size_t cols, std::size_t rows, class T> void gramSchmidtOrthonormalizeInPlace(RectangularMatrix<cols, rows, T>& matrix) { template<std::size_t cols, std::size_t rows, class T> void gramSchmidtOrthonormalizeInPlace(RectangularMatrix<cols, rows, T>& matrix) {
static_assert(cols <= rows, "Unsupported matrix aspect ratio"); static_assert(cols <= rows, "Unsupported matrix aspect ratio");

8
src/Magnum/Math/BoolVector.h

@ -54,7 +54,7 @@ namespace Implementation {
} }
/** /**
@brief %Vector storing boolean values @brief Vector storing boolean values
@tparam size Bit count @tparam size Bit count
Result of component-wise comparison from Vector. The boolean values are stored Result of component-wise comparison from Vector. The boolean values are stored
@ -66,8 +66,8 @@ template<std::size_t size> class BoolVector {
static_assert(size != 0, "BoolVector cannot have zero elements"); static_assert(size != 0, "BoolVector cannot have zero elements");
public: public:
static const std::size_t Size = size; /**< @brief %Vector size */ static const std::size_t Size = size; /**< @brief Vector size */
static const std::size_t DataSize = (size-1)/8+1; /**< @brief %Vector storage size */ static const std::size_t DataSize = (size-1)/8+1; /**< @brief Vector storage size */
/** @brief Construct zero-filled boolean vector */ /** @brief Construct zero-filled boolean vector */
constexpr BoolVector(): _data() {} constexpr BoolVector(): _data() {}
@ -98,7 +98,7 @@ template<std::size_t size> class BoolVector {
/** /**
* @brief Raw data * @brief Raw data
* @return %Array of DataSize length * @return Array of DataSize length
* *
* @see @ref operator[](), @ref set() * @see @ref operator[](), @ref set()
*/ */

4
src/Magnum/Math/Complex.h

@ -47,7 +47,7 @@ namespace Implementation {
} }
/** /**
@brief %Complex number @brief Complex number
@tparam T Data type @tparam T Data type
Represents 2D rotation. See @ref transformations for brief introduction. Represents 2D rotation. See @ref transformations for brief introduction.
@ -336,7 +336,7 @@ template<class T> class Complex {
} }
/** /**
* @brief %Complex number length * @brief Complex number length
* *
* See also @ref dot() const which is faster for comparing length with * See also @ref dot() const which is faster for comparing length with
* other values. @f[ * other values. @f[

4
src/Magnum/Math/Dual.h

@ -37,7 +37,7 @@
namespace Magnum { namespace Math { namespace Magnum { namespace Math {
/** /**
@brief %Dual number @brief Dual number
@tparam T Underlying data type @tparam T Underlying data type
*/ */
template<class T> class Dual { template<class T> class Dual {
@ -76,7 +76,7 @@ template<class T> class Dual {
/** @brief Real part */ /** @brief Real part */
constexpr T real() const { return _real; } constexpr T real() const { return _real; }
/** @brief %Dual part */ /** @brief Dual part */
constexpr T dual() const { return _dual; } constexpr T dual() const { return _dual; }
/** /**

6
src/Magnum/Math/DualComplex.h

@ -36,7 +36,7 @@
namespace Magnum { namespace Math { namespace Magnum { namespace Math {
/** /**
@brief %Dual complex number @brief Dual complex number
@tparam T Underlying data type @tparam T Underlying data type
Represents 2D rotation and translation. See @ref transformations for brief Represents 2D rotation and translation. See @ref transformations for brief
@ -227,7 +227,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
} }
/** /**
* @brief %Complex number length squared * @brief Complex number length squared
* *
* Should be used instead of length() for comparing complex number * Should be used instead of length() for comparing complex number
* length with other values, because it doesn't compute the square root. @f[ * length with other values, because it doesn't compute the square root. @f[
@ -240,7 +240,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
} }
/** /**
* @brief %Dual quaternion length * @brief Dual quaternion length
* *
* See lengthSquared() which is faster for comparing length with other * See lengthSquared() which is faster for comparing length with other
* values. @f[ * values. @f[

6
src/Magnum/Math/DualQuaternion.h

@ -36,7 +36,7 @@
namespace Magnum { namespace Math { namespace Magnum { namespace Math {
/** /**
@brief %Dual quaternion @brief Dual quaternion
@tparam T Underlying data type @tparam T Underlying data type
Represents 3D rotation and translation. See @ref transformations for brief Represents 3D rotation and translation. See @ref transformations for brief
@ -226,7 +226,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
} }
/** /**
* @brief %Dual quaternion length squared * @brief Dual quaternion length squared
* *
* Should be used instead of @ref length() for comparing dual * Should be used instead of @ref length() for comparing dual
* quaternion length with other values, because it doesn't compute the * quaternion length with other values, because it doesn't compute the
@ -239,7 +239,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
} }
/** /**
* @brief %Dual quaternion length * @brief Dual quaternion length
* *
* See @ref lengthSquared() which is faster for comparing length with other * See @ref lengthSquared() which is faster for comparing length with other
* values. @f[ * values. @f[

16
src/Magnum/Math/Geometry/Distance.h

@ -40,7 +40,7 @@ class Distance {
Distance() = delete; Distance() = delete;
/** /**
* @brief %Distance of line and point in 2D * @brief Distance of line and point in 2D
* @param a First point of the line * @param a First point of the line
* @param b Second point of the line * @param b Second point of the line
* @param point Point * @param point Point
@ -58,7 +58,7 @@ class Distance {
} }
/** /**
* @brief %Distance of line and point in 2D, squared * @brief Distance of line and point in 2D, squared
* @param a First point of the line * @param a First point of the line
* @param b Second point of the line * @param b Second point of the line
* @param point Point * @param point Point
@ -74,7 +74,7 @@ class Distance {
} }
/** /**
* @brief %Distance of line and point in 3D * @brief Distance of line and point in 3D
* @param a First point of the line * @param a First point of the line
* @param b Second point of the line * @param b Second point of the line
* @param point Point * @param point Point
@ -92,7 +92,7 @@ class Distance {
} }
/** /**
* @brief %Distance of line and point in 3D, squared * @brief Distance of line and point in 3D, squared
* *
* More efficient than @ref linePoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&) * More efficient than @ref linePoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* for comparing distance with other values, because it doesn't * for comparing distance with other values, because it doesn't
@ -103,7 +103,7 @@ class Distance {
} }
/** /**
* @brief %Dístance of point from line segment in 2D * @brief Dístance of point from line segment in 2D
* @param a Starting point of the line * @param a Starting point of the line
* @param b Ending point of the line * @param b Ending point of the line
* @param point Point * @param point Point
@ -131,7 +131,7 @@ class Distance {
template<class T> static T lineSegmentPoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point); template<class T> static T lineSegmentPoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point);
/** /**
* @brief %Distance of point from line segment in 2D, squared * @brief Distance of point from line segment in 2D, squared
* *
* More efficient than @ref lineSegmentPoint() for comparing distance * More efficient than @ref lineSegmentPoint() for comparing distance
* with other values, because it doesn't compute the square root. * with other values, because it doesn't compute the square root.
@ -139,7 +139,7 @@ class Distance {
template<class T> static T lineSegmentPointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point); template<class T> static T lineSegmentPointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point);
/** /**
* @brief %Dístance of point from line segment in 3D * @brief Dístance of point from line segment in 3D
* @param a Starting point of the line * @param a Starting point of the line
* @param b Ending point of the line * @param b Ending point of the line
* @param point Point * @param point Point
@ -154,7 +154,7 @@ class Distance {
} }
/** /**
* @brief %Distance of point from line segment in 3D, squared * @brief Distance of point from line segment in 3D, squared
* *
* More efficient than * More efficient than
* @ref lineSegmentPoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&) * @ref lineSegmentPoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)

18
src/Magnum/Math/Geometry/Intersection.h

@ -39,14 +39,14 @@ class Intersection {
Intersection() = delete; Intersection() = delete;
/** /**
* @brief %Intersection of two line segments in 2D * @brief Intersection of two line segments in 2D
* @param p Starting point of first line segment * @param p Starting point of first line segment
* @param r Direction of first line segment * @param r Direction of first line segment
* @param q Starting point of second line segment * @param q Starting point of second line segment
* @param s Direction of second line segment * @param s Direction of second line segment
* @return %Intersection point positions `t`, `u` on both lines, NaN if * @return Intersection point positions `t`, `u` on both lines, NaN if
* the lines are collinear or infinity if they are parallel. * the lines are collinear or infinity if they are parallel.
* %Intersection point can be then computed with `p + t*r` or * Intersection point can be then computed with `p + t*r` or
* `q + u*s`. If `t` is in range @f$ [ 0 ; 1 ] @f$, the * `q + u*s`. If `t` is in range @f$ [ 0 ; 1 ] @f$, the
* intersection is inside the line segment defined by `p` and * intersection is inside the line segment defined by `p` and
* `p + r`, if `u` is in range @f$ [ 0 ; 1 ] @f$, the intersection * `p + r`, if `u` is in range @f$ [ 0 ; 1 ] @f$, the intersection
@ -78,14 +78,14 @@ class Intersection {
} }
/** /**
* @brief %Intersection of line segment and line in 2D * @brief Intersection of line segment and line in 2D
* @param p Starting point of first line segment * @param p Starting point of first line segment
* @param r Direction of first line segment * @param r Direction of first line segment
* @param q Starting point of second line * @param q Starting point of second line
* @param s Direction of second line * @param s Direction of second line
* @return %Intersection point position `t` on first line, NaN if the * @return Intersection point position `t` on first line, NaN if the
* lines are collinear or infinity if they are parallel. * lines are collinear or infinity if they are parallel.
* %Intersection point can be then with `p + t*r`. If returned * Intersection point can be then with `p + t*r`. If returned
* value is in range @f$ [ 0 ; 1 ] @f$, the intersection is inside * value is in range @f$ [ 0 ; 1 ] @f$, the intersection is inside
* the line segment defined by `p` and `p + r`. * the line segment defined by `p` and `p + r`.
* *
@ -96,14 +96,14 @@ class Intersection {
} }
/** /**
* @brief %Intersection of a plane and line * @brief Intersection of a plane and line
* @param planePosition Plane position * @param planePosition Plane position
* @param planeNormal Plane normal * @param planeNormal Plane normal
* @param p Starting point of the line * @param p Starting point of the line
* @param r Direction of the line * @param r Direction of the line
* @return %Intersection point position `t` on the line, NaN if the * @return Intersection point position `t` on the line, NaN if the
* line lies on the plane or infinity if the intersection doesn't * line lies on the plane or infinity if the intersection doesn't
* exist. %Intersection point can be then computed from with * exist. Intersection point can be then computed from with
* `p + t*r`. If returned value is in range @f$ [ 0 ; 1 ] @f$, the * `p + t*r`. If returned value is in range @f$ [ 0 ; 1 ] @f$, the
* intersection is inside the line segment defined by `p` and `r`. * intersection is inside the line segment defined by `p` and `r`.
* *

18
src/Magnum/Math/Matrix.h

@ -39,7 +39,7 @@ namespace Implementation {
/** /**
@brief Square matrix @brief Square matrix
@tparam size %Matrix size @tparam size Matrix size
@tparam T Data type @tparam T Data type
See @ref matrix-vector for brief introduction. See @ref matrix-vector for brief introduction.
@ -49,7 +49,7 @@ See @ref matrix-vector for brief introduction.
*/ */
template<std::size_t size, class T> class Matrix: public RectangularMatrix<size, size, T> { template<std::size_t size, class T> class Matrix: public RectangularMatrix<size, size, T> {
public: public:
const static std::size_t Size = size; /**< @brief %Matrix size */ const static std::size_t Size = size; /**< @brief Matrix size */
/** @brief Pass to constructor to create zero-filled matrix */ /** @brief Pass to constructor to create zero-filled matrix */
enum ZeroType { Zero }; enum ZeroType { Zero };
@ -57,7 +57,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
/** /**
* @brief Zero-filled matrix constructor * @brief Zero-filled matrix constructor
* *
* Use this constructor by calling `%Matrix m(Matrix::Zero);`. * Use this constructor by calling `Matrix m(Matrix::Zero);`.
*/ */
constexpr explicit Matrix(ZeroType) {} constexpr explicit Matrix(ZeroType) {}
@ -68,13 +68,13 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
* @brief Default constructor * @brief Default constructor
* *
* You can also explicitly call this constructor with * You can also explicitly call this constructor with
* `%Matrix m(Matrix::Identity);`. Optional parameter @p value allows * `Matrix m(Matrix::Identity);`. Optional parameter @p value allows
* you to specify value on diagonal. * you to specify value on diagonal.
*/ */
constexpr /*implicit*/ Matrix(IdentityType = Identity, T value = T(1)): RectangularMatrix<size, size, T>(typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value)) {} constexpr /*implicit*/ Matrix(IdentityType = Identity, T value = T(1)): RectangularMatrix<size, size, T>(typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value)) {}
/** /**
* @brief %Matrix from column vectors * @brief Matrix from column vectors
* @param first First column vector * @param first First column vector
* @param next Next column vectors * @param next Next column vectors
*/ */
@ -121,7 +121,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
*/ */
T trace() const { return RectangularMatrix<size, size, T>::diagonal().sum(); } T trace() const { return RectangularMatrix<size, size, T>::diagonal().sum(); }
/** @brief %Matrix without given column and row */ /** @brief Matrix without given column and row */
Matrix<size-1, T> ij(std::size_t skipCol, std::size_t skipRow) const; Matrix<size-1, T> ij(std::size_t skipCol, std::size_t skipRow) const;
/** /**
@ -184,7 +184,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
/** /**
@brief 2x2 matrix @brief 2x2 matrix
Convenience alternative to <tt>%Matrix<2, T></tt>. See @ref Matrix for more Convenience alternative to `Matrix<2, T>`. See @ref Matrix for more
information. information.
@see @ref Magnum::Matrix2x2, @ref Magnum::Matrix2x2d @see @ref Magnum::Matrix2x2, @ref Magnum::Matrix2x2d
*/ */
@ -193,7 +193,7 @@ template<class T> using Matrix2x2 = Matrix<2, T>;
/** /**
@brief 3x3 matrix @brief 3x3 matrix
Convenience alternative to <tt>%Matrix<3, T></tt>. See @ref Matrix for more Convenience alternative to `Matrix<3, T>`. See @ref Matrix for more
information. Note that this is different from @ref Matrix3, which contains information. Note that this is different from @ref Matrix3, which contains
additional functions for transformations in 2D. additional functions for transformations in 2D.
@see @ref Magnum::Matrix3x3, @ref Magnum::Matrix3x3d @see @ref Magnum::Matrix3x3, @ref Magnum::Matrix3x3d
@ -203,7 +203,7 @@ template<class T> using Matrix3x3 = Matrix<3, T>;
/** /**
@brief 4x4 matrix @brief 4x4 matrix
Convenience alternative to <tt>%Matrix<4, T></tt>. See @ref Matrix for more Convenience alternative to `Matrix<4, T>`. See @ref Matrix for more
information. Note that this is different from @ref Matrix4, which contains information. Note that this is different from @ref Matrix4, which contains
additional functions for transformations in 3D. additional functions for transformations in 3D.
@see @ref Magnum::Matrix4x4, @ref Magnum::Matrix4x4d @see @ref Magnum::Matrix4x4, @ref Magnum::Matrix4x4d

4
src/Magnum/Math/Matrix3.h

@ -132,12 +132,12 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* @brief Default constructor * @brief Default constructor
* *
* Creates identity matrix. You can also explicitly call this * Creates identity matrix. You can also explicitly call this
* constructor with `%Matrix3 m(Matrix3::Identity);`. Optional * constructor with `Matrix3 m(Matrix3::Identity);`. Optional
* parameter @p value allows you to specify value on diagonal. * parameter @p value allows you to specify value on diagonal.
*/ */
constexpr /*implicit*/ Matrix3(typename Matrix3x3<T>::IdentityType = (Matrix3x3<T>::Identity), T value = T(1)): Matrix3x3<T>(Matrix3x3<T>::Identity, value) {} constexpr /*implicit*/ Matrix3(typename Matrix3x3<T>::IdentityType = (Matrix3x3<T>::Identity), T value = T(1)): Matrix3x3<T>(Matrix3x3<T>::Identity, value) {}
/** @brief %Matrix from column vectors */ /** @brief Matrix from column vectors */
constexpr /*implicit*/ Matrix3(const Vector3<T>& first, const Vector3<T>& second, const Vector3<T>& third): Matrix3x3<T>(first, second, third) {} constexpr /*implicit*/ Matrix3(const Vector3<T>& first, const Vector3<T>& second, const Vector3<T>& third): Matrix3x3<T>(first, second, third) {}
/** @copydoc Matrix::Matrix(const RectangularMatrix<size, size, U>&) */ /** @copydoc Matrix::Matrix(const RectangularMatrix<size, size, U>&) */

10
src/Magnum/Math/Matrix4.h

@ -102,7 +102,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* @brief 3D rotation around X axis * @brief 3D rotation around X axis
* @param angle Rotation angle (counterclockwise) * @param angle Rotation angle (counterclockwise)
* *
* Faster than calling `%Matrix4::rotation(angle, %Vector3::xAxis())`. * Faster than calling `Matrix4::rotation(angle, Vector3::xAxis())`.
* @see @ref rotation(Rad, const Vector3<T>&), @ref rotationY(), * @see @ref rotation(Rad, const Vector3<T>&), @ref rotationY(),
* @ref rotationZ(), @link rotation() const @endlink, * @ref rotationZ(), @link rotation() const @endlink,
* @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad)
@ -114,7 +114,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* @brief 3D rotation around Y axis * @brief 3D rotation around Y axis
* @param angle Rotation angle (counterclockwise) * @param angle Rotation angle (counterclockwise)
* *
* Faster than calling `%Matrix4::rotation(angle, %Vector3::yAxis())`. * Faster than calling `Matrix4::rotation(angle, Vector3::yAxis())`.
* @see @ref rotation(Rad, const Vector3<T>&), @ref rotationX(), * @see @ref rotation(Rad, const Vector3<T>&), @ref rotationX(),
* @ref rotationZ(), @link rotation() const @endlink, * @ref rotationZ(), @link rotation() const @endlink,
* @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad)
@ -126,7 +126,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* @brief 3D rotation matrix around Z axis * @brief 3D rotation matrix around Z axis
* @param angle Rotation angle (counterclockwise) * @param angle Rotation angle (counterclockwise)
* *
* Faster than calling `%Matrix4::rotation(angle, %Vector3::zAxis())`. * Faster than calling `Matrix4::rotation(angle, Vector3::zAxis())`.
* @see @ref rotation(Rad, const Vector3<T>&), @ref rotationX(), * @see @ref rotation(Rad, const Vector3<T>&), @ref rotationX(),
* @ref rotationY(), @link rotation() const @endlink, * @ref rotationY(), @link rotation() const @endlink,
* @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad)
@ -201,12 +201,12 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* @brief Default constructor * @brief Default constructor
* *
* Creates identity matrix. You can also explicitly call this * Creates identity matrix. You can also explicitly call this
* constructor with `%Matrix4 m(Matrix4::Identity);`. Optional * constructor with `Matrix4 m(Matrix4::Identity);`. Optional
* parameter @p value allows you to specify value on diagonal. * parameter @p value allows you to specify value on diagonal.
*/ */
constexpr /*implicit*/ Matrix4(typename Matrix4x4<T>::IdentityType = (Matrix4x4<T>::Identity), T value = T(1)): Matrix4x4<T>(Matrix4x4<T>::Identity, value) {} constexpr /*implicit*/ Matrix4(typename Matrix4x4<T>::IdentityType = (Matrix4x4<T>::Identity), T value = T(1)): Matrix4x4<T>(Matrix4x4<T>::Identity, value) {}
/** @brief %Matrix from column vectors */ /** @brief Matrix from column vectors */
constexpr /*implicit*/ Matrix4(const Vector4<T>& first, const Vector4<T>& second, const Vector4<T>& third, const Vector4<T>& fourth): Matrix4x4<T>(first, second, third, fourth) {} constexpr /*implicit*/ Matrix4(const Vector4<T>& first, const Vector4<T>& second, const Vector4<T>& third, const Vector4<T>& fourth): Matrix4x4<T>(first, second, third, fourth) {}
/** @copydoc Matrix::Matrix(const RectangularMatrix<size, size, U>&) */ /** @copydoc Matrix::Matrix(const RectangularMatrix<size, size, U>&) */

10
src/Magnum/Math/Quaternion.h

@ -40,7 +40,7 @@
namespace Magnum { namespace Math { namespace Magnum { namespace Math {
/** /**
@brief %Quaternion @brief Quaternion
@tparam T Underlying data type @tparam T Underlying data type
Represents 3D rotation. See @ref transformations for brief introduction. Represents 3D rotation. See @ref transformations for brief introduction.
@ -169,7 +169,7 @@ template<class T> class Quaternion {
/** /**
* @brief Whether the quaternion is normalized * @brief Whether the quaternion is normalized
* *
* %Quaternion is normalized if it has unit length: @f[ * Quaternion is normalized if it has unit length: @f[
* |q \cdot q - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon * |q \cdot q - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon
* @f] * @f]
* @see @ref dot(), @ref normalized() * @see @ref dot(), @ref normalized()
@ -178,10 +178,10 @@ template<class T> class Quaternion {
return Implementation::isNormalizedSquared(dot()); return Implementation::isNormalizedSquared(dot());
} }
/** @brief %Vector part */ /** @brief Vector part */
constexpr Vector3<T> vector() const { return _vector; } constexpr Vector3<T> vector() const { return _vector; }
/** @brief %Scalar part */ /** @brief Scalar part */
constexpr T scalar() const { return _scalar; } constexpr T scalar() const { return _scalar; }
/** /**
@ -335,7 +335,7 @@ template<class T> class Quaternion {
T dot() const { return dot(*this, *this); } T dot() const { return dot(*this, *this); }
/** /**
* @brief %Quaternion length * @brief Quaternion length
* *
* See also @link dot() const @endlink which is faster for comparing * See also @link dot() const @endlink which is faster for comparing
* length with other values. @f[ * length with other values. @f[

28
src/Magnum/Math/Range.h

@ -62,7 +62,7 @@ template<UnsignedInt dimensions, class T> class Range {
/** /**
* Create range from minimal coordinates and size * Create range from minimal coordinates and size
* @param min Minimal coordinates * @param min Minimal coordinates
* @param size %Range size * @param size Range size
*/ */
static Range<dimensions, T> fromSize(const VectorType& min, const VectorType& size) { static Range<dimensions, T> fromSize(const VectorType& min, const VectorType& size) {
return {min, min+size}; return {min, min+size};
@ -129,7 +129,7 @@ template<UnsignedInt dimensions, class T> class Range {
constexpr const VectorType max() const { return _max; } /**< @overload */ constexpr const VectorType max() const { return _max; } /**< @overload */
/** /**
* @brief %Range size * @brief Range size
* *
* @see @ref min(), @ref max(), @ref Range2D::sizeX(), * @see @ref min(), @ref max(), @ref Range2D::sizeX(),
* @ref Range2D::sizeY(), @ref Range3D::sizeX(), * @ref Range2D::sizeY(), @ref Range3D::sizeX(),
@ -138,7 +138,7 @@ template<UnsignedInt dimensions, class T> class Range {
VectorType size() const { return _max - _min; } VectorType size() const { return _max - _min; }
/** /**
* @brief %Range center * @brief Range center
* *
* @see @ref Range2D::centerX(), @ref Range2D::centerY(), * @see @ref Range2D::centerX(), @ref Range2D::centerY(),
* @ref Range3D::centerX(), @ref Range3D::centerY(), * @ref Range3D::centerX(), @ref Range3D::centerY(),
@ -195,7 +195,7 @@ template<UnsignedInt dimensions, class T> class Range {
/** /**
@brief One-dimensional range @brief One-dimensional range
Convenience alternative to <tt>%Range<1, T></tt>. See @ref Range for more Convenience alternative to `Range<1, T>`. See @ref Range for more
information. information.
*/ */
template<class T> using Range1D = Range<1, T>; template<class T> using Range1D = Range<1, T>;
@ -263,7 +263,7 @@ template<class T> class Range2D: public Range<2, T> {
constexpr T top() const { return Range<2, T>::max().y(); } /**< @overload */ constexpr T top() const { return Range<2, T>::max().y(); } /**< @overload */
/** /**
* @brief %Range width * @brief Range width
* *
* @see @ref size() * @see @ref size()
*/ */
@ -272,7 +272,7 @@ template<class T> class Range2D: public Range<2, T> {
} }
/** /**
* @brief %Range height * @brief Range height
* *
* @see @ref size() * @see @ref size()
*/ */
@ -281,7 +281,7 @@ template<class T> class Range2D: public Range<2, T> {
} }
/** /**
* @brief %Range center on X axis * @brief Range center on X axis
* *
* @see @ref center() * @see @ref center()
*/ */
@ -290,7 +290,7 @@ template<class T> class Range2D: public Range<2, T> {
} }
/** /**
* @brief %Range center on Y axis * @brief Range center on Y axis
* *
* @see @ref center() * @see @ref center()
*/ */
@ -392,7 +392,7 @@ template<class T> class Range3D: public Range<3, T> {
constexpr T front() const { return Range<3, T>::max().z(); } /**< @overload */ constexpr T front() const { return Range<3, T>::max().z(); } /**< @overload */
/** /**
* @brief %Range width * @brief Range width
* *
* @see @ref size() * @see @ref size()
*/ */
@ -401,7 +401,7 @@ template<class T> class Range3D: public Range<3, T> {
} }
/** /**
* @brief %Range height * @brief Range height
* *
* @see @ref size() * @see @ref size()
*/ */
@ -410,7 +410,7 @@ template<class T> class Range3D: public Range<3, T> {
} }
/** /**
* @brief %Range depth * @brief Range depth
* *
* @see @ref size() * @see @ref size()
*/ */
@ -420,7 +420,7 @@ template<class T> class Range3D: public Range<3, T> {
/** /**
* *
* @brief %Range center on X axis * @brief Range center on X axis
* *
* @see @ref center() * @see @ref center()
*/ */
@ -429,7 +429,7 @@ template<class T> class Range3D: public Range<3, T> {
} }
/** /**
* @brief %Range center on Y axis * @brief Range center on Y axis
* *
* @see @ref center() * @see @ref center()
*/ */
@ -438,7 +438,7 @@ template<class T> class Range3D: public Range<3, T> {
} }
/** /**
* @brief %Range center on Z axis * @brief Range center on Z axis
* *
* @see @ref center() * @see @ref center()
*/ */

34
src/Magnum/Math/RectangularMatrix.h

@ -59,8 +59,8 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
public: public:
typedef T Type; /**< @brief Underlying 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 Cols = cols; /**< @brief Matrix column count */
const static std::size_t Rows = rows; /**< @brief %Matrix row count */ const static std::size_t Rows = rows; /**< @brief Matrix row count */
/** /**
* @brief Size of matrix diagonal * @brief Size of matrix diagonal
@ -70,7 +70,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
const static std::size_t DiagonalSize = (cols < rows ? cols : rows); const static std::size_t DiagonalSize = (cols < rows ? cols : rows);
/** /**
* @brief %Matrix from array * @brief Matrix from array
* @return Reference to the data as if it was matrix, thus doesn't * @return Reference to the data as if it was matrix, thus doesn't
* perform any copying. * perform any copying.
* *
@ -157,7 +157,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
constexpr const T* data() const { return _data[0].data(); } /**< @overload */ constexpr const T* data() const { return _data[0].data(); } /**< @overload */
/** /**
* @brief %Matrix column * @brief Matrix column
* *
* Particular elements can be accessed using @ref Vector::operator[](), * Particular elements can be accessed using @ref Vector::operator[](),
* e.g.: * e.g.:
@ -172,7 +172,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
constexpr const Vector<rows, T>& operator[](std::size_t col) const { return _data[col]; } /**< @overload */ constexpr const Vector<rows, T>& operator[](std::size_t col) const { return _data[col]; } /**< @overload */
/** /**
* @brief %Matrix row * @brief Matrix row
* *
* Consider using @ref transposed() when accessing rows frequently, as * Consider using @ref transposed() when accessing rows frequently, as
* this is slower than accessing columns due to the way the matrix is * this is slower than accessing columns due to the way the matrix is
@ -367,54 +367,54 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
}; };
/** /**
@brief %Matrix with 2 columns and 3 rows @brief Matrix with 2 columns and 3 rows
Convenience alternative to <tt>%RectangularMatrix<2, 3, T></tt>. See Convenience alternative to `RectangularMatrix<2, 3, T>`. See
@ref RectangularMatrix for more information. @ref RectangularMatrix for more information.
@see @ref Magnum::Matrix2x3, @ref Magnum::Matrix2x3d @see @ref Magnum::Matrix2x3, @ref Magnum::Matrix2x3d
*/ */
template<class T> using Matrix2x3 = RectangularMatrix<2, 3, T>; template<class T> using Matrix2x3 = RectangularMatrix<2, 3, T>;
/** /**
@brief %Matrix with 3 columns and 2 rows @brief Matrix with 3 columns and 2 rows
Convenience alternative to <tt>%RectangularMatrix<3, 2, T></tt>. See Convenience alternative to `RectangularMatrix<3, 2, T>`. See
@ref RectangularMatrix for more information. @ref RectangularMatrix for more information.
@see @ref Magnum::Matrix3x2, @ref Magnum::Matrix3x2d @see @ref Magnum::Matrix3x2, @ref Magnum::Matrix3x2d
*/ */
template<class T> using Matrix3x2 = RectangularMatrix<3, 2, T>; template<class T> using Matrix3x2 = RectangularMatrix<3, 2, T>;
/** /**
@brief %Matrix with 2 columns and 4 rows @brief Matrix with 2 columns and 4 rows
Convenience alternative to <tt>%RectangularMatrix<2, 4, T></tt>. See Convenience alternative to `RectangularMatrix<2, 4, T>`. See
@ref RectangularMatrix for more information. @ref RectangularMatrix for more information.
@see @ref Magnum::Matrix2x4, @ref Magnum::Matrix2x4d @see @ref Magnum::Matrix2x4, @ref Magnum::Matrix2x4d
*/ */
template<class T> using Matrix2x4 = RectangularMatrix<2, 4, T>; template<class T> using Matrix2x4 = RectangularMatrix<2, 4, T>;
/** /**
@brief %Matrix with 4 columns and 2 rows @brief Matrix with 4 columns and 2 rows
Convenience alternative to <tt>%RectangularMatrix<4, 2, T></tt>. See Convenience alternative to `RectangularMatrix<4, 2, T>`. See
@ref RectangularMatrix for more information. @ref RectangularMatrix for more information.
@see @ref Magnum::Matrix4x2, @ref Magnum::Matrix4x2d @see @ref Magnum::Matrix4x2, @ref Magnum::Matrix4x2d
*/ */
template<class T> using Matrix4x2 = RectangularMatrix<4, 2, T>; template<class T> using Matrix4x2 = RectangularMatrix<4, 2, T>;
/** /**
@brief %Matrix with 3 columns and 4 rows @brief Matrix with 3 columns and 4 rows
Convenience alternative to <tt>%RectangularMatrix<3, 4, T></tt>. See Convenience alternative to `RectangularMatrix<3, 4, T>`. See
@ref RectangularMatrix for more information. @ref RectangularMatrix for more information.
@see @ref Magnum::Matrix3x4, @ref Magnum::Matrix3x4d @see @ref Magnum::Matrix3x4, @ref Magnum::Matrix3x4d
*/ */
template<class T> using Matrix3x4 = RectangularMatrix<3, 4, T>; template<class T> using Matrix3x4 = RectangularMatrix<3, 4, T>;
/** /**
@brief %Matrix with 4 columns and 3 rows @brief Matrix with 4 columns and 3 rows
Convenience alternative to <tt>%RectangularMatrix<4, 3, T></tt>. See Convenience alternative to `RectangularMatrix<4, 3, T>`. See
@ref RectangularMatrix for more information. @ref RectangularMatrix for more information.
@see @ref Magnum::Matrix4x3, @ref Magnum::Matrix4x3d @see @ref Magnum::Matrix4x3, @ref Magnum::Matrix4x3d
*/ */

14
src/Magnum/Math/Vector.h

@ -47,8 +47,8 @@ namespace Implementation {
} }
/** /**
@brief %Vector @brief Vector
@tparam size %Vector size @tparam size Vector size
@tparam T Underlying data type @tparam T Underlying data type
See @ref matrix-vector for brief introduction. See @ref matrix-vector for brief introduction.
@ -61,10 +61,10 @@ template<std::size_t size, class T> class Vector {
public: public:
typedef T Type; /**< @brief Underlying data type */ typedef T Type; /**< @brief Underlying data type */
const static std::size_t Size = size; /**< @brief %Vector size */ const static std::size_t Size = size; /**< @brief Vector size */
/** /**
* @brief %Vector from array * @brief Vector from array
* @return Reference to the data as if it was Vector, thus doesn't * @return Reference to the data as if it was Vector, thus doesn't
* perform any copying. * perform any copying.
* *
@ -404,7 +404,7 @@ template<std::size_t size, class T> class Vector {
T dot() const { return dot(*this, *this); } T dot() const { return dot(*this, *this); }
/** /**
* @brief %Vector length * @brief Vector length
* *
* See also @ref dot() const which is faster for comparing length with * See also @ref dot() const which is faster for comparing length with
* other values. @f[ * other values. @f[
@ -450,7 +450,7 @@ template<std::size_t size, class T> class Vector {
} }
/** /**
* @brief %Vector projected onto line * @brief Vector projected onto line
* *
* Returns vector projected onto @p line. @f[ * Returns vector projected onto @p line. @f[
* \boldsymbol a_1 = \frac{\boldsymbol a \cdot \boldsymbol b}{\boldsymbol b \cdot \boldsymbol b} \boldsymbol b * \boldsymbol a_1 = \frac{\boldsymbol a \cdot \boldsymbol b}{\boldsymbol b \cdot \boldsymbol b} \boldsymbol b
@ -462,7 +462,7 @@ template<std::size_t size, class T> class Vector {
} }
/** /**
* @brief %Vector projected onto normalized line * @brief Vector projected onto normalized line
* *
* Slightly faster alternative to @ref projected(), expects @p line to * Slightly faster alternative to @ref projected(), expects @p line to
* be normalized. @f[ * be normalized. @f[

4
src/Magnum/Math/Vector2.h

@ -45,7 +45,7 @@ See @ref matrix-vector for brief introduction.
template<class T> class Vector2: public Vector<2, T> { template<class T> class Vector2: public Vector<2, T> {
public: public:
/** /**
* @brief %Vector in direction of X axis (right) * @brief Vector in direction of X axis (right)
* *
* Usable for translation in given axis, for example: * Usable for translation in given axis, for example:
* @code * @code
@ -56,7 +56,7 @@ template<class T> class Vector2: public Vector<2, T> {
constexpr static Vector2<T> xAxis(T length = T(1)) { return {length, T(0)}; } constexpr static Vector2<T> xAxis(T length = T(1)) { return {length, T(0)}; }
/** /**
* @brief %Vector in direction of Y axis (up) * @brief Vector in direction of Y axis (up)
* *
* See @ref xAxis() for more information. * See @ref xAxis() for more information.
* @see @ref yScale(), @ref Matrix3::up() * @see @ref yScale(), @ref Matrix3::up()

6
src/Magnum/Math/Vector3.h

@ -46,7 +46,7 @@ See @ref matrix-vector for brief introduction.
template<class T> class Vector3: public Vector<3, T> { template<class T> class Vector3: public Vector<3, T> {
public: public:
/** /**
* @brief %Vector in direction of X axis (right) * @brief Vector in direction of X axis (right)
* *
* Usable for translation or rotation along given axis, for example: * Usable for translation or rotation along given axis, for example:
* @code * @code
@ -59,7 +59,7 @@ template<class T> class Vector3: public Vector<3, T> {
constexpr static Vector3<T> xAxis(T length = T(1)) { return {length, T(0), T(0)}; } constexpr static Vector3<T> xAxis(T length = T(1)) { return {length, T(0), T(0)}; }
/** /**
* @brief %Vector in direction of Y axis (up) * @brief Vector in direction of Y axis (up)
* *
* See @ref xAxis() for more information. * See @ref xAxis() for more information.
* @see @ref yScale(), @ref Color3::green(), @ref Matrix4::up() * @see @ref yScale(), @ref Color3::green(), @ref Matrix4::up()
@ -67,7 +67,7 @@ template<class T> class Vector3: public Vector<3, T> {
constexpr static Vector3<T> yAxis(T length = T(1)) { return {T(0), length, T(0)}; } constexpr static Vector3<T> yAxis(T length = T(1)) { return {T(0), length, T(0)}; }
/** /**
* @brief %Vector in direction of Z axis (backward) * @brief Vector in direction of Z axis (backward)
* *
* See @ref xAxis() for more information. * See @ref xAxis() for more information.
* @see @ref zScale(), @ref Color3::blue(), @ref Matrix4::backward() * @see @ref zScale(), @ref Color3::blue(), @ref Matrix4::backward()

Loading…
Cancel
Save