4b71c7c894532ddecd8c8ad4b842e56a0e4c3dad
[gph-math] / src / quat.h
1 #ifndef QUATERNION_H_
2 #define QUATERNION_H_
3
4 namespace gph {
5
6 class Quaternion {
7 public:
8         float x, y, z, w;       // w + xi + yj + zk
9
10         Quaternion() : x(0), y(0), z(0), w(1) {}
11         Quaternion(float x_, float y_, float z_, float w_) : x(x_), y(y_), z(z_), w(w_) {}
12         Quaternion(const Vector3 &v, float s) : x(v.x), y(v.y), z(v.z), w(s) {}
13
14         // TODO more
15 };
16
17 }       // namespace gph
18
19 #endif  // QUATERNION_H_