Changeset 167 in flair-src for trunk/lib/FlairCore/src/Quaternion.cpp
- Timestamp:
- 04/12/17 13:59:38 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Quaternion.cpp
r161 r167 17 17 18 18 #include "Quaternion.h" 19 #include "Vector3D.h"20 19 #include "Euler.h" 21 20 #include "RotationMatrix.h" … … 63 62 } 64 63 65 void Quaternion::GetLogarithm(Vector3D &logarithm) {64 void Quaternion::GetLogarithm(Vector3Df &logarithm) { 66 65 Normalize(); 67 66 float v_norm = sqrtf(q1 * q1 + q2 * q2 + q3 * q3); … … 79 78 } 80 79 81 Vector3D Quaternion::GetLogarithm(void) {82 Vector3D vector;80 Vector3Df Quaternion::GetLogarithm(void) { 81 Vector3Df vector; 83 82 GetLogarithm(vector); 84 83 return vector; 85 84 } 86 85 87 Quaternion Quaternion::GetDerivative(const Vector3D &angularSpeed) const {86 Quaternion Quaternion::GetDerivative(const Vector3Df &angularSpeed) const { 88 87 const Quaternion Qw(0, angularSpeed.x, angularSpeed.y, angularSpeed.z); 89 88 return 0.5 * (*this) * Qw; 90 89 } 91 90 92 void Quaternion::Derivate(const Vector3D &angularSpeed) {91 void Quaternion::Derivate(const Vector3Df &angularSpeed) { 93 92 Quaternion Q = GetDerivative(angularSpeed); 94 93 (*this) = Q;
Note:
See TracChangeset
for help on using the changeset viewer.