1 #ifndef ANDROID_DVR_TYPES_H_
2 #define ANDROID_DVR_TYPES_H_
3 
4 // All basic types used by VR code.
5 
6 #include <private/dvr/eigen.h>
7 #include <private/dvr/field_of_view.h>
8 #include <private/dvr/pose.h>
9 #include <private/dvr/range.h>
10 
11 namespace android {
12 namespace dvr {
13 
14 enum RgbColorChannel { kRed, kGreen, kBlue };
15 
16 // EyeType: 0 for left, 1 for right.
17 enum EyeType { kLeftEye = 0, kRightEye = 1 };
18 
19 // In the context of VR, vector types are used as much as base types.
20 
21 using vec2f = Eigen::Vector2f;
22 using vec2d = Eigen::Vector2d;
23 using vec2i = Eigen::Vector2i;
24 using vec2 = vec2f;
25 
26 using vec3f = Eigen::Vector3f;
27 using vec3d = Eigen::Vector3d;
28 using vec3i = Eigen::Vector3i;
29 using vec3 = vec3f;
30 
31 using vec4f = Eigen::Vector4f;
32 using vec4d = Eigen::Vector4d;
33 using vec4i = Eigen::Vector4i;
34 using vec4 = vec4f;
35 
36 using mat3f = Eigen::AffineMatrix<float, 3>;
37 using mat3d = Eigen::AffineMatrix<double, 3>;
38 using mat3 = mat3f;
39 
40 using mat4f = Eigen::AffineMatrix<float, 4>;
41 using mat4d = Eigen::AffineMatrix<double, 4>;
42 using mat4 = mat4f;
43 
44 using quatf = Eigen::Quaternionf;
45 using quatd = Eigen::Quaterniond;
46 using quat = quatf;
47 
48 }  // namespace dvr
49 }  // namespace android
50 
51 #endif  // ANDROID_DVR_TYPES_H_
52