-
Notifications
You must be signed in to change notification settings - Fork 0
/
RayTracer.h
82 lines (63 loc) · 2.04 KB
/
RayTracer.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#pragma once
#ifndef RAYTRACERH
#define RAYTRACERH
#include <G3D/G3D.h>
class RayTracer
{
public:
RayTracer();
virtual ~RayTracer();
void RayTracer::TraceImage(
const shared_ptr<Camera>& cam,
shared_ptr<Image3>& image,
Array<shared_ptr<Surface>>& surfaceArray,
const Array<shared_ptr<Light>>& LightArray);
void RayTracer::castAllPrimaryRays(
Array<Ray>& rayBuffer);
Color3 RayTracer::L_i(
Array<Ray>& rayBuffer,
const Array<shared_ptr<Light>>& LightArray,
Array<shared_ptr<Surfel>>& surfelBuffer,
Array<Radiance3>& outputBuffer);
void RayTracer::addEmissive(
const Array<Ray>& rayBuffer,
const Array<shared_ptr<Surfel>>& surfelBuffer,
Array<Radiance3>& outputBuffer,
const Array<Color3>& modulationBuffer);
void RayTracer::calcBiradiance(
Array<Ray>& rayBuffer,
const Array<shared_ptr<Surfel>>& surfelBuffer,
Array<Biradiance3>& biradianceBuffer,
Array<Ray>& shadowRayBuffer,
const Array<shared_ptr<Light>>& LightArray);
void RayTracer::directLighting(
const Array<Ray>& rayBuffer,
const Array<shared_ptr<Surfel>>& surfelBuffer,
const Array<shared_ptr<Light>>& LightArray,
const Array<Biradiance3>& biradianceBuffer,
Array<Ray>& shadowRayBuffer,
const Array<Color3>& modulationBuffer,
Array<Radiance3>& outputBuffer,
const Array<bool> lightShadowBuffer);
void RayTracer::L_o(
Array<Ray>& rayBuffer,
const Array<shared_ptr<Light>>& LightArray,
Array<shared_ptr<Surfel>>& surfelBuffer,
Array<Radiance3>& outputBuffer,
Array<Color3>& modulationBuffer,
int bounces);
Radiance3 RayTracer::L_indirect(
Array<Ray>& rayBuffer,
Array<shared_ptr<Surfel>>& surfelBuffer,
Array<Radiance3>& outputBuffer,
Array<Color3>& modulationBuffer,
const Array<shared_ptr<Light>>& LightArray, int bounces);
int m_maxNumberOfScatterEvents;
shared_ptr<TriTree> m_triTree;
private:
shared_ptr<Camera> m_cam;
shared_ptr<Image3> m_image;
int m_numberOfIndirectRays;
int m_raysPerPixel;
};
#endif // !RAYTRACERH