oculus1
diff src/camera.h @ 9:b66b54a68dfd
tracking almost done
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 19 Sep 2013 06:36:48 +0300 |
parents | 681046a82ed2 |
children | b2abb08c8f94 |
line diff
1.1 --- a/src/camera.h Wed Sep 18 22:15:04 2013 +0300 1.2 +++ b/src/camera.h Thu Sep 19 06:36:48 2013 +0300 1.3 @@ -33,7 +33,7 @@ 1.4 }; 1.5 1.6 class OrbitCamera : public Camera { 1.7 -private: 1.8 +protected: 1.9 float theta, phi, rad; 1.10 1.11 void calc_matrix(Matrix4x4 *mat) const; 1.12 @@ -47,6 +47,19 @@ 1.13 void input_zoom(float factor); 1.14 }; 1.15 1.16 +class FpsCamera : public OrbitCamera { 1.17 +protected: 1.18 + Vector3 pos; 1.19 + 1.20 + void calc_matrix(Matrix4x4 *mat) const; 1.21 + void calc_inv_matrix(Matrix4x4 *mat) const; 1.22 + 1.23 +public: 1.24 + void input_move(float x, float y, float z); 1.25 + 1.26 + const Vector3 &get_position() const; 1.27 +}; 1.28 + 1.29 class FlyCamera : public Camera { 1.30 private: 1.31 Vector3 pos;