-
Notifications
You must be signed in to change notification settings - Fork 3
/
Scene.h
36 lines (29 loc) · 1.08 KB
/
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
#ifndef SCENE_H
#define SCENE_H
#include "SceneObjectPointerContainer.h"
#include "MaterialPointerContainer.h"
#include "PhotonEndPointContainer.h"
#include "Photon.h"
#include "Matrix.h"
#include "Color.h"
#include "Intersection.h"
#include "SceneObject.h"
typedef struct {
SceneObjectPointerContainer objects;
MaterialPointerContainer materials;
PhotonEndPointContainer photons;
Matrix cameraOrientation;
Color skyColor;
float standardReflectivity;
} Scene;
Scene makeScene();
Color sceneTraceRayAtPixel(const Scene *scene, const int currentPixel, const int width, const int height, const int numCameraRayBounces);
void sceneGeneratePhotons(Scene *scene, const int lightRayBounces, const int numPhotonsPerLightSource);
Color sceneTraceRay(const Scene *scene, const Ray ray, const int numCameraRayBounces);
Intersection sceneIntersectRay(const Scene scene, const Ray ray);
void buildCornellBox(Scene *scene);
void buildPaintBox(Scene *scene);
void buildRefractionBox(Scene *scene);
void buildCornellCylinderBox(Scene *scene);
void buildPhotonRefractionTest(Scene *scene);
#endif // SCENE_H