Lluvia
types.h
Go to the documentation of this file.
1 
8 #ifndef LLUVIA_CORE_TYPES_H_
9 #define LLUVIA_CORE_TYPES_H_
10 
11 #include "lluvia/core/error.h"
12 #include <cstdint>
13 #include <stdexcept>
14 
15 namespace ll {
16 
22 template <typename T>
23 struct vec3 {
24  T x {0};
25  T y {0};
26  T z {0};
27 
28  vec3() { }
29 
30  vec3(const T& value)
31  : x {value}
32  , y {value}
33  , z {value}
34  {
35  }
36 
37  vec3(const T& x_, const T& y_, const T& z_)
38  : x {x_}
39  , y {y_}
40  , z {z_}
41  {
42  }
43 };
44 
49 
50 } // namespace ll
51 
52 #endif /* LLUVIA_CORE_TYPES_H_ */
error related classes and methods.
Definition: Buffer.h:28
3-vector
Definition: types.h:23
vec3(const T &x_, const T &y_, const T &z_)
Definition: types.h:37
vec3(const T &value)
Definition: types.h:30
T x
Definition: types.h:24
vec3()
Definition: types.h:28
T z
Definition: types.h:26
T y
Definition: types.h:25