-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMeshRender.cpp
More file actions
30 lines (29 loc) · 800 Bytes
/
MeshRender.cpp
File metadata and controls
30 lines (29 loc) · 800 Bytes
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
#include "MeshRender.h"
void MeshRender::draw()
{
mesh->draw(showmesh, showpolygon, showsurface, resolution);
viewer.callback_key_down = [&](igl::opengl::glfw::Viewer& viewer, unsigned char key, int modifier) ->bool
{
//std::cout << "Key: " << key << " " << (unsigned int)key << std::endl;
if (key == 32) {
/*viewer.data().clear();
insert_loop(viewer);*/
}
else if (key == 'M') {
viewer.data().clear();
showmesh = !showmesh;
mesh->draw(showmesh, showpolygon, showsurface);
}
else if (key == 'P') {
viewer.data().clear();
showpolygon = !showpolygon;
mesh->draw(showmesh, showpolygon, showsurface);
}
else if (key == 'S') {
viewer.data().clear();
showsurface = !showsurface;
mesh->draw(showmesh, showpolygon, showsurface);
}
return false;
};
}