rayzor
diff src/camera.h @ 12:d94a69933a71
lots of stuff, can't remember
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 12 Apr 2014 23:28:24 +0300 |
parents | a826bf0fb169 |
children | 964f8ea5f095 |
line diff
1.1 --- a/src/camera.h Thu Apr 10 08:42:33 2014 +0300 1.2 +++ b/src/camera.h Sat Apr 12 23:28:24 2014 +0300 1.3 @@ -2,27 +2,28 @@ 1.4 #define CAMERA_H_ 1.5 1.6 #include "vmath.h" 1.7 +#include "xfnode.h" 1.8 1.9 -class Camera { 1.10 +class Camera : public SceneNode { 1.11 private: 1.12 - Vector3 pos; 1.13 - Vector3 target; 1.14 + SceneNode target; 1.15 float fov; 1.16 1.17 + void calc_matrix() const; 1.18 + void calc_inv_matrix() const; 1.19 + 1.20 public: 1.21 Camera(); 1.22 1.23 - void set_position(const Vector3 &pos); 1.24 - const Vector3 &get_position() const; 1.25 - 1.26 void set_target(const Vector3 &target); 1.27 const Vector3 &get_target() const; 1.28 1.29 void set_fov(float fov); 1.30 float get_fov() const; 1.31 1.32 - Matrix4x4 get_matrix() const; 1.33 - Matrix4x4 get_inv_matrix() const; 1.34 + void draw() const; 1.35 + 1.36 + bool intersect(const Ray &ray, float *dist = 0) const; 1.37 }; 1.38 1.39 #endif // CAMERA_H_