Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3823 in orxonox.OLD for orxonox/trunk/src/lib/math


Ignore:
Timestamp:
Apr 14, 2005, 1:09:55 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: finished work on vector class: inlied all functions that where called often

Location:
orxonox/trunk/src/lib/math
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.cc

    r3822 r3823  
    332332  q = *this * q * conjugate();
    333333  return q.v;
    334   }
     334}
     335
    335336
    336337/**
     
    365366   \return the conjugate Quaternion
    366367*/
     368/*
    367369Quaternion Quaternion::conjugate() const
    368370{
     
    371373  return r;
    372374}
     375*/
    373376
    374377/**
  • orxonox/trunk/src/lib/math/vector.h

    r3822 r3823  
    8080  inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); }
    8181  inline Quaternion operator- (const Quaternion& q) const { return Quaternion(q.v - v, q.w - w); }
    82   Quaternion conjugate () const;
     82  Quaternion conjugate () const {  Quaternion r(*this);
     83  r.v = Vector() - r.v;
     84  return r;}
    8385  Quaternion inverse () const;
    84   Vector apply (Vector& f) const ;//{ Quaternion q; q.v = v; q.w = 0; q = *this * q * conjugate(); return q.v; }
     86  Vector apply (Vector& f) const;
    8587  float norm () const;
    8688  void matrix (float m[4][4]) const;
Note: See TracChangeset for help on using the changeset viewer.