rayzor
annotate src/camera.h @ 20:6b11a3f8706e
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 15 Apr 2014 01:36:03 +0300 |
parents | 79609d482762 |
children |
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@13 | 5 #include "snode.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 |
nuclear@1 | 14 public: |
nuclear@1 | 15 Camera(); |
nuclear@1 | 16 |
nuclear@1 | 17 void set_target(const Vector3 &target); |
nuclear@13 | 18 Vector3 get_target() const; |
nuclear@1 | 19 |
nuclear@1 | 20 void set_fov(float fov); |
nuclear@1 | 21 float get_fov() const; |
nuclear@1 | 22 |
nuclear@18 | 23 void draw(bool emph = false) const; |
nuclear@12 | 24 |
nuclear@17 | 25 bool intersect(const Ray &ray, RayHit *hit = 0) const; |
nuclear@15 | 26 |
nuclear@15 | 27 Ray get_primary_ray(int x, int y) const; |
nuclear@1 | 28 }; |
nuclear@1 | 29 |
nuclear@1 | 30 #endif // CAMERA_H_ |