Browse Source

Math: doc++

pull/7/head
Vladimír Vondruš 13 years ago
parent
commit
389e9194e0
  1. 2
      src/Math/DualQuaternion.h
  2. 8
      src/Math/Quaternion.h
  3. 4
      src/Math/Vector.h

2
src/Math/DualQuaternion.h

@ -218,7 +218,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
* Expects that the dual quaternion is normalized. @f[ * Expects that the dual quaternion is normalized. @f[
* v' = qv \overline{\hat q^*} = q ([\boldsymbol 0, 1] + \epsilon [\boldsymbol v, 0]) \overline{\hat q^*} * v' = qv \overline{\hat q^*} = q ([\boldsymbol 0, 1] + \epsilon [\boldsymbol v, 0]) \overline{\hat q^*}
* @f] * @f]
* @see Matrix4::transformPoint(), Quaternion::rotateVectorNormalized() * @see DualQuaternion(const Vector3&), Matrix4::transformPoint(), Quaternion::rotateVectorNormalized()
*/ */
inline Vector3<T> transformPointNormalized(const Vector3<T>& vector) const { inline Vector3<T> transformPointNormalized(const Vector3<T>& vector) const {
CORRADE_ASSERT(MathTypeTraits<Dual<T>>::equals(norm(), Dual<T>(1)), CORRADE_ASSERT(MathTypeTraits<Dual<T>>::equals(norm(), Dual<T>(1)),

8
src/Math/Quaternion.h

@ -344,10 +344,10 @@ template<class T> class Quaternion {
/** /**
* @brief %Quaternion length * @brief %Quaternion length
* *
* @f[ * See also dot() const which is faster for comparing length with other
* values. @f[
* |q| = \sqrt{q \cdot q} * |q| = \sqrt{q \cdot q}
* @f] * @f]
* @see dot() const
*/ */
inline T length() const { inline T length() const {
return std::sqrt(dot()); return std::sqrt(dot());
@ -403,7 +403,7 @@ template<class T> class Quaternion {
* quaternions. @f[ * quaternions. @f[
* v' = qvq^{-1} = q [\boldsymbol v, 0] q^{-1} * v' = qvq^{-1} = q [\boldsymbol v, 0] q^{-1}
* @f] * @f]
* @see Matrix4::transformVector(), DualQuaternion::transformPointNormalized() * @see Quaternion(const Vector3&), Matrix4::transformVector(), DualQuaternion::transformPointNormalized()
*/ */
inline Vector3<T> rotateVector(const Vector3<T>& vector) const { inline Vector3<T> rotateVector(const Vector3<T>& vector) const {
return ((*this)*Quaternion<T>(vector)*inverted()).vector(); return ((*this)*Quaternion<T>(vector)*inverted()).vector();
@ -416,7 +416,7 @@ template<class T> class Quaternion {
* normalized. @f[ * normalized. @f[
* v' = qvq^{-1} = qvq^* = q [\boldsymbol v, 0] q^* * v' = qvq^{-1} = qvq^* = q [\boldsymbol v, 0] q^*
* @f] * @f]
* @see Matrix4::transformVector(), DualQuaternion::transformPointNormalized() * @see Quaternion(const Vector3&), Matrix4::transformVector(), DualQuaternion::transformPointNormalized()
*/ */
inline Vector3<T> rotateVectorNormalized(const Vector3<T>& vector) const { inline Vector3<T> rotateVectorNormalized(const Vector3<T>& vector) const {
CORRADE_ASSERT(MathTypeTraits<T>::equals(dot(), T(1)), CORRADE_ASSERT(MathTypeTraits<T>::equals(dot(), T(1)),

4
src/Math/Vector.h

@ -395,10 +395,10 @@ template<std::size_t size, class T> class Vector {
/** /**
* @brief %Vector length * @brief %Vector length
* *
* @f[ * See also dot() const which is faster for comparing length with other
* values. @f[
* |\boldsymbol a| = \sqrt{\boldsymbol a \cdot \boldsymbol a} * |\boldsymbol a| = \sqrt{\boldsymbol a \cdot \boldsymbol a}
* @f] * @f]
* @see dot() const
*/ */
inline T length() const { inline T length() const {
return std::sqrt(dot()); return std::sqrt(dot());

Loading…
Cancel
Save