-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
29 lines (28 loc) · 812 Bytes
/
main.cpp
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
#include <iostream>
#include "MyHEMesh.h"
#include <ctime>
// #include <gperftools/profiler.h>
int main()
{
MyHEMesh mesh;
std::string read, save;
std::getline(std::cin >> std::ws, read);
std::getline(std::cin >> std::ws, save);
int target;
std::cin >> target;
// int v1, v2;
// std::cin >> v1 >> v2;
mesh.ReadFromOBJ(read);
clock_t start, end;
start = clock();
// ProfilerStart((save + ".prof").c_str());
mesh.ContractModel(target);
// mesh.ContractModel(10000);
// mesh.ContractInitModel(1922, 3640);
// mesh.ContractModel(mesh.GetFaceNum()/10);
// mesh.ContractVPair(v1, v2);
// ProfilerStop();
end = clock();
std::cout << "contract time = " << double(end-start) / CLOCKS_PER_SEC << "s" << std::endl;
mesh.SaveToOBJ(save);
}