-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (28 loc) · 900 Bytes
/
main.cpp
File metadata and controls
36 lines (28 loc) · 900 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
31
32
33
34
35
/**<!-------------------------------------------------------------------->
@file main.cpp
@author Travis Fischer (fisch0920@gmail.com)
@date Spring 2009
<!-------------------------------------------------------------------->**/
#include "Frontend.h"
#include <MiltonApp.h>
int main(int argc, char **argv) {
MiltonApp app(argc, argv, "Morphomesh");
{
OpenGLCanvas *canvas = new OpenGLCanvas(false);
if (argc < 2) {
canvas->registerInteractionListener(new Frontend(canvas));
} else {
const std::string meshFile = argv[1];
if (argc >= 3) {
skel = MeshSkeleton::fromFile(argv[2]);
if (!skel) {
perror("couldn't open skeleton file");
return 1;
}
}
canvas->registerInteractionListener(new Frontend(canvas, meshFile));
}
app.addCanvas(canvas);
}
return app.exec();
}