Commit 1485f5b5 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey

correction colourConverter

parent 23091b60
......@@ -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
/**
......
......@@ -181,7 +181,7 @@ void ColourConverter<REAL>::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) ;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment