CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
xdic_mode.h
Go to the documentation of this file.
1
21#pragma once
22
23// Fall back to the working mode when none was defined by the build system.
24#if !defined(XDIC_MODE_CAMERAPAIRS) && !defined(XDIC_MODE_MIRRORED) && !defined(XDIC_MODE_MULTI)
25#define XDIC_MODE_CAMERAPAIRS
26#endif
27
28namespace xdic {
29
31enum class Mode {
33 Mirrored,
34 Multi
35};
36
41constexpr Mode active_mode() {
42#if defined(XDIC_MODE_MIRRORED)
43 return Mode::Mirrored;
44#elif defined(XDIC_MODE_MULTI)
45 return Mode::Multi;
46#else
47 return Mode::CameraPairs;
48#endif
49}
50
55constexpr const char* active_mode_name() {
56#if defined(XDIC_MODE_MIRRORED)
57 return "mirrored";
58#elif defined(XDIC_MODE_MULTI)
59 return "multi";
60#else
61 return "camerapairs";
62#endif
63}
64
65} // namespace xdic
constexpr Mode active_mode()
The reconstruction mode selected at compile time.
Definition xdic_mode.h:41
Mode
Enumeration of the supported xDIC reconstruction modes.
Definition xdic_mode.h:31
@ Mirrored
Single camera + mirror rig (implemented, MNG variant).
@ Multi
N-camera generalisation (stub).
@ CameraPairs
Stereo camera pairs (default, fully implemented).
constexpr const char * active_mode_name()
Human-readable name of the active mode.
Definition xdic_mode.h:55