X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Image_GL%2FINC%2Fcommon%2FColor3f.h;fp=WCudaMSE%2FAPI_Bilat_Image_GL%2FINC%2Fcommon%2FColor3f.h;h=fee76bf1114d3876826ca860e22e4a64b6d5500b;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Image_GL/INC/common/Color3f.h b/WCudaMSE/API_Bilat_Image_GL/INC/common/Color3f.h new file mode 100755 index 0000000..fee76bf --- /dev/null +++ b/WCudaMSE/API_Bilat_Image_GL/INC/common/Color3f.h @@ -0,0 +1,109 @@ +#ifndef COLOR_3F_H +#define COLOR_3F_H + +#include "envGLImage.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +class CBI_GLIMAGE Colorf + { + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + public: + + Colorf(float red = 0.0f, float green = 0.0f, float blue = 0.0f, float alpha = 0.0f); + + Colorf(const Colorf& source); + + /*--------------------------------------*\ + |* Destructor *| + \*-------------------------------------*/ + + public: + + virtual ~Colorf(); + + /*--------------------------------------*\ + |* Get *| + \*-------------------------------------*/ + + public: + + inline float getRed() const + { + return tabColor[0]; + } + + inline float getGreen() const + { + return tabColor[1]; + } + + inline float getBlue() const + { + return tabColor[2]; + } + + inline float getAlpha() const + { + return tabColor[3]; + } + + inline float* getTabColor() + { + return tabColor; + } + + /*--------------------------------------*\ + |* Set *| + \*-------------------------------------*/ + + public: + inline void setRed(float red) + { + tabColor[0] = red; + } + + inline void setGreen(float green) + { + tabColor[1] = green; + } + inline void setBlue(float blue) + { + tabColor[2] = blue; + } + + inline void setAlpha(float alpha) + { + tabColor[3] = alpha; + } + + /*--------------------------------------*\ + |* Static *| + \*-------------------------------------*/ + + static Colorf toHSB(float h01, float s01, float b01, float a01 = 1.0f); + + /*--------------------------------------*\ + |* Attributs *| + \*------------------------------------*/ + + private: + + // Input + float tabColor[4]; + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/