-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScene.hpp
55 lines (44 loc) · 1.46 KB
/
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
54
55
#ifndef __SCENE__
#define __SCENE__
#include "vfield/Direction.hpp"
#include "vfield/Point.hpp"
#include "shapes/Shape.hpp"
#include "Camera.hpp"
#include "LightPoint.hpp"
#include "AreaLight.hpp"
#include <memory>
#include <vector>
using namespace std;
//***********************************************************************
// Scene for ray/path tracer implementation
//***********************************************************************
class Scene{
private:
int height, width; // Size (in pixels) of the projection plane
vector<shared_ptr<Shape> > objects; // Geometries which compose the scene
vector<LightPoint> lightPoints;
vector<AreaLight> areaLights;
Camera camera;
public:
Scene(int height, int width);
Scene(int width, int height, Camera c);
int getHeight();
int getWidth();
void setWidth(int width);
void setHeight(int height);
void setCamera(Camera camera);
void buildCameraFromHFOV(float HFOV, Point target);
void buildCameraFromVFOV(float HFOV, Point target);
Point getTarget();
Camera getCamera();
void addShape(shared_ptr<Shape> s);
void addLight(LightPoint lp);
void addLight(AreaLight al);
shared_ptr<Shape> getShape(int i);
LightPoint getLightPoint(int i);
AreaLight getAreaLight(int i);
int shapeN();
int lightPN();
int areaLightN();
};
#endif