source: GTP/trunk/Lib/Vis/Preprocessing/src/Material.h @ 860

Revision 860, 716 bytes checked in by mattausch, 18 years ago (diff)
Line 
1#ifndef __MATERIAL_H
2#define __MATERIAL_H
3
4namespace GtpVisibilityPreprocessor {
5
6
7class RgbColor
8{
9public:
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  }
21
22  friend RgbColor
23  RandomColor(const float a=0.0f, const float b=1.0f);
24
25};
26
27
28class Material
29{
30public:
31  RgbColor mDiffuseColor;
32  RgbColor mSpecularColor;
33  RgbColor mAmbientColor;
34 
35  Material()
36  {
37  }
38 
39  Material(const RgbColor &color):mDiffuseColor(color),
40                                                                  mAmbientColor(color),
41                                                                  mSpecularColor(0,0,0)
42  {
43  }
44 
45  friend Material RandomMaterial();
46 
47};
48
49
50}
51
52#endif
Note: See TracBrowser for help on using the repository browser.