graphene
view src/gmath/quat.h @ 6:9fbbc96e6fbe
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 31 Jul 2015 04:59:28 +0300 |
parents | |
children |
line source
1 #ifndef QUATERNION_H_
2 #define QUATERNION_H_
4 namespace gph {
6 class Quaternion {
7 public:
8 float x, y, z, w; // w + xi + yj + zk
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) {}
14 // TODO more
15 };
17 } // namespace gph
19 #endif // QUATERNION_H_