SLProject  4.3.020
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SENS.h
Go to the documentation of this file.
1 /**
2  * \file SENS.h
3  * \authors Michael Goettlicher, Marcus Hudritsch
4  * \date Winter 2021
5  * \remarks Please use clangformat to format the code. See more code style on
6  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
7  * \copyright http://opensource.org/licenses/GPL-3.0
8 */
9 
10 #ifndef SENS_H
11 #define SENS_H
12 
13 #include <chrono>
14 #include <Utils.h>
15 
16 #ifdef __APPLE__
17 # include <TargetConditionals.h>
18 # if TARGET_OS_IOS
19 # define SENS_OS_MACIOS
20 # define SENS_GLES
21 # define SENS_GLES3
22 # else
23 # define SENS_OS_MACOS
24 # if defined(_DEBUG)
25 
26 # endif
27 # endif
28 #elif defined(ANDROID) || defined(ANDROID_NDK)
29 # define SENS_OS_ANDROID
30 # define SENS_GLES
31 # define SENS_GLES3
32 #elif defined(_WIN32)
33 # define SENS_OS_WINDOWS
34 # define SENS_USE_DISCARD_STEREOMODES
35 # ifdef _DEBUG
36 # define _GLDEBUG
37 # endif
38 # define STDCALL __stdcall
39 #elif defined(linux) || defined(__linux) || defined(__linux__)
40 # define SENS_OS_LINUX
41 # define SENS_USE_DISCARD_STEREOMODES
42 # ifdef _DEBUG
43 # endif
44 #else
45 # error "SL has not been ported to this OS"
46 #endif
47 
48 enum class SENSType
49 {
50  CAM,
51  VIDEO,
52  GPS,
54 };
55 
56 using SENSClock = std::chrono::high_resolution_clock;
57 using SENSTimePt = std::chrono::high_resolution_clock::time_point;
58 using SENSMicroseconds = std::chrono::microseconds;
59 
60 #define SENS_DEBUG(...) Utils::log("SENS DEBUG", __VA_ARGS__);
61 //#define SENS_DEBUG
62 //#define SENS_INFO(...) Utils::log("SENS INFO", __VA_ARGS__);
63 #define SENS_INFO
64 #define SENS_WARN(...) Utils::log("SENS WARN", __VA_ARGS__);
65 //#define SENS_WARN
66 
67 #endif //SENS_H
std::chrono::microseconds SENSMicroseconds
Definition: SENS.h:58
std::chrono::high_resolution_clock SENSClock
Definition: SENS.h:56
SENSType
Definition: SENS.h:49
std::chrono::high_resolution_clock::time_point SENSTimePt
Definition: SENS.h:57