forked from CIS5650-Fall-2025/Project3-CUDA-Path-Tracer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera.hpp
More file actions
32 lines (25 loc) · 647 Bytes
/
camera.hpp
File metadata and controls
32 lines (25 loc) · 647 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
29
30
31
32
#pragma once
#include <glm/glm.hpp>
#include <compare>
/// Settings related to configuring how the camera will work and how
/// rays will initially be generated.
struct CameraSettings {
bool stochastic_sampling;
bool depth_of_field;
float lens_radius;
float focal_distance;
auto operator<=>(const CameraSettings&) const = default;
};
class Camera {
public:
glm::ivec2 resolution;
glm::vec3 position;
glm::vec3 look_at;
glm::vec3 view;
glm::vec3 up;
glm::vec3 right;
glm::vec2 fov;
glm::vec2 pixel_length;
void update(double zoom, double theta, double phi);
auto operator<=>(const Camera&) const = default;
};