Changeset 167 in flair-src for trunk/lib/FlairCore/src/Quaternion.cpp


Ignore:
Timestamp:
Apr 12, 2017, 1:59:38 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

modifs pour template vectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Quaternion.cpp

    r161 r167  
    1717
    1818#include "Quaternion.h"
    19 #include "Vector3D.h"
    2019#include "Euler.h"
    2120#include "RotationMatrix.h"
     
    6362}
    6463
    65 void Quaternion::GetLogarithm(Vector3D &logarithm) {
     64void Quaternion::GetLogarithm(Vector3Df &logarithm) {
    6665  Normalize();
    6766  float v_norm = sqrtf(q1 * q1 + q2 * q2 + q3 * q3);
     
    7978}
    8079
    81 Vector3D Quaternion::GetLogarithm(void) {
    82   Vector3D vector;
     80Vector3Df Quaternion::GetLogarithm(void) {
     81  Vector3Df vector;
    8382  GetLogarithm(vector);
    8483  return vector;
    8584}
    8685
    87 Quaternion Quaternion::GetDerivative(const Vector3D &angularSpeed) const {
     86Quaternion Quaternion::GetDerivative(const Vector3Df &angularSpeed) const {
    8887  const Quaternion Qw(0, angularSpeed.x, angularSpeed.y, angularSpeed.z);
    8988  return 0.5 * (*this) * Qw;
    9089}
    9190
    92 void Quaternion::Derivate(const Vector3D &angularSpeed) {
     91void Quaternion::Derivate(const Vector3Df &angularSpeed) {
    9392  Quaternion Q = GetDerivative(angularSpeed);
    9493  (*this) = Q;
Note: See TracChangeset for help on using the changeset viewer.