rayzor
annotate 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 |
rev | line source |
---|---|
nuclear@1 | 1 #ifndef CAMERA_H_ |
nuclear@1 | 2 #define CAMERA_H_ |
nuclear@1 | 3 |
nuclear@1 | 4 #include "vmath.h" |
nuclear@12 | 5 #include "xfnode.h" |
nuclear@1 | 6 |
nuclear@12 | 7 class Camera : public SceneNode { |
nuclear@1 | 8 private: |
nuclear@12 | 9 SceneNode target; |
nuclear@1 | 10 float fov; |
nuclear@1 | 11 |
nuclear@12 | 12 void calc_matrix() const; |
nuclear@12 | 13 void calc_inv_matrix() const; |
nuclear@12 | 14 |
nuclear@1 | 15 public: |
nuclear@1 | 16 Camera(); |
nuclear@1 | 17 |
nuclear@1 | 18 void set_target(const Vector3 &target); |
nuclear@1 | 19 const Vector3 &get_target() const; |
nuclear@1 | 20 |
nuclear@1 | 21 void set_fov(float fov); |
nuclear@1 | 22 float get_fov() const; |
nuclear@1 | 23 |
nuclear@12 | 24 void draw() const; |
nuclear@12 | 25 |
nuclear@12 | 26 bool intersect(const Ray &ray, float *dist = 0) const; |
nuclear@1 | 27 }; |
nuclear@1 | 28 |
nuclear@1 | 29 #endif // CAMERA_H_ |