Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
math.colors.h
1 /*
2  Lightmetrica : A research-oriented renderer
3 
4  Copyright (c) 2014 Hisanari Otsu
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 #ifndef LIB_LIGHTMETRICA_MATH_COLORS_H
22 #define LIB_LIGHTMETRICA_MATH_COLORS_H
23 
24 #include "math.vector.h"
25 
26 LM_NAMESPACE_BEGIN
27 LM_MATH_NAMESPACE_BEGIN
28 
34 template <typename T>
35 class TColors
36 {
37 public:
38 
39  TColors();
40  ~TColors();
41 
42  LM_DISABLE_COPY_AND_MOVE(TColors);
43 
44 public:
45 
46  LM_FORCE_INLINE static TVec3<T> White() { return TVec3<T>(T(1 ), T(1 ), T(1 )); }
47  LM_FORCE_INLINE static TVec3<T> Silver() { return TVec3<T>(T(0.75), T(0.75), T(0.75)); }
48  LM_FORCE_INLINE static TVec3<T> Gray() { return TVec3<T>(T(0.5 ), T(0.5 ), T(0.5 )); }
49  LM_FORCE_INLINE static TVec3<T> Black() { return TVec3<T>(T(0 ), T(0 ), T(0 )); }
50  LM_FORCE_INLINE static TVec3<T> Red() { return TVec3<T>(T(1 ), T(0 ), T(0 )); }
51  LM_FORCE_INLINE static TVec3<T> Maroon() { return TVec3<T>(T(0.5 ), T(0 ), T(0 )); }
52  LM_FORCE_INLINE static TVec3<T> Yellow() { return TVec3<T>(T(1 ), T(1 ), T(0 )); }
53  LM_FORCE_INLINE static TVec3<T> Olive() { return TVec3<T>(T(0.5 ), T(0.5 ), T(0 )); }
54  LM_FORCE_INLINE static TVec3<T> Green() { return TVec3<T>(T(0 ), T(1 ), T(0 )); }
55  LM_FORCE_INLINE static TVec3<T> Lime() { return TVec3<T>(T(0 ), T(0.5 ), T(0 )); }
56  LM_FORCE_INLINE static TVec3<T> Aqua() { return TVec3<T>(T(0 ), T(1 ), T(1 )); }
57  LM_FORCE_INLINE static TVec3<T> Teal() { return TVec3<T>(T(0 ), T(0.5 ), T(0.5 )); }
58  LM_FORCE_INLINE static TVec3<T> Blue() { return TVec3<T>(T(0 ), T(0 ), T(1 )); }
59  LM_FORCE_INLINE static TVec3<T> Navy() { return TVec3<T>(T(0 ), T(0 ), T(0.5 )); }
60  LM_FORCE_INLINE static TVec3<T> Fuchsia() { return TVec3<T>(T(1 ), T(0 ), T(1 )); }
61  LM_FORCE_INLINE static TVec3<T> Purple() { return TVec3<T>(T(0.5 ), T(0 ), T(0.5 )); }
62 
63 };
64 
65 LM_MATH_NAMESPACE_END
66 LM_NAMESPACE_END
67 
68 #endif // LIB_LIGHTMETRICA_MATH_COLORS_H
Definition: math.colors.h:35
Definition: math.vector.h:31