diff --git a/include/Utils/colourConverter.h b/include/Utils/colourConverter.h index 2a1fb8ebd0765933e5c3a385a384e06f642cc2ca..b4e05084918a5352ed76c960f98103db621ddef0 100644 --- a/include/Utils/colourConverter.h +++ b/include/Utils/colourConverter.h @@ -32,6 +32,17 @@ namespace CGoGN { namespace Utils { +/** + * Supported colour spaces + */ +enum ColourEncoding +{ + C_RGB = 0, + C_Luv = 1, + C_XYZ = 2, + C_Lab = 3 +} ; + /** * Class for colour conversions between the enumerated colour spaces. * Usage : @@ -47,10 +58,6 @@ class ColourConverter public: // types typedef Geom::Vector<3,REAL> VEC3 ; - /** - * Supported colour spaces - */ - enum ColourEncoding { C_RGB, C_XYZ, C_Luv, C_Lab } ; public: // methods /** diff --git a/include/Utils/colourConverter.hpp b/include/Utils/colourConverter.hpp index 5106baf9f093890419081e5d135ebb4daef7b00e..502245a7b522a426f915f2b3c018570d5f28aa0f 100644 --- a/include/Utils/colourConverter.hpp +++ b/include/Utils/colourConverter.hpp @@ -181,7 +181,7 @@ void ColourConverter::convertLuvToXYZ() { REAL v1 = v/den + vn ; den = 4.0*v1 ; X = Y * 9.0 * u1 / den ; - Z = Y * (12 - 3*u1 - 20*v1) / den ; + Z = Y * (12.0 - 3.0*u1 - 20.0*v1) / den ; XYZ = new VEC3(X,Y,Z) ; }