-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRayTracer.h
51 lines (40 loc) · 1.23 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
// *********************************************************
// Ray Tracer Class
// Author : Tamy Boubekeur ([email protected]).
// Copyright (C) 2012 Tamy Boubekeur.
// All rights reserved.
// *********************************************************
#ifndef RAYTRACER_H
#define RAYTRACER_H
#include <iostream>
#include <vector>
#include <QImage>
#include "Vec3D.h"
#include "Triangle.h"
class RayTracer {
public:
static RayTracer * getInstance ();
static void destroyInstance ();
inline const Vec3Df & getBackgroundColor () const { return backgroundColor;}
inline void setBackgroundColor (const Vec3Df & c) { backgroundColor = c; }
QImage render (const Vec3Df & camPos,
const Vec3Df & viewDirection,
const Vec3Df & upVector,
const Vec3Df & rightVector,
float fieldOfView,
float aspectRatio,
unsigned int screenWidth,
unsigned int screenHeight);
protected:
inline RayTracer () {}
inline virtual ~RayTracer () {}
private:
Vec3Df backgroundColor;
};
#endif // RAYTRACER_H
// Some Emacs-Hints -- please don't remove:
//
// Local Variables:
// mode:C++
// tab-width:4
// End: