graphene
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/gmath/quat.h Fri Jul 31 04:59:28 2015 +0300 1.3 @@ -0,0 +1,19 @@ 1.4 +#ifndef QUATERNION_H_ 1.5 +#define QUATERNION_H_ 1.6 + 1.7 +namespace gph { 1.8 + 1.9 +class Quaternion { 1.10 +public: 1.11 + float x, y, z, w; // w + xi + yj + zk 1.12 + 1.13 + Quaternion() : x(0), y(0), z(0), w(1) {} 1.14 + Quaternion(float x_, float y_, float z_, float w_) : x(x_), y(y_), z(z_), w(w_) {} 1.15 + Quaternion(const Vector3 &v, float s) : x(v.x), y(v.y), z(v.z), w(s) {} 1.16 + 1.17 + // TODO more 1.18 +}; 1.19 + 1.20 +} // namespace gph 1.21 + 1.22 +#endif // QUATERNION_H_