rayzor

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