Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Etienne Schmitt
CGoGN
Commits
1485f5b5
Commit
1485f5b5
authored
Mar 16, 2011
by
Kenneth Vanhoey
Browse files
correction colourConverter
parent
23091b60
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/Utils/colourConverter.h
View file @
1485f5b5
...
...
@@ -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
/**
...
...
include/Utils/colourConverter.hpp
View file @
1485f5b5
...
...
@@ -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
)
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment