-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
28 lines (21 loc) · 748 Bytes
/
Copy pathCamera.h
File metadata and controls
28 lines (21 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef CAMERA__H_
#define CAMEA__H_
#include "Vec3.h"
// class Camera
// maintains camera's coordinate axes, position and field of view for use in rendering
struct Camera
{
public:
Camera() : pos(), w(0, 0, 1), v(0, 1, 0), u(1, 0, 0), fovy(45), aperture(0), focallength(0), dof(false), ndepthrays(4) {}
Camera(float posx, float posy, float posz, float lookatx, float lookaty, float lookatz, float upx, float upy, float upz, float fovy, float aperture, float focallength, bool dof, unsigned int ndepthrays);
Vec3 pos; // position
Vec3 w; // coordinate axes
Vec3 v;
Vec3 u;
float fovy; // field of view in y direction (degrees)
float aperture;
float focallength;
bool dof;
unsigned int ndepthrays;
};
#endif