1234567891011121314151617181920212223242526 |
- #ifndef QUATERNION_H
- #define QUATERNION_H
- #include "client/math/Vector.h"
- #include "client/math/Matrix.h"
- class Quaternion {
- public:
- Quaternion(float x, float y, float z, float w);
- Quaternion(Vector unitAxis, float angle);
-
- Quaternion lerp(float f, const Quaternion& other) const;
- Quaternion slerp(float f, const Quaternion& other) const;
- void normalize();
- Matrix toMatrix() const;
- private:
- Quaternion interpolate(float a, float b, const Quaternion& other) const;
-
- float x;
- float y;
- float z;
- float w;
- };
- #endif
|