rayzor

annotate src/camera.h @ 14:a9a948809c6f

starting the renderer screen, plus misc stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 13 Apr 2014 08:06:21 +0300
parents d94a69933a71
children be616b58df99
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 void calc_inv_matrix() const;
nuclear@12 14
nuclear@1 15 public:
nuclear@1 16 Camera();
nuclear@1 17
nuclear@1 18 void set_target(const Vector3 &target);
nuclear@13 19 Vector3 get_target() const;
nuclear@1 20
nuclear@1 21 void set_fov(float fov);
nuclear@1 22 float get_fov() const;
nuclear@1 23
nuclear@12 24 void draw() const;
nuclear@12 25
nuclear@12 26 bool intersect(const Ray &ray, float *dist = 0) const;
nuclear@1 27 };
nuclear@1 28
nuclear@1 29 #endif // CAMERA_H_