-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscene.hpp
53 lines (33 loc) · 862 Bytes
/
scene.hpp
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// File: scene.hpp
// Author: Samuel McFalls
// Description: Implements the Scene class
#ifndef SCENE_H
#define SCENE_H
#include "object.hpp"
#include "camera.hpp"
#include "light.hpp"
#include "color.hpp"
#include "sphere.hpp"
#include "plane.hpp"
#include <vector>
#include <string>
class Scene {
public:
Scene();
double getCameraX() const;
double getCameraY() const;
void setCamera(const Camera &cameraSet);
void addSphere(Sphere sphere);
void addPlane(Plane plane);
void addLight(Light light);
void addLights(std::vector<Light> lights);
Color pixelByTrace(int x, int y) const;
private:
std::vector<Sphere> spheres;
std::vector<Plane> planes;
Camera camera;
std::vector<Light> lights;
double intersectsObject(Ray ray, Sphere &sphere, Plane &plane, std::string &type) const;
double intersectsCamera(Ray ray) const;
};
#endif