-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
27 lines (23 loc) · 741 Bytes
/
Camera.h
File metadata and controls
27 lines (23 loc) · 741 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
/**
* \author Marie DARRIGOL & Anthony LEONARD & Ophélie PELLOUX-PRAYER & Olivier SOLDANO
* \project Ray-Tracing
* \file Camera.h
* \brief Camera representation in the scene
*/
#pragma once
#include "Vec3.h"
#include "Mat3.h"
#include "Ray.h"
class Camera
{
private:
Vec3 pOrigin;
unsigned int picWidth, picHeight;
// Les données suivantes sont des données calculées
Mat3 R; // Matrice de rotation permettant d'orienter la grille
float distToFrame; // Distance de l'observateur à la grille
float width, height; // Dimensions de la grille (<= 1.0f)
public:
Camera(const Vec3& pOrigin, const Vec3& vFrame, const unsigned int picWidth, const unsigned int picHeight);
Ray getRay(const unsigned int x, const unsigned int y) const;
};