-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScene.h
47 lines (39 loc) · 943 Bytes
/
Scene.h
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
#ifndef _SCENE_H_
#define _SCENE_H_
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include "Camera.h"
#include "Color.h"
#include "Mesh.h"
#include "Rotation.h"
#include "Scaling.h"
#include "Translation.h"
#include "Triangle.h"
#include "Vec3.h"
#include "Vec4.h"
using namespace std;
class Scene
{
public:
Color backgroundColor;
bool cullingEnabled;
vector< vector<Color> > image;
vector< Camera* > cameras;
vector< Vec3* > vertices;
vector< Color* > colorsOfVertices;
vector< Scaling* > scalings;
vector< Rotation* > rotations;
vector< Translation* > translations;
vector< Mesh* > meshes;
Scene(const char *xmlPath);
void initializeImage(Camera* camera);
void forwardRenderingPipeline(Camera* camera);
int makeBetweenZeroAnd255(double value);
void writeImageToPPMFile(Camera* camera);
void convertPPMToPNG(string ppmFileName, int osType);
};
#endif