rayzor

view 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
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, RayHit *hit = 0) const;
27 Ray get_primary_ray(int x, int y) const;
28 };
30 #endif // CAMERA_H_