settings_variables.cpp 3.26 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
 * TAS paths tool -- global settings variables
 * @author Tobias Weber <tweber@ill.fr>
 * @date apr-2021
 * @license GPLv3, see 'LICENSE' file
 *
 * ----------------------------------------------------------------------------
 * TAS-Paths (part of the Takin software suite)
 * Copyright (C) 2021  Tobias WEBER (Institut Laue-Langevin (ILL),
 *                     Grenoble, France).
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * ----------------------------------------------------------------------------
 */

#include "settings_variables.h"
#include "tlibs2/libs/maths.h"



// ----------------------------------------------------------------------------
// global settings variables
// ----------------------------------------------------------------------------
Tobias WEBER's avatar
Tobias WEBER committed
34
35
36
37
38

// resource manager
Resources g_res{};

// application path
39
40
41
42
43
44
std::string g_apppath = ".";


// maximum number of threads
unsigned int g_maxnum_threads = 4;

45
46
47
// maximum number of recent files
unsigned int g_maxnum_recents = 16;

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

// epsilons and precisions
int g_prec = 6;
int g_prec_gui = 4;
t_real g_eps = 1e-6;
t_real g_eps_angular = 0.01 / 180. * tl2::pi<t_real>;
t_real g_eps_gui = 1e-4;
t_real g_eps_voronoiedge = 2e-2;

t_real g_line_subdiv_len = 0.025;

t_real g_a3_offs = tl2::pi<t_real>*0.5;

t_real g_a2_delta = 0.5 / 180. * tl2::pi<t_real>;
t_real g_a4_delta = 1. / 180. * tl2::pi<t_real>;


// which polygon intersection method should be used?
// 0: sweep, 1: half-plane test
int g_poly_intersection_method = 1;

// which backend to use for voronoi diagram calculation?
// 0: boost.polygon, 1: cgal
int g_voronoi_backend = 0;

// use region calculation function
int g_use_region_function = 1;
Tobias WEBER's avatar
Tobias WEBER committed
75
76
77

// use bisector verification function
int g_remove_bisectors_below_min_wall_dist = 1;
78
79
80
81


// path-finding options
int g_pathstrategy = 0;
Tobias WEBER's avatar
Tobias WEBER committed
82
int g_try_direct_path = 1;
83
84
int g_verifypath = 1;

85
86
87
88
// minimum distance to keep from the walls
t_real g_min_dist_to_walls = 5. / t_real(180.) * tl2::pi<t_real>;


89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

// path-tracker and renderer FPS
unsigned int g_pathtracker_fps = 30;
unsigned int g_timer_fps = 30;


// renderer options
tl2::t_real_gl g_move_scale = tl2::t_real_gl(1./75.);
tl2::t_real_gl g_rotation_scale = tl2::t_real_gl(0.02);

int g_light_follows_cursor = 0;
int g_enable_shadow_rendering = 1;

// screenshots
int g_combined_screenshots = 0;
int g_automatic_screenshots = 0;


// gui theme
Tobias WEBER's avatar
Tobias WEBER committed
108
QString g_theme = "Fusion";
109
110
111
112
113
114
115
116
117

// gui font
QString g_font = "";

// use native menubar?
int g_use_native_menubar = 0;

// use native dialogs?
int g_use_native_dialogs = 1;
Tobias WEBER's avatar
Tobias WEBER committed
118
119
120
121
122
123
124
125
126

// use gui animations?
int g_use_animations = 0;

// allow tabbed dock widgets?
int g_tabbed_docks = 0;

// allow nested dock widgets?
int g_nested_docks = 0;
127
// ----------------------------------------------------------------------------