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