rayzor
annotate src/camera.h @ 17:79609d482762
the renderer renders, also fixed an unnoticed matrix conversion problem between scenegraph and min3d
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 14 Apr 2014 07:34:45 +0300 |
parents | be616b58df99 |
children | 859ccadca671 |
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@12 | 23 void draw() 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_ |