rayzor

view src/camera.h @ 15:be616b58df99

continued the renderer slightly
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 13 Apr 2014 09:54:36 +0300
parents 964f8ea5f095
children 79609d482762
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() const;
25 bool intersect(const Ray &ray, float *dist = 0) const;
27 Ray get_primary_ray(int x, int y) const;
28 };
30 #endif // CAMERA_H_