Changeset 5004 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Aug 13, 2005, 10:44:50 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.cc
r5000 r5004 75 75 in mind that if you do that, the model's front has to point in +z direction, and left 76 76 and right should be -x or +x respectively or the mesh wont rotate correctly. 77 * 78 * @TODO !!!OPTIMIZE THIS!!! 77 79 */ 78 80 Quaternion::Quaternion (const Vector& dir, const Vector& up) 79 81 { 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(); 84 84 Vector y = z.cross(x); 85 85
Note: See TracChangeset
for help on using the changeset viewer.