Browse Source

Removed some workarounds for references in documentation.

Fixed in Doxygen master. Yay!
pull/77/head
Vladimír Vondruš 12 years ago
parent
commit
11ed4882e0
  1. 6
      doc/transformations.dox
  2. 12
      src/Magnum/Context.h
  3. 9
      src/Magnum/Math/Complex.h
  4. 4
      src/Magnum/Math/DualComplex.h
  5. 6
      src/Magnum/Math/DualQuaternion.h
  6. 27
      src/Magnum/Math/Matrix3.h
  7. 36
      src/Magnum/Math/Matrix4.h
  8. 8
      src/Magnum/Math/Quaternion.h
  9. 7
      src/Magnum/Math/Vector.h
  10. 3
      src/Magnum/Resource.h
  11. 3
      src/Magnum/Shapes/Collision.h

6
doc/transformations.dox

@ -259,10 +259,8 @@ Complex numbers and quaternions are far better in this regard and they allow
you to extract rotation angle using @ref Complex::angle() or you to extract rotation angle using @ref Complex::angle() or
@ref Quaternion::angle() or rotation axis in 3D using @ref Quaternion::axis(). @ref Quaternion::angle() or rotation axis in 3D using @ref Quaternion::axis().
Their dual versions allow to extract both rotation and translation part using Their dual versions allow to extract both rotation and translation part using
@link DualComplex::rotation() const @endlink, @link DualQuaternion::rotation() const @endlink, @ref DualComplex::rotation() const, @ref DualQuaternion::rotation() const,
@link DualComplex::translation() const @endlink and @ref DualComplex::translation() const and @ref DualQuaternion::translation() const.
@link DualQuaternion::translation() const @endlink.
@todoc Remove workaround when Doxygen can handle const
@code @code
DualComplex a; DualComplex a;
Rad rotationAngle = a.rotation().angle(); Rad rotationAngle = a.rotation().angle();

12
src/Magnum/Context.h

@ -357,8 +357,7 @@ class MAGNUM_EXPORT Context {
* If no version from the list is supported, returns lowest available * If no version from the list is supported, returns lowest available
* OpenGL version (@ref Version::GL210 for desktop OpenGL, * OpenGL version (@ref Version::GL210 for desktop OpenGL,
* @ref Version::GLES200 for OpenGL ES). * @ref Version::GLES200 for OpenGL ES).
* @see @link isExtensionSupported(Version) const @endlink * @see @ref isExtensionSupported(Version) const
* @todoc Remove workaround when Doxygen can handle const
*/ */
Version supportedVersion(std::initializer_list<Version> versions) const; Version supportedVersion(std::initializer_list<Version> versions) const;
@ -375,10 +374,9 @@ class MAGNUM_EXPORT Context {
* } * }
* @endcode * @endcode
* *
* @see @link isExtensionSupported(const Extension&) const @endlink, * @see @ref isExtensionSupported(const Extension&) const,
* @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED(), * @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED(),
* @ref isExtensionDisabled() * @ref isExtensionDisabled()
* @todoc Remove workaround when Doxygen can handle const
*/ */
template<class T> bool isExtensionSupported() const { template<class T> bool isExtensionSupported() const {
return isExtensionSupported<T>(version()); return isExtensionSupported<T>(version());
@ -407,11 +405,10 @@ class MAGNUM_EXPORT Context {
* @brief Whether given extension is supported * @brief Whether given extension is supported
* *
* Can be used e.g. for listing extensions available on current * Can be used e.g. for listing extensions available on current
* hardware, but for general usage prefer @link isExtensionSupported() const @endlink, * hardware, but for general usage prefer @ref isExtensionSupported() const,
* as it does most operations in compile time. * as it does most operations in compile time.
* @see @ref supportedExtensions(), @ref Extension::extensions(), * @see @ref supportedExtensions(), @ref Extension::extensions(),
* @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED() * @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED()
* @todoc Remove workaround when Doxygen can handle const
*/ */
bool isExtensionSupported(const Extension& extension) const { bool isExtensionSupported(const Extension& extension) const {
return isVersionSupported(_extensionRequiredVersion[extension._index]) && extensionStatus[extension._index]; return isVersionSupported(_extensionRequiredVersion[extension._index]) && extensionStatus[extension._index];
@ -443,9 +440,8 @@ class MAGNUM_EXPORT Context {
* @brief Whether given extension is disabled * @brief Whether given extension is disabled
* *
* Can be used e.g. for listing extensions available on current * Can be used e.g. for listing extensions available on current
* hardware, but for general usage prefer @link isExtensionDisabled() const @endlink, * hardware, but for general usage prefer @ref isExtensionDisabled() const,
* as it does most operations in compile time. * as it does most operations in compile time.
* @todoc Remove workaround when Doxygen can handle const
*/ */
bool isExtensionDisabled(const Extension& extension) const { bool isExtensionDisabled(const Extension& extension) const {
return isVersionSupported(extension._requiredVersion) && !isVersionSupported(_extensionRequiredVersion[extension._index]); return isVersionSupported(extension._requiredVersion) && !isVersionSupported(_extensionRequiredVersion[extension._index]);

9
src/Magnum/Math/Complex.h

@ -63,8 +63,7 @@ template<class T> class Complex {
* @f[ * @f[
* c_0 \cdot c_1 = a_0 a_1 + b_0 b_1 * c_0 \cdot c_1 = a_0 a_1 + b_0 b_1
* @f] * @f]
* @see @link Complex::dot() const @endlink * @see @ref Complex::dot() const
* @todoc Remove workaround when Doxygen can handle const
*/ */
static T dot(const Complex<T>& a, const Complex<T>& b) { static T dot(const Complex<T>& a, const Complex<T>& b) {
return a._real*b._real + a._imaginary*b._imaginary; return a._real*b._real + a._imaginary*b._imaginary;
@ -136,8 +135,7 @@ template<class T> class Complex {
* To be used in transformations later. @f[ * To be used in transformations later. @f[
* c = v_x + iv_y * c = v_x + iv_y
* @f] * @f]
* @see @ref Complex::operator Vector2<T>() "operator Vector2<T>()", @ref transformVector() * @see @ref operator Vector2<T>(), @ref transformVector()
* @todoc Remove workaround when Doxygen can handle unscoped conversion operators
*/ */
constexpr explicit Complex(const Vector2<T>& vector): _real(vector.x()), _imaginary(vector.y()) {} constexpr explicit Complex(const Vector2<T>& vector): _real(vector.x()), _imaginary(vector.y()) {}
@ -407,9 +405,8 @@ template<class T> class Complex {
* @f[ * @f[
* v' = c v = c (v_x + iv_y) * v' = c v = c (v_x + iv_y)
* @f] * @f]
* @see @ref Complex(const Vector2<T>&), @ref Complex::operator Vector2<T>() "operator Vector2<T>()", * @see @ref Complex(const Vector2<T>&), @ref operator Vector2<T>(),
* @ref Matrix3::transformVector() * @ref Matrix3::transformVector()
* @todoc Remove workaround when Doxygen can handle unscoped conversion operators
*/ */
Vector2<T> transformVector(const Vector2<T>& vector) const { Vector2<T> transformVector(const Vector2<T>& vector) const {
return Vector2<T>((*this)*Complex<T>(vector)); return Vector2<T>((*this)*Complex<T>(vector));

4
src/Magnum/Math/DualComplex.h

@ -71,11 +71,9 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
* @f[ * @f[
* \hat c = (0 + i1) + \epsilon (v_x + iv_y) * \hat c = (0 + i1) + \epsilon (v_x + iv_y)
* @f] * @f]
* @see @link translation() const @endlink, * @see @ref translation() const, @ref Matrix3::translation(const Vector2<T>&),
* @ref Matrix3::translation(const Vector2<T>&),
* @ref DualQuaternion::translation(), @ref Vector2::xAxis(), * @ref DualQuaternion::translation(), @ref Vector2::xAxis(),
* @ref Vector2::yAxis() * @ref Vector2::yAxis()
* @todoc Remove workaround when Doxygen can handle const
*/ */
static DualComplex<T> translation(const Vector2<T>& vector) { static DualComplex<T> translation(const Vector2<T>& vector) {
return {{}, {vector.x(), vector.y()}}; return {{}, {vector.x(), vector.y()}};

6
src/Magnum/Math/DualQuaternion.h

@ -56,11 +56,10 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
* Expects that the rotation axis is normalized. @f[ * Expects that the rotation axis is normalized. @f[
* \hat q = [\boldsymbol a \cdot sin \frac \theta 2, cos \frac \theta 2] + \epsilon [\boldsymbol 0, 0] * \hat q = [\boldsymbol a \cdot sin \frac \theta 2, cos \frac \theta 2] + \epsilon [\boldsymbol 0, 0]
* @f] * @f]
* @see @link rotation() const @endlink, @ref Quaternion::rotation(), * @see @ref rotation() const, @ref Quaternion::rotation(),
* @ref Matrix4::rotation(), @ref DualComplex::rotation(), * @ref Matrix4::rotation(), @ref DualComplex::rotation(),
* @ref Vector3::xAxis(), @ref Vector3::yAxis(), * @ref Vector3::xAxis(), @ref Vector3::yAxis(),
* @ref Vector3::zAxis(), @ref Vector::isNormalized() * @ref Vector3::zAxis(), @ref Vector::isNormalized()
* @todoc Remove workaround when Doxygen can handle const
*/ */
static DualQuaternion<T> rotation(Rad<T> angle, const Vector3<T>& normalizedAxis) { static DualQuaternion<T> rotation(Rad<T> angle, const Vector3<T>& normalizedAxis) {
return {Quaternion<T>::rotation(angle, normalizedAxis), {{}, T(0)}}; return {Quaternion<T>::rotation(angle, normalizedAxis), {{}, T(0)}};
@ -75,11 +74,10 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
* @f[ * @f[
* \hat q = [\boldsymbol 0, 1] + \epsilon [\frac{\boldsymbol v}{2}, 0] * \hat q = [\boldsymbol 0, 1] + \epsilon [\frac{\boldsymbol v}{2}, 0]
* @f] * @f]
* @see @link translation() const @endlink, * @see @ref translation() const,
* @ref Matrix4::translation(const Vector3<T>&), * @ref Matrix4::translation(const Vector3<T>&),
* @ref DualComplex::translation(), @ref Vector3::xAxis(), * @ref DualComplex::translation(), @ref Vector3::xAxis(),
* @ref Vector3::yAxis(), @ref Vector3::zAxis() * @ref Vector3::yAxis(), @ref Vector3::zAxis()
* @todoc Remove workaround when Doxygen can handle const
*/ */
static DualQuaternion<T> translation(const Vector3<T>& vector) { static DualQuaternion<T> translation(const Vector3<T>& vector) {
return {{}, {vector/T(2), T(0)}}; return {{}, {vector/T(2), T(0)}};

27
src/Magnum/Math/Matrix3.h

@ -49,10 +49,9 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* @brief 2D translation matrix * @brief 2D translation matrix
* @param vector Translation vector * @param vector Translation vector
* *
* @see @link translation() const @endlink, @ref DualComplex::translation(), * @see @ref translation() const, @ref DualComplex::translation(),
* @ref Matrix4::translation(const Vector3<T>&), * @ref Matrix4::translation(const Vector3<T>&),
* @ref Vector2::xAxis(), @ref Vector2::yAxis() * @ref Vector2::xAxis(), @ref Vector2::yAxis()
* @todoc Remove workaround when Doxygen can handle const
*/ */
constexpr static Matrix3<T> translation(const Vector2<T>& vector) { constexpr static Matrix3<T> translation(const Vector2<T>& vector) {
return {{ T(1), T(0), T(0)}, return {{ T(1), T(0), T(0)},
@ -78,10 +77,9 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* @brief 2D rotation matrix * @brief 2D rotation matrix
* @param angle Rotation angle (counterclockwise) * @param angle Rotation angle (counterclockwise)
* *
* @see @link rotation() const @endlink, @ref Complex::rotation(), * @see @ref rotation() const, @ref Complex::rotation(),
* @ref DualComplex::rotation(), * @ref DualComplex::rotation(),
* @ref Matrix4::rotation(Rad, const Vector3<T>&) * @ref Matrix4::rotation(Rad, const Vector3<T>&)
* @todoc Remove workaround when Doxygen can handle const
*/ */
static Matrix3<T> rotation(Rad<T> angle); static Matrix3<T> rotation(Rad<T> angle);
@ -116,8 +114,7 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* @param translation Translation part (first two elements of * @param translation Translation part (first two elements of
* third column) * third column)
* *
* @see @ref rotationScaling(), @link translation() const @endlink * @see @ref rotationScaling(), @ref translation() const
* @todoc Remove workaround when Doxygen can handle const
*/ */
constexpr static Matrix3<T> from(const Matrix2x2<T>& rotationScaling, const Vector2<T>& translation) { constexpr static Matrix3<T> from(const Matrix2x2<T>& rotationScaling, const Vector2<T>& translation) {
return {{rotationScaling[0], T(0)}, return {{rotationScaling[0], T(0)},
@ -165,10 +162,9 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* *
* Upper-left 2x2 part of the matrix. * Upper-left 2x2 part of the matrix.
* @see @ref from(const Matrix2x2<T>&, const Vector2<T>&), * @see @ref from(const Matrix2x2<T>&, const Vector2<T>&),
* @link rotation() const @endlink, @ref rotationNormalized(), * @ref rotation() const, @ref rotationNormalized(),
* @ref uniformScaling(), @ref rotation(Rad<T>), * @ref uniformScaling(), @ref rotation(Rad<T>),
* @ref Matrix4::rotationScaling() * @ref Matrix4::rotationScaling()
* @todoc Remove workaround when Doxygen can handle const
*/ */
constexpr Matrix2x2<T> rotationScaling() const { constexpr Matrix2x2<T> rotationScaling() const {
return {(*this)[0].xy(), return {(*this)[0].xy(),
@ -180,10 +176,9 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* *
* Similar to @ref rotationScaling(), but additionally checks that the * Similar to @ref rotationScaling(), but additionally checks that the
* base vectors are normalized. * base vectors are normalized.
* @see @link rotation() const @endlink, @ref uniformScaling(), * @see @ref rotation() const, @ref uniformScaling(),
* @ref Matrix4::rotationNormalized() * @ref Matrix4::rotationNormalized()
* @todo assert also orthogonality or this is good enough? * @todo assert also orthogonality or this is good enough?
* @todoc Remove workaround when Doxygen can handle const
*/ */
Matrix2x2<T> rotationNormalized() const { Matrix2x2<T> rotationNormalized() const {
CORRADE_ASSERT((*this)[0].xy().isNormalized() && (*this)[1].xy().isNormalized(), CORRADE_ASSERT((*this)[0].xy().isNormalized() && (*this)[1].xy().isNormalized(),
@ -199,8 +194,7 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* scaling. * scaling.
* @see @ref rotationNormalized(), @ref rotationScaling(), * @see @ref rotationNormalized(), @ref rotationScaling(),
* @ref uniformScaling(), @ref rotation(Rad<T>), * @ref uniformScaling(), @ref rotation(Rad<T>),
* @link Matrix4::rotation() const @endlink * @ref Matrix4::rotation() const
* @todoc Remove workaround when Doxygen can handle const
*/ */
Matrix2x2<T> rotation() const { Matrix2x2<T> rotation() const {
CORRADE_ASSERT(TypeTraits<T>::equals((*this)[0].xy().dot(), (*this)[1].xy().dot()), CORRADE_ASSERT(TypeTraits<T>::equals((*this)[0].xy().dot(), (*this)[1].xy().dot()),
@ -216,10 +210,9 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* Expects that the scaling is the same in all axes. Faster alternative * Expects that the scaling is the same in all axes. Faster alternative
* to @ref uniformScaling(), because it doesn't compute the square * to @ref uniformScaling(), because it doesn't compute the square
* root. * root.
* @see @ref rotationScaling(), @link rotation() const @endlink, * @see @ref rotationScaling(), @ref rotation() const,
* @ref rotationNormalized(), @ref scaling(const Vector2<T>&), * @ref rotationNormalized(), @ref scaling(const Vector2<T>&),
* @ref Matrix4::uniformScaling() * @ref Matrix4::uniformScaling()
* @todoc Remove workaround when Doxygen can handle const
*/ */
T uniformScalingSquared() const { T uniformScalingSquared() const {
const T scalingSquared = (*this)[0].xy().dot(); const T scalingSquared = (*this)[0].xy().dot();
@ -234,10 +227,9 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* Length of vectors in upper-left 2x2 part of the matrix. Expects that * Length of vectors in upper-left 2x2 part of the matrix. Expects that
* the scaling is the same in all axes. Use faster alternative * the scaling is the same in all axes. Use faster alternative
* @ref uniformScalingSquared() where possible. * @ref uniformScalingSquared() where possible.
* @see @ref rotationScaling(), @link rotation() const @endlink, * @see @ref rotationScaling(), @ref rotation() const,
* @ref rotationNormalized(), @ref scaling(const Vector2<T>&), * @ref rotationNormalized(), @ref scaling(const Vector2<T>&),
* @ref Matrix4::uniformScaling() * @ref Matrix4::uniformScaling()
* @todoc Remove workaround when Doxygen can handle const
*/ */
T uniformScaling() const { return std::sqrt(uniformScalingSquared()); } T uniformScaling() const { return std::sqrt(uniformScalingSquared()); }
@ -280,9 +272,8 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see * @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see
* @ref ij() * @ref ij()
* @see @ref isRigidTransformation(), @ref invertedOrthogonal(), * @see @ref isRigidTransformation(), @ref invertedOrthogonal(),
* @ref rotationScaling(), @link translation() const @endlink, * @ref rotationScaling(), @ref translation() const,
* @ref Matrix4::invertedRigid() * @ref Matrix4::invertedRigid()
* @todoc Remove workaround when Doxygen can handle const
*/ */
Matrix3<T> invertedRigid() const; Matrix3<T> invertedRigid() const;

36
src/Magnum/Math/Matrix4.h

@ -90,11 +90,10 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* Expects that the rotation axis is normalized. If possible, use * Expects that the rotation axis is normalized. If possible, use
* faster alternatives like @ref rotationX(), @ref rotationY() and * faster alternatives like @ref rotationX(), @ref rotationY() and
* @ref rotationZ(). * @ref rotationZ().
* @see @link rotation() const @endlink, @ref Quaternion::rotation(), * @see @ref rotation() const, @ref Quaternion::rotation(),
* @ref DualQuaternion::rotation(), @ref Matrix3::rotation(Rad), * @ref DualQuaternion::rotation(), @ref Matrix3::rotation(Rad),
* @ref Vector3::xAxis(), @ref Vector3::yAxis(), * @ref Vector3::xAxis(), @ref Vector3::yAxis(),
* @ref Vector3::zAxis(), @ref Vector::isNormalized() * @ref Vector3::zAxis(), @ref Vector::isNormalized()
* @todoc Remove workaround when Doxygen can handle const
*/ */
static Matrix4<T> rotation(Rad<T> angle, const Vector3<T>& normalizedAxis); static Matrix4<T> rotation(Rad<T> angle, const Vector3<T>& normalizedAxis);
@ -104,9 +103,8 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* *
* 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(), @ref rotation() const,
* @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad)
* @todoc Remove workaround when Doxygen can handle const
*/ */
static Matrix4<T> rotationX(Rad<T> angle); static Matrix4<T> rotationX(Rad<T> angle);
@ -116,9 +114,8 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* *
* 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(), @ref rotation() const,
* @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad)
* @todoc Remove workaround when Doxygen can handle const
*/ */
static Matrix4<T> rotationY(Rad<T> angle); static Matrix4<T> rotationY(Rad<T> angle);
@ -128,9 +125,8 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* *
* 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(), @ref rotation() const,
* @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad)
* @todoc Remove workaround when Doxygen can handle const
*/ */
static Matrix4<T> rotationZ(Rad<T> angle); static Matrix4<T> rotationZ(Rad<T> angle);
@ -184,8 +180,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* @param translation Translation part (first three elements of * @param translation Translation part (first three elements of
* fourth column) * fourth column)
* *
* @see @ref rotationScaling(), @link translation() const @endlink * @see @ref rotationScaling(), @ref translation() const
* @todoc Remove workaround when Doxygen can handle const
*/ */
constexpr static Matrix4<T> from(const Matrix3x3<T>& rotationScaling, const Vector3<T>& translation) { constexpr static Matrix4<T> from(const Matrix3x3<T>& rotationScaling, const Vector3<T>& translation) {
return {{rotationScaling[0], T(0)}, return {{rotationScaling[0], T(0)},
@ -234,11 +229,9 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* *
* Upper-left 3x3 part of the matrix. * Upper-left 3x3 part of the matrix.
* @see @ref from(const Matrix3x3<T>&, const Vector3<T>&), * @see @ref from(const Matrix3x3<T>&, const Vector3<T>&),
* @link rotation() const @endlink, @ref rotationNormalized(), * @ref rotation() const, @ref rotationNormalized(),
* @ref uniformScaling(), @ref rotation(Rad, const Vector3<T>&), * @ref uniformScaling(), @ref rotation(Rad, const Vector3<T>&),
* @link Matrix3::rotationScaling() const @endlink * @ref Matrix3::rotationScaling() const
* @todoc Remove workaround when Doxygen can handle const
* @todoc Remove workaround when Doxygen can handle const
*/ */
constexpr Matrix3x3<T> rotationScaling() const { constexpr Matrix3x3<T> rotationScaling() const {
return {(*this)[0].xyz(), return {(*this)[0].xyz(),
@ -251,10 +244,9 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* *
* Similar to @ref rotationScaling(), but additionally checks that the * Similar to @ref rotationScaling(), but additionally checks that the
* base vectors are normalized. * base vectors are normalized.
* @see @link rotation() const @endlink, @ref uniformScaling(), * @see @ref rotation() const, @ref uniformScaling(),
* @ref Matrix3::rotationNormalized() * @ref Matrix3::rotationNormalized()
* @todo assert also orthogonality or this is good enough? * @todo assert also orthogonality or this is good enough?
* @todoc Remove workaround when Doxygen can handle const
*/ */
Matrix3x3<T> rotationNormalized() const { Matrix3x3<T> rotationNormalized() const {
CORRADE_ASSERT((*this)[0].xyz().isNormalized() && (*this)[1].xyz().isNormalized() && (*this)[2].xyz().isNormalized(), CORRADE_ASSERT((*this)[0].xyz().isNormalized() && (*this)[1].xyz().isNormalized() && (*this)[2].xyz().isNormalized(),
@ -271,8 +263,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* scaling. * scaling.
* @see @ref rotationNormalized(), @ref rotationScaling(), * @see @ref rotationNormalized(), @ref rotationScaling(),
* @ref uniformScaling(), @ref rotation(Rad, const Vector3<T>&), * @ref uniformScaling(), @ref rotation(Rad, const Vector3<T>&),
* @link Matrix3::rotation() const @endlink * @ref Matrix3::rotation() const
* @todoc Remove workaround when Doxygen can handle const
*/ */
Matrix3x3<T> rotation() const; Matrix3x3<T> rotation() const;
@ -283,10 +274,9 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* Expects that the scaling is the same in all axes. Faster alternative * Expects that the scaling is the same in all axes. Faster alternative
* to @ref uniformScaling(), because it doesn't compute the square * to @ref uniformScaling(), because it doesn't compute the square
* root. * root.
* @see @ref rotationScaling(), @link rotation() const @endlink, * @see @ref rotationScaling(), @ref rotation() const,
* @ref rotationNormalized(), @ref scaling(const Vector3<T>&), * @ref rotationNormalized(), @ref scaling(const Vector3<T>&),
* @ref Matrix3::uniformScaling() * @ref Matrix3::uniformScaling()
* @todoc Remove workaround when Doxygen can handle const
*/ */
T uniformScalingSquared() const; T uniformScalingSquared() const;
@ -296,10 +286,9 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* Length of vectors in upper-left 3x3 part of the matrix. Expects that * Length of vectors in upper-left 3x3 part of the matrix. Expects that
* the scaling is the same in all axes. Use faster alternative * the scaling is the same in all axes. Use faster alternative
* @ref uniformScalingSquared() where possible. * @ref uniformScalingSquared() where possible.
* @see @ref rotationScaling(), @link rotation() const @endlink, * @see @ref rotationScaling(), @ref rotation() const,
* @ref rotationNormalized(), @ref scaling(const Vector3<T>&), * @ref rotationNormalized(), @ref scaling(const Vector3<T>&),
* @ref Matrix3::uniformScaling() * @ref Matrix3::uniformScaling()
* @todoc Remove workaround when Doxygen can handle const
*/ */
T uniformScaling() const { return std::sqrt(uniformScalingSquared()); } T uniformScaling() const { return std::sqrt(uniformScalingSquared()); }
@ -353,9 +342,8 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see * @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see
* @ref ij() * @ref ij()
* @see @ref isRigidTransformation(), @ref invertedOrthogonal(), * @see @ref isRigidTransformation(), @ref invertedOrthogonal(),
* @ref rotationScaling(), @link translation() const @endlink, * @ref rotationScaling(), @ref translation() const,
* @ref Matrix3::invertedRigid() * @ref Matrix3::invertedRigid()
* @todoc Remove workaround when Doxygen can handle const
*/ */
Matrix4<T> invertedRigid() const; Matrix4<T> invertedRigid() const;

8
src/Magnum/Math/Quaternion.h

@ -57,8 +57,7 @@ template<class T> class Quaternion {
* @f[ * @f[
* p \cdot q = \boldsymbol p_V \cdot \boldsymbol q_V + p_S q_S * p \cdot q = \boldsymbol p_V \cdot \boldsymbol q_V + p_S q_S
* @f] * @f]
* @see @link dot() const @endlink * @see @ref dot() const
* @todoc Remove workaround when Doxygen can handle const
*/ */
static T dot(const Quaternion<T>& a, const Quaternion<T>& b) { static T dot(const Quaternion<T>& a, const Quaternion<T>& b) {
/** @todo Use four-component SIMD implementation when available */ /** @todo Use four-component SIMD implementation when available */
@ -337,12 +336,11 @@ template<class T> class Quaternion {
/** /**
* @brief Quaternion length * @brief Quaternion length
* *
* See also @link dot() const @endlink which is faster for comparing * See also @ref dot() const which is faster for comparing length with
* length with other values. @f[ * other values. @f[
* |q| = \sqrt{q \cdot q} * |q| = \sqrt{q \cdot q}
* @f] * @f]
* @see @ref isNormalized() * @see @ref isNormalized()
* @todoc Remove workaround when Doxygen can handle const
*/ */
T length() const { return std::sqrt(dot()); } T length() const { return std::sqrt(dot()); }

7
src/Magnum/Math/Vector.h

@ -87,9 +87,7 @@ template<std::size_t size, class T> class Vector {
* antiparallel. @f[ * antiparallel. @f[
* \boldsymbol a \cdot \boldsymbol b = \sum_{i=0}^{n-1} \boldsymbol a_i \boldsymbol b_i * \boldsymbol a \cdot \boldsymbol b = \sum_{i=0}^{n-1} \boldsymbol a_i \boldsymbol b_i
* @f] * @f]
* @see @link dot() const @endlink, @ref operator-(), * @see @ref dot() const, @ref operator-(), @ref Vector2::perpendicular()
* @ref Vector2::perpendicular()
* @todoc Remove workaround when Doxygen can handle const
*/ */
static T dot(const Vector<size, T>& a, const Vector<size, T>& b) { static T dot(const Vector<size, T>& a, const Vector<size, T>& b) {
return (a*b).sum(); return (a*b).sum();
@ -469,8 +467,7 @@ template<std::size_t size, class T> class Vector {
* \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 =
* (\boldsymbol a \cdot \boldsymbol b) \boldsymbol b * (\boldsymbol a \cdot \boldsymbol b) \boldsymbol b
* @f] * @f]
* @see @link dot() const @endlink * @see @ref dot() const
* @todoc Remove workaround when Doxygen can handle const
*/ */
Vector<size, T> projectedOntoNormalized(const Vector<size, T>& line) const; Vector<size, T> projectedOntoNormalized(const Vector<size, T>& line) const;

3
src/Magnum/Resource.h

@ -155,8 +155,7 @@ class Resource {
/** /**
* @brief Resource state * @brief Resource state
* *
* @see @ref Resource::operator bool() "operator bool()", @ref ResourceManager::state() * @see @ref operator bool(), @ref ResourceManager::state()
* @todoc Remove workaround when Doxygen can handle unscoped conversion operators
*/ */
ResourceState state() { ResourceState state() {
acquire(); acquire();

3
src/Magnum/Shapes/Collision.h

@ -97,8 +97,7 @@ template<UnsignedInt dimensions> class Collision {
/** /**
* @brief Separation distance * @brief Separation distance
* *
* @see @ref separationNormal(), @ref Collision::operator bool() "operator bool()" * @see @ref separationNormal(), @ref operator bool()
* @todoc Remove workaround when Doxygen can handle unscoped conversion operators
*/ */
Float separationDistance() const { Float separationDistance() const {
return _separationDistance; return _separationDistance;

Loading…
Cancel
Save