Minor cleanup.
[lsystem3d.git] / src / color.h
1 // Copyright (C) 2006 Erik Dahlberg
2 //
3 // This file is part of LSystem3D.
4 //
5 // LSystem3D is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // LSystem3D is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with LSystem3D; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19
20
21
22 #ifndef COLOR_H
23 #define COLOR_H
24
25
26
27 /**
28 * Color in RGB format
29 */
30 class Color
31 {
32 public:
33
34 /**
35 * Constructor
36 * @param r red component
37 * @param g green component
38 * @param b blue component
39 */
40 Color(double r, double g, double b);
41
42 /**
43 * Destructor
44 */
45 ~Color();
46
47
48 /**
49 * Set color
50 * @param r red component
51 * @param g green component
52 * @param b blue component
53 */
54 void setRGB(double r, double g, double b);
55
56
57 /**
58 * Get red component
59 * @return the red component
60 */
61 double getR();
62
63 /**
64 * Get green component
65 * @return the green component
66 */
67 double getG();
68
69 /**
70 * Get blue component
71 * @return the blue component
72 */
73 double getB();
74
75 protected:
76
77 double _r, _g, _b;
78 };
79
80
81
82 #endif