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