source:
orxonox.OLD/trunk/src/lib/util/color.h
@
7341
Last change on this file since 7341 was 7195, checked in by bensch, 19 years ago | |
---|---|
File size: 629 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[5009] | 2 | * @file color.h |
3 | * @brief Definition of color-calculations | |
4 | * | |
5 | * code borrowed from: | |
6 | * http://www.easyrgb.com/math.php | |
[3245] | 7 | */ |
[1853] | 8 | |
[5009] | 9 | #ifndef _COLOR_H |
10 | #define _COLOR_H | |
[1853] | 11 | |
[7195] | 12 | #include "vector.h" |
[1853] | 13 | |
[5011] | 14 | //! a very abstract Class that helps transforming Colors into different Systems |
[5009] | 15 | class Color |
16 | { | |
[7195] | 17 | public: |
[5010] | 18 | static Vector RGBtoHSV (const Vector& RGB); |
[7195] | 19 | static void RGBtoHSV (const Vector& RGB, Vector& HSV); |
[5010] | 20 | static Vector HSVtoRGB (const Vector& HSV); |
[7195] | 21 | static void HSVtoRGB (const Vector& HSV, Vector& RGB); |
[5010] | 22 | |
[7195] | 23 | private: |
[5010] | 24 | static float minrgb(float r, float g, float b); |
25 | static float maxrgb(float r, float g, float b); | |
[1853] | 26 | }; |
27 | ||
[5009] | 28 | #endif /* _COLOR_H */ |
Note: See TracBrowser
for help on using the repository browser.