Repository navigation
Expand file tree
/
Copy pathmenu.cpp
More file actions
357 lines (326 loc) · 36 KB
/
Copy pathmenu.cpp
File metadata and controls
357 lines (326 loc) · 36 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
#include "menu.h"
#include "point_manager.h"
#include <GLFW/glfw3.h>
#include "solver.h"
#include "ImGuiFileDialog.h"
#include <chrono>
#include <fstream>
#include <filesystem>
#include <iomanip>
#include <locale>
#include <array>
#include <iostream>
#include <omp.h>
#include <imgui.h>
bool shows_energy = true;
std::array<double,3> energy = {0.0, 0.0, 0.0};
BenchmarkDurations benchmark_durations;
bool benchmark_flag = false;
int benchmark_step = 0;
bool parallel_flag = true;
Eigen::RowVector3d increment;
std::chrono::duration<double> arap_step_accumulation{};
std::chrono::duration<double> left_side{};
std::chrono::duration<double> factorization{};
Eigen::RowVector3d from;
Eigen::RowVector3d to;
void setup_menu(igl::opengl::glfw::Viewer& viewer, igl::opengl::glfw::imgui::ImGuiMenu& menu,
MeshContext& context)
{
draw_vertices(viewer,context,false,true,true);
viewer.callback_mouse_down = [&](igl::opengl::glfw::Viewer& viewer, int button, int modifier)
{
if(button == GLFW_MOUSE_BUTTON_LEFT)
{
if(context.mode==0){
context.selected_vertex = point_picker(viewer, context);
if (context.selected_vertex != -1 && context.vertex_type[context.selected_vertex] == 1)
prepare_drag_session(context, viewer.core().view);
else context.selected_vertex = -1;
}
else point_manager(context, viewer);
}
return false;
};
viewer.callback_mouse_move = [&context](igl::opengl::glfw::Viewer& /*viewer*/, double x, double y) {
if (context.is_dragging && context.selected_vertex != -1)
{
context.needs_draw = true;
context.mouse_x = x;
context.mouse_y = y;
return true;
}
return false;
};
viewer.callback_pre_draw = [&context](igl::opengl::glfw::Viewer& viewer)
{
if (context.needs_draw || benchmark_flag) {
Eigen::RowVector3d target_pos;
if (!benchmark_flag) {
target_pos = mouse_to_plane(context.mouse_x, context.mouse_y, viewer.core().view,
viewer.core().proj, viewer.core().viewport,
context.drag_plane_point, context.drag_plane_normal);
solve_arap_step(context, target_pos, nullptr);
}
else {
benchmark_step++;
context.V_new.row(context.selected_vertex) += increment;
target_pos = context.V_new.row(context.selected_vertex);
auto start = std::chrono::steady_clock::now();
solve_arap_step(context, target_pos, &benchmark_durations);
arap_step_accumulation += std::chrono::steady_clock::now() - start;
}
if (shows_energy)
{
#pragma omp parallel for
for (int i = 0; i < context.V.rows(); i++) context.cells[i].find_rotation(context.V_new, context.halfedges);
energy = context.calculate_energy();
viewer.data().set_colors(context.C);
}
viewer.data().set_vertices(context.V_new);
draw_vertices(viewer, context, false, true, true);
context.needs_draw = false;
}
if (benchmark_flag && benchmark_step >= 50)
{
context.last_selected = context.selected_vertex;
context.is_dragging = false;
context.selected_vertex = -1;
omp_set_num_threads(8);
benchmark_flag = false;
#pragma omp parallel for
for (int i = 0; i < context.V.rows(); ++i) {
context.cells[i].find_rotation(
context.V_new,
context.halfedges
);
}
energy = context.calculate_energy();
const std::filesystem::path path = "benchmark_results.csv";
const bool write_header = !std::filesystem::exists(path) || std::filesystem::file_size(path) == 0;
std::ofstream file(path, std::ios::app);
if (!file.is_open()) {
std::cerr << "Cannot open benchmark CSV\n";
return false;
}
file.imbue(std::locale::classic());
file << std::setprecision(10);
if (write_header) {
file
<< "mesh,algorithm,threads,lambda,"
<< "steps,iterations,"
<< "mesh_precomputation_ms,left_side_ms,setup_ms,"
<< "rotations_ms,rhs_ms,linear_solve_ms,"
<< "deformation_ms,"
<< "arap_energy,smooth_energy,total_energy\n";
}
const double setup_ms = factorization.count() * 1000.0;
const double deformation_ms = arap_step_accumulation.count() * 1000.0;
file
<< context.name << ','
<< (context.algorithm == 0 ? "custom" : "libigl") << ','
<< (context.algorithm == 0 && parallel_flag == true ? 8 : 1) << ','
<< (context.algorithm == 0 ? (context.lambda / 100.0) : 0.0) << ','
<< 50 << ','
<< context.number_of_iterations << ',';
if (context.algorithm == 0) {
file
<< context.elapsed.count() * 1000.0 << ','
<< left_side.count() * 1000.0 << ','
<< setup_ms << ','
<< benchmark_durations.rotations.count() * 1000.0 << ','
<< benchmark_durations.rhs.count() * 1000.0 << ','
<< benchmark_durations.linear_solve.count() * 1000.0 << ',';
}
else {
file
<< ',' << ',' << setup_ms<< ','<< ','<< ','<< ',';
}
file
<< deformation_ms << ','
<< energy[0] << ','
<< energy[1] << ','
<< energy[2] << '\n';
omp_set_dynamic(1);
}
return false;
};
viewer.callback_mouse_up = [&context](igl::opengl::glfw::Viewer& /*viewer*/, int button, int modifier) {
if (button == GLFW_MOUSE_BUTTON_LEFT) {
if(context.is_dragging && context.selected_vertex >= 0) context.last_selected = context.selected_vertex;
context.is_dragging = false;
context.needs_draw = false;
context.selected_vertex = -1;
}
return false;
};
menu.callback_draw_viewer_menu = [&context, &viewer]()
{
if (ImGui::Button("Open Mesh"))
{
ImGuiFileDialog::Instance()->OpenDialog(
"MeshDlg",
"Open Mesh",
".off,.obj,.ply",
"."
);
}
if (ImGuiFileDialog::Instance()->Display("MeshDlg"))
{
if (ImGuiFileDialog::Instance()->IsOk())
{
std::string file = ImGuiFileDialog::Instance()->GetFilePathName();
energy = {0.0, 0.0, 0.0};
context.load_mesh(file);
viewer.data().clear();
viewer.data().set_mesh(context.V_new, context.F);
}
ImGuiFileDialog::Instance()->Close();
}
if(ImGui::RadioButton("None", context.mode == 0))
{
context.mode = 0;
draw_vertices(viewer,context,false,true,true);
}
if(ImGui::RadioButton("Handle Selection", context.mode == 1))
{
context.mode = 1;
draw_vertices(viewer,context,true,true,true);
}
if(ImGui::RadioButton("Anchor Selection", context.mode == 2))
{
context.mode = 2;
draw_vertices(viewer,context,true,true,true);
}
if(ImGui::RadioButton("Handle Removal", context.mode == 3))
{
context.mode = 3;
draw_vertices(viewer,context,false,true,false);
}
if(ImGui::RadioButton("Anchor Removal", context.mode == 4))
{
context.mode = 4;
draw_vertices(viewer,context,false,false,true);
}
if(ImGui::Button("Reset View"))
{
viewer.core().camera_translation.setZero();
viewer.core().align_camera_center(context.V_new, context.F);
}
if(ImGui::Button("Reset Vertices"))
{
context.reset_vertices();
draw_vertices(viewer,context,false,false,false);
}
ImGui::SameLine();
if(ImGui::Button("Reset Mesh"))
{
energy = {0.0, 0.0, 0.0};
context.reset_mesh();
viewer.data().set_vertices(context.V_new);
draw_vertices(viewer,context,false,true,true);
}
if(ImGui::Button("Save Vertices"))context.save_config();
ImGui::SameLine();
if(ImGui::Button("Load Config")){
context.load_config();
draw_vertices(viewer, context, false, true, true);
context.mode = 0;
}
ImGui::Separator();
ImGui::SliderInt("Iterations", &context.number_of_iterations, 1, 100);
if (ImGui::SliderInt("Smoothness factor", &context.lambda, 0, 99))
{
context.build_left_side();
if (context.algorithm == 0 && context.last_selected >= 0)
{
context.selected_vertex = context.last_selected;
Eigen::RowVector3d target = context.V_new.row(context.selected_vertex);
context.factorize_left_side();
solve_arap_step(context, target, nullptr);
#pragma omp parallel for
for(int i = 0; i < context.V.rows(); i++)
context.cells[i].find_rotation(context.V_new, context.halfedges);
energy = context.calculate_energy();
viewer.data().set_vertices(context.V_new);
draw_vertices(viewer, context, false, true, true);
context.selected_vertex = -1;
}
}
if (ImGui::RadioButton("Custom ARAP", context.algorithm == 0)) context.algorithm = 0;
ImGui::SameLine();
if (ImGui::RadioButton("libigl ARAP", context.algorithm == 1)) context.algorithm = 1;
ImGui::Checkbox("Show energy", &shows_energy);
if (ImGui::SliderInt("Color factor", &context.energy_color_coeff, 1, 100));
if(shows_energy) {
ImGui::Text("ARAP Energy %.2f", energy[0]);
ImGui::Text("Smooth Energy %.2f", energy[1]);
ImGui::Text("Total Energy %.2f", energy[2]);
viewer.data().set_colors(context.C);
}
else {
ImGui::Text("ARAP Energy: N/A");
ImGui::Text("Smooth Energy: N/A");
ImGui::Text("Total Energy: N/A");
Eigen::MatrixXd temp = Eigen::MatrixXd::Zero(context.V.rows(), 3);
temp.col(2).setOnes();
viewer.data().set_colors(temp);
}
ImGui::Separator();
ImGui::Checkbox("Parallel benchmark?", ¶llel_flag);
if(ImGui::Button("Start benchmark")){
using Clock = std::chrono::steady_clock;
context.reset_mesh();
context.reset_vertices();
omp_set_dynamic(0);
if(parallel_flag) omp_set_num_threads(8);
else omp_set_num_threads(1);
benchmark_step = 0;
benchmark_durations.reset();
arap_step_accumulation = {};
left_side = {};
factorization = {};
if (context.name == "dino")
{
from = Eigen::RowVector3d(-0.422867, -0.0223482, -0.354753);
to = Eigen::RowVector3d(-0.564244, 0.0120625, 0.307979);
context.selected_vertex = 13022;
context.anchors = {52, 397, 369, 368, 415, 240, 99, 573, 574, 329, 304, 51, 215, 181, 227, 192, 145, 125, 53, 41, 14069, 50, 67, 98, 255, 97, 144, 118, 141, 105, 106, 134, 43, 39, 17, 0, 1, 15, 68, 111, 5, 13, 12, 2, 42, 16, 34, 24, 25, 32, 23, 3, 6, 9, 8, 82, 7, 21, 22, 14, 4, 254, 338, 414, 416, 491, 367, 551, 594, 579, 678, 608, 581, 302, 347, 245, 478, 588, 564, 611, 637, 699, 715, 716, 685, 744, 650, 638, 466, 465, 303, 360, 258, 359, 244, 343, 180, 265, 199, 224, 278, 610, 131, 225, 119, 120, 362, 257, 557, 518, 207, 102, 153, 40, 35, 124, 47, 48, 55, 33, 326, 56, 26, 84, 155, 80, 116, 150, 179, 11, 288, 10, 77, 76, 117, 113, 115, 107, 283, 112, 323, 483, 410, 383, 325, 293, 426, 348, 334, 49, 85, 717, 767, 632, 727, 311, 406, 422, 300, 342, 341, 331, 176, 330, 178, 177, 128, 129, 138, 108, 92, 94, 58, 59, 74, 57, 158, 156, 168, 122, 159, 148, 147, 175, 166, 170, 146, 173, 157, 137, 468, 439, 485, 412, 169, 96, 127, 30, 44, 87, 27, 28, 20, 31, 130, 95, 72, 123, 91, 226, 235, 167, 272, 200, 253, 322, 152, 139, 90, 114, 204, 407, 301, 262, 78, 545, 431, 430, 364, 467, 354, 349, 239, 356, 238, 398, 355, 186, 164, 386, 187, 163, 172, 210, 310, 162, 71, 126, 103, 61, 237, 234, 202, 223, 222, 62, 60, 79, 214, 75, 29, 54, 83, 73, 337, 142, 66, 36, 379, 340, 387, 248, 276, 182, 184, 428, 378, 462, 463, 504, 484, 505, 565, 507, 508, 510, 413, 501, 535, 363, 441};
context.handles = {13022};
}
else if (context.name == "cactus_highres")
{
from = Eigen::RowVector3d(0.482479, 0.519052, 0.890068);
to = Eigen::RowVector3d(0.256509, 0.255571, 0.0717699);
context.selected_vertex = 183;
context.anchors = {619, 1847, 1846, 1845, 1844, 1843, 1842, 1854, 1855, 1853, 1852, 1851, 1850, 1849, 1848, 357, 356, 616, 604, 596, 588, 314, 577, 618, 1838, 1827, 1828, 617, 1839, 1840, 803, 358, 1835, 1834, 1833, 614, 1822, 610, 1810, 331, 332, 1813, 1790, 1755, 584, 1751, 1708, 1707, 576, 1711, 788, 1649, 1706, 779, 1750, 595, 1823, 615, 613, 1821, 1811, 603, 1742, 1782, 1754};
context.handles = {183};
}
else if (context.name == "Armadillo")
{
from = Eigen::RowVector3d(0.748762, 61.3466, -48.8636);
to = Eigen::RowVector3d(2.43878, -24.6411, -37.3089);
context.selected_vertex = 2286;
context.anchors = {21631, 150412, 126012, 150429, 163724, 163722, 120065, 117512, 115556, 113960, 113959, 112393, 107837, 109399, 110944, 122760, 122761, 125453, 128007, 130859, 133577, 139189, 141815, 144395, 93158, 94786, 96372, 97965, 101124, 102806, 104537, 104538, 106260, 107854, 109415, 110962, 113969, 113968, 115563, 117520, 122768, 133584, 133583, 141785, 128015, 136317, 139158, 146794, 150563, 102377, 44474, 91182, 127143, 127139, 127138, 91192, 68055, 125161, 124447, 9952, 9958, 21618, 33035, 44494, 56046, 68043, 102388, 128906, 30813, 30862, 150333, 150325, 125937, 74624, 74642, 99244, 125970, 150371, 5769, 125105, 6126, 150411, 99261, 74646, 49163, 24527, 126006, 21589, 150263, 44144, 4344, 49077, 125350, 24451, 68059, 149805, 23771, 170906, 168516, 163665, 166028, 104260, 48487, 125454, 98611, 98628, 125504, 115749, 9658, 32766, 67834, 91211, 102397, 91201, 79976, 44511, 115610, 140764, 149849, 98646, 74020, 48599, 23822, 105206, 170907, 166105, 163737, 161374, 158985, 156559, 156557, 156555, 158979, 161367, 163728, 163727, 166092, 166091, 166090, 168563, 170949, 122234, 122232, 24268, 49045, 74516, 99119, 99122, 125873, 125874, 150295, 150300, 150310, 9918, 32988, 44156, 55745, 67809, 67813, 79638, 79641, 90791, 102106, 113821, 126816, 138912, 150335, 161468, 161472, 161473, 150565, 139212, 139220, 127122, 114054, 102392, 91202, 80005, 79665, 67839, 67842, 79674, 79688, 79689, 79696, 90872, 90877, 67674, 55806, 44208, 44207, 44202, 44183, 32784, 21304, 32763, 33045, 44506, 56057, 33044, 21633, 21638, 44505, 33042, 56050, 79966, 91179, 91172, 102383, 127117, 127121, 102384, 114045, 114039, 139211, 138923, 150357, 138921, 126840, 114024, 102365, 91159, 68032, 44489, 21611, 21613, 125703, 99275, 73944, 21625, 79975, 49169, 168508, 49122, 124435, 5665, 99216, 49119, 33009, 44479, 21596, 5051, 125953, 32999, 79916, 56002, 21586, 4458, 150324, 9930, 44466, 56005, 56013, 79941, 99260, 56045, 44493, 8167, 73984, 98613, 8473, 44498, 33037, 126076, 74005, 126209, 149819, 48595, 125502, 135989, 105012, 149813, 125472, 163736, 166103, 170903, 168514, 170902, 24503, 24494, 170901, 168511, 166101, 163735, 163734, 163733, 166099, 168510, 170900, 166100, 161371, 158983, 156558, 154123, 161370, 163731, 163730, 166097, 125895, 49121, 125786, 166098, 168509, 170899, 127276, 166096, 168505, 170954, 170953, 123867, 123844, 24354, 24312, 49068, 74535, 99129, 99134, 99139, 125894, 150315, 150320, 125910, 125913, 99182, 74622, 49110, 24427, 24404, 49090, 74582, 99141, 99173, 74586, 74609, 49100, 4254, 123397, 123065, 122966, 3334, 74541, 49076, 24374, 124325, 124705, 125442, 170957, 170895, 170955, 170893, 168503, 170951, 123474, 24309, 49053, 74529, 170892, 166095, 163729, 161369, 158982, 161373, 170904, 23762, 74688, 74679, 74656, 103134, 104199, 49176, 49174, 99264, 9974, 33030, 33026, 33024, 33016, 56020, 56021, 79953, 91155, 102360, 102358, 91124, 79911, 68008, 9933, 124238, 150350, 144396, 144397, 141819, 144400, 144402, 139218, 139193, 133608, 130888, 128033, 128032, 125476, 122785, 120088, 117534, 115574, 112395, 112394, 110945, 115555, 117511, 120063, 120064, 125452, 128006, 133574, 136307, 139148, 141773, 144391, 146822, 149288, 151690, 151691, 151638, 154069, 154070, 151642, 149239, 146831, 146779, 144405, 144353, 141778, 141779, 139154, 139155, 136313, 133581, 130865, 128012, 125460, 122766, 120070, 117541, 113984, 112410, 110960, 109412, 107851, 106257, 104536, 102804, 102805, 107852, 109413, 110961, 112397, 113966, 117518, 120072, 115562, 113967, 112399, 110952, 106259, 101125, 99488, 101123, 102817, 104535, 106255, 107871, 109411, 120093, 122791, 125481, 128037, 130864, 128013, 125462, 122769, 120075, 115564, 113986, 110963, 106261, 104539, 102819, 101130, 101129, 99490, 107853, 120074, 125463, 130868, 136315, 141782, 144357, 146786, 144354, 139153, 136311, 133580, 136343, 139199, 139198, 141824, 141823, 136342, 133610, 133578, 144403, 144401, 146830, 149237, 151640, 146828, 144398, 144399, 146829, 146827, 146826, 149230, 151639, 149229, 146825, 149228, 146824, 144393, 146823, 149289, 154113, 141814, 144394, 139191, 136336, 133604, 128034, 141818, 151641, 149240, 146782, 149242, 154071, 156496, 158914, 161353, 158969, 141816, 139190, 130885, 133605, 136338, 139192, 141817, 130884, 128031, 125456, 122762, 120067, 117514, 117513, 115557, 109400, 113961, 115558, 122763, 139149, 144392, 117522, 122770, 130869, 130870, 133587, 136319, 139162, 141787, 144364, 146795, 133586, 136318, 139161, 144362, 139160, 136316, 139159, 141784, 144360, 149249, 151651, 156507, 128004, 130857, 133572, 136306, 141771, 141812, 144390, 146821, 149287, 146819, 144388, 141811, 136334, 133570, 128030, 125450, 122759, 122758, 120062, 117510, 115554, 136304, 141772, 136309, 130858, 125451, 133573, 128005, 112392, 112391, 112390, 113958, 122783, 170941, 170940, 168547, 168546, 168545, 166122, 163764, 161397, 159014, 159013, 156591, 156590, 154156, 154157, 154159, 154181, 154206, 154209, 156624, 156625, 159043, 161413, 163788, 166129, 168550, 168552, 170943, 166127, 166126, 163766, 163765, 159029, 161396, 161411, 170942, 168549, 168548, 170939, 120631, 121519, 23546, 166123, 163763, 156589, 159009, 154154, 154155, 156593, 159030, 159031, 159032, 161412, 161415, 156612, 166124, 170944, 168557, 166157, 166156, 163794, 163792, 163789, 166125, 23558, 48284, 73883, 48269, 48257, 24228, 161357, 156503, 154079, 151649, 161309, 163717, 168488, 170883, 163716, 163662, 161356, 158918, 156500, 154075, 151646, 149244, 151647, 161304, 154077, 149247, 146788, 146789, 149248, 154078, 156502, 156501, 151648, 149245, 144356, 136312, 146784, 151645, 151644, 154073, 156498, 156497, 158915, 163713, 166079, 168485, 163714, 154074, 163715, 166081, 168487, 99618, 48343, 48341, 23598, 98950, 168486, 170880, 23597, 23584, 48308, 97669, 170879, 166078, 163711, 163712, 158970, 156495, 166077, 163709, 158968, 156547, 156492, 156546, 99815, 48354, 98069, 124989, 149140, 172650, 98583, 49011, 166088, 161364, 158978, 156554, 154121, 154122, 161365, 121736, 23696, 48447, 48367, 100744, 168492, 166086, 163720, 163721, 161360, 158972, 158974, 156550, 154117, 151694, 149253, 151658, 151695, 163723, 168493, 168491, 170886, 161358, 158922, 156548, 154116, 151692, 151655, 151656, 154119, 156552, 161363, 170891, 158976, 158977, 151663, 149259, 151664, 166094, 156551, 154115, 163726, 166093, 161366, 156553, 144361, 141783, 144343, 144359, 149250, 151693, 154118, 146790, 144358, 146791, 146792, 170887, 24237, 74497, 99082, 125808, 150212, 149789, 69935, 149761, 23649, 73929, 98576, 73321, 168489, 166084, 49017, 2946, 115222, 3011, 150225, 99103, 74521, 49048, 125828, 150223, 122406, 9614, 21248, 9643, 99096, 49031, 24244, 74515, 99097, 125823, 150220, 125809, 115059, 49021, 74508, 149754, 74485, 125806, 99067, 125425, 149144, 172668, 98586, 23646, 170884, 163718, 166085, 168490, 170885, 100523, 48366, 166083, 158917, 161303, 166080, 161354, 170882, 3218, 122715, 9893, 21553, 32753, 32729, 122855, 3284, 122671, 21252, 32724, 44122, 44129, 32726, 9892, 21283, 32738, 21267, 21256, 21560, 9928, 124047, 9896, 123650, 5018, 4494, 123851, 9902, 9911, 124024, 9929, 21572, 32990, 44452, 44460, 44465, 32997, 21588, 55999, 32994, 67822, 55751, 102127, 102131, 126835, 114028, 91165, 68029, 56031, 9950, 125111, 7085, 150414, 7725, 33004, 9951, 125287, 126035, 21607, 21606, 21605, 9937, 5971, 150375, 125991, 125975, 150373, 125972, 102042, 161372, 123712, 32709, 21234, 9596, 9368, 21083, 32547, 43937, 43938, 44118, 55725, 55731, 55742, 90789, 67802, 67653, 67641, 55554, 55553, 43913, 43910, 32524, 21069, 21071, 32529, 43916, 43930, 55563, 79521, 79526, 90771, 102094, 113817, 126807, 113806, 102093, 79520, 55557, 32539, 21081, 62871, 163732, 158984, 104447, 23803, 74032, 48645, 83506, 166029, 161311, 161375, 156509, 149257, 151662, 156508, 155953, 115892, 21306, 32786, 32799, 21308, 115902, 149853, 44512, 7957, 21993, 7925, 107675, 106085, 29548, 172681, 161499, 161500, 172709, 124347, 106123, 83606, 99817, 7934, 35420, 35597, 48723, 48711, 48703, 35577, 22255, 106945, 97380, 30879, 129362, 28422, 31780, 124057, 29599, 22293, 22280, 8191, 81558, 106120, 35588, 48707, 22274, 100354, 8189, 35581, 8186, 172707, 31042, 100023, 107707, 31010, 138941, 102171, 55602, 32575, 161838, 129281, 96952, 106548, 161834, 150611, 113835, 102157, 139311, 25836, 129132, 126860, 90836, 67846, 102148, 127152, 150607, 23230, 129106, 9692, 44204, 79672, 150599, 161798, 20925, 129030, 127148, 90831, 55789, 67845, 90835, 127150, 139293, 113829, 150592, 18741, 161765, 139252, 102403, 150590, 161750, 17980, 128312, 128235, 161747, 150588, 139236, 150586, 13773, 6134, 29419, 4979, 150584, 127136, 127137, 114070, 102395, 139233, 150582, 161735, 3231, 123571, 30742, 95514, 21978, 21977, 106194, 81183, 106078, 7882, 35408, 35410, 22222, 8162, 106523, 96585, 30809, 128940, 95872, 106463, 22232, 35557, 107423, 30792, 18283, 35395, 95644, 107482, 8168, 61805, 75268, 75293, 75315, 75331, 8195, 107744, 129447, 161841, 150372, 126886, 113841, 138952, 29610, 99839, 35431, 48481, 7968, 106175, 138960, 101969, 55606, 79541, 101960, 138955, 22026, 84630, 124464, 161519, 150406, 126920, 138968, 161520, 124492, 106284, 100535, 21826, 35243, 48295, 61613, 35435, 7983, 85810, 29678, 150234, 84779, 22039, 61840, 75077, 75345, 88099, 114810, 114764, 129370, 114771, 114815, 114825, 101023, 87946, 87948, 87949, 75102, 61628, 35254, 7747, 96172, 66817, 104780, 28777, 66772, 21844, 48300, 61624, 101000, 101204, 88093, 48733, 35604, 22014, 7980, 61837, 75334, 75332, 48476, 35427, 61826, 48468, 35423, 75333, 75272, 75270, 107271, 107686, 8185, 107292, 107642, 30907, 35565, 35563, 35561, 8180, 99539, 30908, 48693, 8174, 97373, 107563, 48441, 30878, 22062, 161787, 150594, 139270, 139294, 150387, 126897, 113842, 126910, 79709, 32805, 21310, 172669, 98087, 47825, 23171, 83684, 170837, 168438, 158986, 149256, 154124, 168436, 125523, 162690, 9683, 32801, 55805, 67858, 90667, 113854, 150399, 161515, 124162, 113849, 9675, 55776, 114086, 30848, 139226, 127115, 44476, 44488, 56027, 91171, 102382, 114033, 79962, 68035, 44491, 79956, 9652, 113838, 90845, 90863, 102167, 102161, 126875, 161845, 161495, 33816, 129458, 81541, 99632, 106105, 138942, 150393, 172712, 172714, 29624, 106250, 7734, 35249, 7740, 95966, 65981, 104660, 28635, 65797, 94702, 122103, 48312, 61632, 75107, 87959, 101050, 101037, 101029, 114847, 114846, 114837, 114827, 114823, 114790, 114763, 100983, 87900, 100958, 75254, 61767, 61785, 75257, 88087, 101187, 101201, 75269, 48694, 106797, 32574, 21096, 9426, 111590, 149907, 172968, 111204, 56073, 56069, 79981, 114077, 161269, 172722, 29387, 105926, 105957, 106010, 79049, 79357, 99549, 7876, 21970, 35407, 48433, 102275, 91010, 67935, 55884, 56160, 56158, 56152, 68118, 91267, 102465, 114136, 127243, 139378, 150691, 139391, 127257, 114151, 102479, 91287, 80082, 68122, 56142, 44560, 44550, 44317, 21393, 119237, 150037, 150070, 1572, 119900, 9822, 32920, 32928, 44393, 79877, 102300, 113950, 127060, 150503, 150502, 161641, 8018, 127015, 30276, 89777, 102485, 8304, 35653, 62127, 62116, 75539, 75405, 75391, 61886, 35492, 8030, 102394, 106745, 31245, 40802, 139364, 114132, 80052, 56121, 44333, 21428, 9792, 68115, 102457, 127234, 150682, 46854, 31349, 106113, 22375, 48764, 88356, 101431, 101417, 48756, 22356, 109286, 104837, 31313, 129929, 161868, 150676, 107984, 104592, 108267, 8251, 22338, 35618, 48746, 48575, 75417, 62080, 22352, 129991, 161876, 150680, 139374, 161881, 108052, 8274, 22376, 48767, 62121, 48765, 107369, 31384, 48434, 161892, 139382, 127253, 51532, 31402, 108082, 107828, 110387, 8278, 22382, 35648, 48777, 108175, 31456, 130258, 161904, 150706, 139397, 127270, 114158, 150715, 161906, 53700, 130266, 31468, 109215, 108621, 110422, 8293, 22394, 35654, 48778, 62152, 75590, 88401, 101464, 101476, 88404, 62153, 48600, 35666, 22409, 110570, 109892, 108124, 130319, 55766, 150719, 91288, 44354, 32889, 21459, 9804, 1971, 150099, 150088, 150076, 119591, 80070, 80079, 90995, 91029, 91030, 102280, 113944, 127057, 161643, 163, 30336, 107174, 92207, 103701, 8075, 8067, 22138, 35506, 61919, 115239, 142090, 153510, 33749, 51842, 51902, 113429, 50897, 50989, 167248, 31673, 164573, 153390, 141967, 129621, 115073, 88194, 61946, 48635, 22166, 30398, 127294, 161665, 150522, 113976, 102312, 79886, 55979, 32651, 21172, 113767, 149559, 125264, 125259, 98206, 98198, 98178, 98948, 98946, 98945, 74212, 48821, 48816, 24009, 108745, 108428, 170917, 107956, 107763, 23992, 48796, 74181, 98851, 125695, 2004, 120780, 9832, 9837, 2036, 125732, 98932, 48827, 121281, 21497, 24027, 170918, 170919, 24002, 74187, 98880, 74204, 48813, 98918, 150108, 1982, 120268, 125684, 23986, 74176, 125662, 119818, 21461, 44379, 67950, 67949, 55932, 44347, 21434, 119541, 119339, 1416, 9802, 21446, 32904, 44378, 1424, 125646, 125637, 9800, 55894, 79835, 67941, 44340, 44368, 32878, 161883, 108062, 109937, 35647, 75562, 115224, 142082, 164723, 164719, 33711, 33689, 167038, 166982, 166971, 164553, 153312, 129557, 88151, 75529, 88348, 115203, 142065, 164716, 164557, 153318, 141928, 141927, 141946, 101311, 115201, 153485, 169030, 113392, 167441, 167470, 61282, 63159, 70641, 167579, 113190, 51155, 167664, 164587, 141978, 129652, 101345, 88218, 61962, 35527, 22167, 8083, 75470, 101346, 141979, 164606, 167781, 113192, 167582, 76494, 37936, 37907, 38013, 51150, 32106, 153412, 141972, 32323, 51163, 167620, 167592, 79715, 76584, 49779, 112305, 166900, 30119, 37002, 94274, 94173, 151974, 151972, 94950, 94894, 37728, 56090, 37812, 151845, 94856, 37674, 151671, 151770, 151848, 150409, 151675, 151618, 151476, 94002, 37455, 52750, 167284, 50546, 166918, 31024, 164551, 164554, 31213, 50701, 167328, 54033, 167366, 112759, 31205, 112780, 167382, 58658, 112872, 33730, 33746, 169094, 142067, 153488, 164734, 167479, 167428, 167025, 31442, 50720, 112895, 164726, 142071, 153504, 33851, 51096, 115206, 88353, 113194, 164759, 88362, 62088, 129841, 129855, 164750, 113177, 31670, 141947, 115253, 115067, 164561, 169158, 88163, 75435, 61931, 48625, 48626, 61945, 75438, 88188, 101332, 115069, 129599, 129598, 141962, 141948, 153333, 33862, 101315, 101318, 61929, 48602, 75597, 88393, 88381, 75553, 75551, 75550, 75542, 101437, 115227, 129872, 129873, 101454, 88377, 88376, 115210, 101448, 129838, 115204, 115060, 129575, 129559, 115050, 115048, 129553, 141923, 153304, 164543, 153303, 101298, 88135, 88143, 61885, 48570, 101302, 101305, 101306, 35493, 22104, 8012, 102190, 87536, 106661, 29923, 125421, 17357, 161589, 150450, 139008, 126995, 113887, 102213, 90936, 90941, 79580, 67901, 67712, 44033, 32634, 21151, 9489, 113120, 7961, 9823, 125117, 98156, 73498, 47929, 23263, 86050, 170849, 168448, 166037, 163676, 161324, 158942, 156521, 158943, 161326, 161327, 161328, 158945, 158946, 158948, 158992, 158993, 158994, 161385, 166051, 166053, 168463, 168464, 170857, 170858, 90576, 90597, 23322, 48039, 73554, 149554, 149564, 32759, 107367, 107510, 107782, 9272, 21006, 21015, 32464, 43850, 43857, 55500, 67541, 79605, 90733, 113719, 126769, 138690, 138689, 138858, 150275, 150272, 161316, 172593, 122549, 28916, 105030, 105013, 71871, 97176, 97043, 7810, 21904, 21901, 35332, 35324, 48364, 61690, 75167, 88033, 101100, 114925, 129493, 141776, 153200, 164385, 29356, 166409, 50042, 112367, 167104, 167003, 32413, 37064, 94324, 94296, 152016, 152008, 151996, 150483, 149989, 149878, 149469, 151438, 93993, 52962, 167286, 112739, 166951, 153310, 141925, 167471, 142059, 88342, 33786, 113186, 51127, 112364, 50020, 166321, 29248, 164374, 153196, 153199, 129487, 101083, 61970, 35532, 8090, 104191, 92488, 127208, 163967, 159193, 161666, 161684, 150523, 139121, 127089, 113985, 102026, 91089, 79594, 67747, 44085, 32658, 21179, 32452, 43849, 55495, 55498, 79599, 90728, 102040, 113716, 113707, 126760, 126753, 138831, 150268, 150267, 161305, 172580, 127750, 30478, 107267, 70688, 7805, 35311, 48358, 61685, 75147, 88230, 101348, 114918, 129480, 141766, 166312, 167419, 167385, 167250, 31741, 164578, 153406, 141963, 129607, 153408, 164584, 31935, 153411, 129637, 129640, 115074, 88192, 75447, 115076, 88205, 75449, 48630, 35515, 22141, 8066, 31537, 30159, 106995, 35516, 61947, 75465, 61961, 22152, 90366, 107061, 91337, 35526, 48639, 103538, 107041, 126750, 14159, 161914, 126818, 22154, 30263, 139406, 127273, 161623, 6182, 126978, 30288, 107074, 91577, 8079, 35531, 48658, 107078, 161627, 150486, 139043, 114168, 102481, 102260, 113920, 127045, 139061, 150487, 161634, 6181, 30295, 104064, 22173, 35537, 127027, 11531, 161638, 139078, 113928, 67944, 113930, 127049, 150498, 127025, 30304, 107106, 92189, 79817, 79830, 102270, 113927, 139073, 150497, 161635, 127048, 107180, 92888, 104386, 127037, 150501, 22177, 8101, 30441, 139092, 91053, 55956, 21496, 55961, 102302, 113964, 127077, 139110, 102306, 79880, 55966, 32931, 21505, 9503, 22488, 150147, 2731, 121577, 32648, 44066, 55658, 9520, 113672, 22855, 125244, 149551, 113663, 21176, 32655, 44070, 79588, 127441, 30445, 107219, 93251, 104422, 93774, 168775, 166334, 139124, 113703, 102029, 90720, 79598, 127078, 127620, 30471, 107246, 92315, 139088, 127065, 113955, 91062, 67967, 113962, 127073, 139104, 139102, 150518, 161658, 161644, 149579, 147114, 127061, 91049, 79873, 55948, 150116, 120379, 67947, 79852, 102276, 127052, 139079, 21463, 125744, 9827, 44381, 91045, 113933, 127053, 79855, 55934, 32907, 21464, 150121, 2234, 21489, 91069, 91073, 102308, 67970, 44399, 9845, 32936, 67973, 79888, 91087, 102319, 91081, 55973, 9509, 125221, 125187, 73546, 48022, 48830, 23311, 88914, 170856, 168462, 168530, 163686, 161333, 156572, 156571, 163681, 166042, 107128, 74140, 125606, 1068, 117540, 21367, 44263, 55837, 90959, 113900, 127007, 150471, 23647, 30010, 88034, 102240, 48573, 22332, 107960, 129914, 161854, 150669, 139353, 114111, 102447, 80038, 32861, 9766, 1178, 125622, 48774, 107649, 168524, 161329, 74152, 149976, 117831, 21376, 44269, 67928, 90978, 113910, 127026, 150481, 161614, 23658, 30041, 35484, 48542, 62040, 35463, 101542, 87149, 106631, 29851, 125408, 139011, 126998, 102220, 90951, 79788, 55833, 32849, 23940, 170913, 166041, 168451, 172961, 74128, 125593, 149443, 665, 9490, 44250, 90953, 161608, 126148, 35627, 48752, 35625, 22858, 150474, 127002, 102223, 79787, 67908, 44240, 21152, 113122, 125140, 23274, 170850, 166040, 163678, 48761, 125611, 21369, 44266, 55850, 67922, 90974, 102247, 139026, 107963, 104292, 35495, 22106, 30020, 139020, 102227, 67910, 21366, 98805, 98807, 118974, 55853, 91250, 114120, 150674, 102449, 68096, 55862, 21390, 149977, 98827, 74156, 9769, 56109, 80051, 130217, 107411, 48772, 48760, 107991, 55646, 47927, 166038, 163677, 170854, 107447, 118938, 48775, 168525, 168526, 168527, 168528, 168529, 170922, 23357, 73556, 9516, 117585, 120127, 122832, 125519, 125518, 128078, 130917, 130914, 133638, 136368, 139228, 141847, 144429, 149298, 151706, 154135, 158944, 156526, 154136, 146838, 144430, 144431, 141848, 139230, 136369, 133639, 115623, 115600, 114005, 112431, 110982, 109434, 107877, 109419, 106266, 109435, 110983, 112433, 114007, 115602, 117565, 120129, 122834, 128081, 130945, 133658, 136396, 139249, 141866, 144450, 146865, 149330, 151738, 154141, 154137, 154138, 149300, 146863, 144432, 141850, 139231, 133640, 130921, 122833, 117564, 128080, 130944, 136372, 139232, 141852, 144433, 151709, 149296, 144428, 141844, 139248, 136394, 133655, 128075, 128073, 120146, 117601, 120122, 115643, 115619, 112447, 110993, 109457, 109448, 109432, 107876, 106275, 106265, 125522, 128082, 133659, 141867, 144451, 146884, 149348, 151761, 154171, 156573, 149328, 141849, 151710, 154139, 98249, 98251, 125314, 148954, 172506, 172490, 172520, 108067, 9308, 125277, 98228, 98219, 48044, 90748, 170860, 166057, 163690, 159002, 156605, 156603, 154172, 158999, 161387, 166055, 168465, 23367, 48057, 48074, 73612, 107887, 107905, 21016, 9277, 73623, 48092, 23379, 91281, 91131, 170862, 168468, 163692, 161337, 161336, 168470, 122751, 125443, 127996, 130850, 133564, 136297, 139179, 141767, 144346, 146811, 149273, 154104, 156536, 158959, 161344, 161343, 163696, 163695, 163694, 161341, 158955, 156532, 156533, 154101, 151677, 149271, 146809, 144378, 141800, 139177, 136325, 136327, 133594, 130876, 127994, 125441, 122749, 122750, 127997, 130851, 133566, 136300, 139180, 141803, 146814, 151683, 154107, 156540, 158962, 161347, 163699, 166064, 168472, 170865, 166063, 163698, 161345, 156537, 154105, 151681, 146812, 146778, 144381, 141768, 149275, 151682, 156539, 158960, 166060, 166059, 154097, 151673, 149268, 146845, 146807, 144410, 141832, 141798, 139207, 136352, 133592, 130874, 130875, 128020, 128023, 125467, 122777, 133567, 144382, 149277, 151684, 154108, 159004, 161389, 166066, 166065, 168471, 168469, 161339, 161338, 158951, 156580, 156581, 158954, 161342, 158957, 158958, 154103, 151679, 149272, 146810, 144380, 141802, 136328, 130848, 151678, 156535, 158956, 161340, 159000, 128077, 130943, 133637, 128076, 125516, 122830, 120125, 115622, 114025, 114026, 112449, 32493, 43862, 43860, 90729, 55514, 32490, 21019, 108135, 55691, 67767, 79607, 44093, 32494, 21040, 9335, 9336, 172620, 149071, 124852, 97991, 97999, 73708, 73725, 48178, 48180, 23452, 94359, 124850, 124818, 124757, 125363, 125353, 125349, 125348, 98301, 98288, 125346, 149601, 172541, 108140, 9325, 21038, 9310, 172552, 148978, 98330, 149010, 172557, 108234, 108653, 172576, 149026, 149058, 172602, 108714, 9337, 108846, 98370, 98381, 73684, 73690, 48161, 23435, 23449, 94172, 170871, 170830, 82064, 23464, 23463, 48183, 73726, 98383, 125373, 125365, 149624, 149610, 35806, 172623, 48166, 161348, 166110, 170924, 92435, 112010, 24072, 48838, 73624, 24082};
context.handles = {2286};
}
else
{
std::cout << "No benchmark was set for this mesh. \n";
return;
}
for(int i:context.anchors) context.vertex_type[i] = 2;
for(int i:context.handles) context.vertex_type[i] = 1;
increment = (to - from).transpose() / 50.0;
if (context.algorithm == 0) {
auto start = Clock::now();
context.build_left_side();
left_side = Clock::now() - start;
}
auto start = Clock::now();
prepare_drag_session(context, viewer.core().view);
factorization = Clock::now() - start;
benchmark_flag = true;
}
};
}