source:
GTP/trunk/Lib/Vis/Preprocessing/src/Material.cpp
@
863
Revision 863, 378 bytes checked in by mattausch, 19 years ago (diff) |
---|
Rev | Line | |
---|---|---|
[162] | 1 | #include "common.h" |
2 | #include "Material.h" | |
3 | ||
[863] | 4 | namespace GtpVisibilityPreprocessor { |
[162] | 5 | |
[860] | 6 | |
[162] | 7 | Material |
8 | RandomMaterial() | |
9 | { | |
10 | float a = 0.1f; | |
11 | float b = 0.9f; | |
12 | ||
13 | Material m; | |
[608] | 14 | m.mDiffuseColor = RandomColor(a, b); |
[162] | 15 | |
16 | return m; | |
17 | } | |
18 | ||
[608] | 19 | |
20 | RgbColor | |
21 | RandomColor(const float a, const float b) | |
22 | { | |
23 | return RgbColor(a + Random(b), | |
24 | a + Random(b), | |
25 | a + Random(b)); | |
26 | } | |
[860] | 27 | |
28 | } |
Note: See TracBrowser
for help on using the repository browser.