Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / API_Bilat_Image_GL / INC / common / Color3f.h
1 #ifndef COLOR_3F_H
2 #define COLOR_3F_H
3
4 #include "envGLImage.h"
5
6 /*----------------------------------------------------------------------*\
7 |* Declaration *|
8 \*---------------------------------------------------------------------*/
9
10 /*--------------------------------------*\
11 |* Public *|
12 \*-------------------------------------*/
13
14 class CBI_GLIMAGE Colorf
15 {
16 /*--------------------------------------*\
17 |* Constructor *|
18 \*-------------------------------------*/
19
20 public:
21
22 Colorf(float red = 0.0f, float green = 0.0f, float blue = 0.0f, float alpha = 0.0f);
23
24 Colorf(const Colorf& source);
25
26 /*--------------------------------------*\
27 |* Destructor *|
28 \*-------------------------------------*/
29
30 public:
31
32 virtual ~Colorf();
33
34 /*--------------------------------------*\
35 |* Get *|
36 \*-------------------------------------*/
37
38 public:
39
40 inline float getRed() const
41 {
42 return tabColor[0];
43 }
44
45 inline float getGreen() const
46 {
47 return tabColor[1];
48 }
49
50 inline float getBlue() const
51 {
52 return tabColor[2];
53 }
54
55 inline float getAlpha() const
56 {
57 return tabColor[3];
58 }
59
60 inline float* getTabColor()
61 {
62 return tabColor;
63 }
64
65 /*--------------------------------------*\
66 |* Set *|
67 \*-------------------------------------*/
68
69 public:
70 inline void setRed(float red)
71 {
72 tabColor[0] = red;
73 }
74
75 inline void setGreen(float green)
76 {
77 tabColor[1] = green;
78 }
79 inline void setBlue(float blue)
80 {
81 tabColor[2] = blue;
82 }
83
84 inline void setAlpha(float alpha)
85 {
86 tabColor[3] = alpha;
87 }
88
89 /*--------------------------------------*\
90 |* Static *|
91 \*-------------------------------------*/
92
93 static Colorf toHSB(float h01, float s01, float b01, float a01 = 1.0f);
94
95 /*--------------------------------------*\
96 |* Attributs *|
97 \*------------------------------------*/
98
99 private:
100
101 // Input
102 float tabColor[4];
103 };
104
105 #endif
106
107 /*----------------------------------------------------------------------*\
108 |* End *|
109 \*---------------------------------------------------------------------*/