initial version
[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 * Set color
49 * @param r red component
50 * @param g green component
51 * @param b blue component
52 */
53 void setRGB(double r, double g, double b);
54
55 /**
56 * Get red component
57 * @return the red component
58 */
59 double getR();
60
61 /**
62 * Get green component
63 * @return the green component
64 */
65 double getG();
66
67 /**
68 * Get blue component
69 * @return the blue component
70 */
71 double getB();
72
73 protected:
74
75 double _r, _g, _b;
76 };
77
78
79
80 #endif