Debian Codegraph @

octovis/src/main.cpp

raw symbols SCIP
1 /*
2 * This file is part of OctoMap - An Efficient Probabilistic 3D Mapping
3 * Framework Based on Octrees
4 * http://octomap.github.io
5 *
6 * Copyright (c) 2009-2014, K.M. Wurm and A. Hornung, University of Freiburg
7 * All rights reserved. License for the viewer octovis: GNU GPL v2
8 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 *
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 * for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
23 */
24
25 #include <QtGui>
26 #include <QApplication>
27 #include <octovis/ViewerGui.h>
28 #include <stdlib.h> //strtol
29
30 int main(int argc, char *argv[]) {
31
32 std::string filename = "";
33 int depth = 0;
34 if (argc == 1) {
35 std::cout << "Usage: " << argv[0] << " [mapfile] [tree depth cutoff]\n";
36 std::cout << "Where the optional [tree depth cutoff] is an integer from 1 to 16\n";
37 }
38 if (argc >= 2) { filename = std::string(argv[1]); }
39 if (argc >= 3) { depth = std::strtol(argv[2], NULL, 10); }//zero on parse error
40
41 QApplication app(argc, argv);
42
43 octomap::ViewerGui gui(filename, NULL, depth);
44 gui.show();
45 return app.exec();
46 }