Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5004 in orxonox.OLD for orxonox/trunk/src/lib/math/vector.cc


Ignore:
Timestamp:
Aug 13, 2005, 10:44:50 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: cooler movement

File:
1 edited

Legend:

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

    r5000 r5004  
    7575   in mind that if you do that, the model's front has to point in +z direction, and left
    7676   and right should be -x or +x respectively or the mesh wont rotate correctly.
     77 *
     78 * @TODO !!!OPTIMIZE THIS!!!
    7779*/
    7880Quaternion::Quaternion (const Vector& dir, const Vector& up)
    7981{
    80   Vector z = dir;
    81   z.normalize();
    82   Vector x = up.cross(z);
    83   x.normalize();
     82  Vector z = dir.getNormalized();
     83  Vector x = up.cross(z).getNormalized();
    8484  Vector y = z.cross(x);
    8585
Note: See TracChangeset for help on using the changeset viewer.