-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLight.h
46 lines (35 loc) · 1.13 KB
/
Light.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
// *********************************************************
// Light Class
// Author : Tamy Boubekeur ([email protected]).
// Copyright (C) 2010 Tamy Boubekeur.
// All rights reserved.
// *********************************************************
#ifndef LIGHT_H
#define LIGHT_H
#include <iostream>
#include <vector>
#include "Vec3D.h"
class Light {
public:
inline Light () : color (Vec3Df (1.0f, 1.0f, 1.0f)), intensity (1.0f) {}
inline Light (const Vec3Df & pos, const Vec3Df & color, float intensity)
: pos (pos), color (color), intensity (intensity) {}
virtual ~Light () {}
inline const Vec3Df & getPos () const { return pos; }
inline const Vec3Df & getColor () const { return color; }
inline float getIntensity () const { return intensity; }
inline void setPos (const Vec3Df & p) { pos = p; }
inline void setColor (const Vec3Df & c) { color = c; }
inline void setIntensity (float i) { intensity = i; }
private:
Vec3Df pos;
Vec3Df color;
float intensity;
};
#endif // LIGHT_H
// Some Emacs-Hints -- please don't remove:
//
// Local Variables:
// mode:C++
// tab-width:4
// End: