-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
50 lines (46 loc) · 1 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "curvature.hpp"
#include "cnthd/mesh.hpp"
#include <iostream>
template <typename T, std::size_t N>
std::ostream& operator<<(std::ostream& os, const std::array<T, N>& arr)
{
if (arr.empty())
{
os << "{}";
}
else{
os << "{";
for (const auto& a: arr)
{
os << a << ", ";
}
os << "\b\b}";
}
return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec)
{
if (vec.empty())
{
os << "{}";
}
else{
os << "{";
for (const auto& v: vec)
{
os << v << ", ";
}
os << "\b\b}";
}
return os;
}
int main()
{
// const cnthd::Mesh mesh = cnthd::read_obj("./cnthd/test/data/DDGSpring2016/sphere_small.obj");
const cnthd::Mesh mesh = cnthd::read_obj("./cnthd/test/data/DDGSpring2016/bunny.obj");
const auto [K, H] = curvature(mesh);
std::cout << K << std::endl;
std::cout << H << std::endl;
return 0;
}