Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
math.types.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_TYPES_H
22 #define LIB_LIGHTMETRICA_MATH_TYPES_H
23 
24 #include "math.common.h"
25 #include "math.vector.h"
26 #include "math.matrix.h"
27 #include "math.quat.h"
28 #include "math.constants.h"
29 #include "math.colors.h"
30 #include "math.cast.h"
31 #include "math.pdf.h"
32 
33 LM_NAMESPACE_BEGIN
34 LM_MATH_NAMESPACE_BEGIN
35 
36 // Define default floating point types
37 #if LM_SINGLE_PRECISION
38  typedef float Float;
39 #elif LM_DOUBLE_PRECISION
40  typedef double Float;
41 #elif LM_MULTI_PRECISION
42  #ifndef LM_ENABLE_MULTI_PRECISION
43  #error "Multiprecision support must be enabled"
44  #endif
45  typedef BigFloat Float;
46 #endif
47 
48 typedef TVec2<Float> Vec2;
49 typedef TVec3<Float> Vec3;
50 typedef TVec4<Float> Vec4;
51 typedef TMat3<Float> Mat3;
52 typedef TMat4<Float> Mat4;
54 typedef TColors<Float> Colors;
55 typedef TPDFEval<Float> PDFEval;
56 
57 LM_MATH_NAMESPACE_END
58 LM_NAMESPACE_END
59 
60 #endif // LIB_LIGHTMETRICA_MATH_TYPES_H
Definition: math.matrix.h:30
Definition: math.colors.h:35
Definition: math.vector.h:32
Definition: math.matrix.h:29
Definition: math.pdf.h:80
Definition: math.vector.h:31
Definition: math.constants.h:34
Definition: math.vector.h:30