Rev | Line | |
---|
[162] | 1 | #ifndef __MATERIAL_H
|
---|
| 2 | #define __MATERIAL_H
|
---|
| 3 |
|
---|
[860] | 4 | namespace GtpVisibilityPreprocessor {
|
---|
[162] | 5 |
|
---|
| 6 |
|
---|
| 7 | class RgbColor
|
---|
| 8 | {
|
---|
| 9 | public:
|
---|
| 10 | float r, g, b;
|
---|
| 11 |
|
---|
| 12 | RgbColor():r(0.5f),g(0.5f),b(0.5f)
|
---|
| 13 | {
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | RgbColor(const float _r,
|
---|
| 17 | const float _g,
|
---|
| 18 | const float _b):r(_r),g(_g),b(_b)
|
---|
| 19 | {
|
---|
| 20 | }
|
---|
[608] | 21 |
|
---|
| 22 | friend RgbColor
|
---|
| 23 | RandomColor(const float a=0.0f, const float b=1.0f);
|
---|
| 24 |
|
---|
[162] | 25 | };
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 | class Material
|
---|
| 29 | {
|
---|
| 30 | public:
|
---|
| 31 | RgbColor mDiffuseColor;
|
---|
| 32 | RgbColor mSpecularColor;
|
---|
| 33 | RgbColor mAmbientColor;
|
---|
| 34 |
|
---|
| 35 | Material()
|
---|
| 36 | {
|
---|
| 37 | }
|
---|
[608] | 38 |
|
---|
| 39 | Material(const RgbColor &color):mDiffuseColor(color),
|
---|
| 40 | mAmbientColor(color),
|
---|
| 41 | mSpecularColor(0,0,0)
|
---|
| 42 | {
|
---|
| 43 | }
|
---|
| 44 |
|
---|
[162] | 45 | friend Material RandomMaterial();
|
---|
| 46 |
|
---|
| 47 | };
|
---|
| 48 |
|
---|
| 49 |
|
---|
[860] | 50 | }
|
---|
[162] | 51 |
|
---|
| 52 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.