rayzor

view 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
line source
1 #ifndef CAMERA_H_
2 #define CAMERA_H_
4 #include "vmath.h"
5 #include "snode.h"
7 class Camera : public SceneNode {
8 private:
9 SceneNode target;
10 float fov;
12 void calc_matrix() const;
14 public:
15 Camera();
17 void set_target(const Vector3 &target);
18 Vector3 get_target() const;
20 void set_fov(float fov);
21 float get_fov() const;
23 void draw(bool emph = false) const;
25 bool intersect(const Ray &ray, RayHit *hit = 0) const;
27 Ray get_primary_ray(int x, int y) const;
28 };
30 #endif // CAMERA_H_