prime/include/Kyoto/Math/CNUQuaternion.hpp

32 lines
713 B
C++
Raw Normal View History

#ifndef _CNUQUATERNION
#define _CNUQUATERNION
#include "types.h"
2022-10-05 16:28:37 +00:00
class CMatrix3f;
2022-10-17 23:53:49 +00:00
class CVector3f;
class CQuaternion;
class CNUQuaternion {
public:
CNUQuaternion(float w, float x, float y, float z) : w(w), x(x), y(y), z(z) {}
2022-10-17 23:53:49 +00:00
CNUQuaternion(float, const CVector3f&);
2022-10-05 16:28:37 +00:00
static CNUQuaternion BuildFromMatrix3f(const CMatrix3f& matrix);
2022-10-05 22:50:12 +00:00
static CNUQuaternion BuildFromQuaternion(const CQuaternion& quat);
2022-11-04 12:22:09 +00:00
CNUQuaternion& operator+=(const CNUQuaternion&);
2022-10-17 23:53:49 +00:00
CNUQuaternion operator*(const CNUQuaternion&) const;
private:
float w;
float x;
float y;
float z;
};
2022-10-17 23:53:49 +00:00
CNUQuaternion operator*(float f, const CNUQuaternion&);
CNUQuaternion operator*(const CNUQuaternion&, float f);
#endif // _CNUQUATERNION