Line | |
---|
1 | #ifndef __LIGHT_H
|
---|
2 | #define __LIGHT_H
|
---|
3 |
|
---|
4 | #include "common.h"
|
---|
5 | #include "Vector3.h"
|
---|
6 | #include "Material.h"
|
---|
7 |
|
---|
8 |
|
---|
9 | namespace CHCDemoEngine
|
---|
10 | {
|
---|
11 |
|
---|
12 | /** Class representing a directional light source
|
---|
13 | */
|
---|
14 | class DirectionalLight
|
---|
15 | {
|
---|
16 | public:
|
---|
17 |
|
---|
18 | DirectionalLight(const Vector3 &dir, const RgbaColor &amb, const RgbaColor &dif):
|
---|
19 | mAmbient(amb), mDiffuse(dif) { mDirection = Normalize(dir); }
|
---|
20 |
|
---|
21 | void SetDirection(const Vector3 &dir) { mDirection = dir; }
|
---|
22 |
|
---|
23 | void SetDiffuseColor(const RgbaColor &dif) { mDiffuse = dif; }
|
---|
24 |
|
---|
25 | void SetAmbientColor(const RgbaColor &amb) { mAmbient = amb; }
|
---|
26 |
|
---|
27 | Vector3 GetDirection() const { return mDirection; }
|
---|
28 | RgbaColor GetDiffuseColor() const { return mDiffuse; }
|
---|
29 | RgbaColor GetAmbientColor() const { return mAmbient; }
|
---|
30 |
|
---|
31 |
|
---|
32 | protected:
|
---|
33 |
|
---|
34 | Vector3 mDirection;
|
---|
35 |
|
---|
36 | RgbaColor mDiffuse;
|
---|
37 | RgbaColor mAmbient;
|
---|
38 | };
|
---|
39 |
|
---|
40 | }
|
---|
41 |
|
---|
42 | #endif // __LIGHT_H |
---|
Note: See
TracBrowser
for help on using the repository browser.