src
tools
lvr2_ascii_viewer
src/tools/lvr2_ascii_viewer/Main.cpp
Go to the documentation of this file.
1
34
#include <boost/filesystem.hpp>
35
36
#include "
lvr2/io/ModelFactory.hpp
"
37
#include "
Options.hpp
"
38
39
#include "
ascii_viewer/AsciiRenderer.hpp
"
40
41
#include <chrono>
42
#include <stdio.h>
43
#include <stdlib.h>
44
45
#include <ncursesw/ncurses.h>
46
#include <memory>
47
48
49
#include "
ascii_viewer/CursesHelper.hpp
"
50
51
using namespace
lvr2
;
52
53
54
int
main
(
int
argc
,
char
**
argv
)
55
{
56
ascii_viewer::Options
opt(
argc
,
argv
);
57
ModelPtr
m =
ModelFactory::readModel
(opt.
inputFile
());
58
59
if
(m->m_mesh)
60
{
61
AsciiRendererPtr
renderer;
62
renderer.reset(
new
AsciiRenderer
(m->m_mesh) );
63
bool
finish =
false
;
64
while
(!finish)
65
{
66
int
key;
67
while
( (key = getch() ) != ERR )
68
{
69
if
( key == 27 )
70
{
71
finish =
true
;
72
break
;
73
}
74
renderer->processKey(key);
75
}
76
renderer->render();
77
}
78
renderer.reset();
79
}
else
{
80
// print error
81
std::cout << opt.
inputFile
() <<
" is not a triangle mesh!"
<< std::endl;
82
}
83
84
return
0;
85
}
86
87
CursesHelper.hpp
main
int main(int argc, char **argv)
Definition:
src/tools/lvr2_ascii_viewer/Main.cpp:54
ascii_viewer::Options
A class to parse the program options for the reconstruction executable.
Definition:
src/tools/lvr2_ascii_viewer/Options.hpp:52
ascii_viewer::Options::inputFile
string inputFile() const
Definition:
src/tools/lvr2_ascii_viewer/Options.hpp:63
Options.hpp
lvr2::AsciiRenderer
Definition:
AsciiRenderer.hpp:22
AsciiRenderer.hpp
argc
int argc
Definition:
tests_high_five_parallel.cpp:27
lvr2
Definition:
BaseBufferManipulators.hpp:39
lvr2::ModelPtr
std::shared_ptr< Model > ModelPtr
Definition:
Model.hpp:80
lvr2::ModelFactory::readModel
static ModelPtr readModel(std::string filename)
Definition:
ModelFactory.cpp:65
ModelFactory.hpp
lvr2::AsciiRendererPtr
std::shared_ptr< AsciiRenderer > AsciiRendererPtr
Definition:
AsciiRenderer.hpp:103
argv
char ** argv
Definition:
tests_high_five_parallel.cpp:28
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz
, Alexander Mock
, Lars Kiesow
, Lukas Kalbertodt
, Tristan Igelbrink
, Johan M. von Behren
, Dominik Feldschnieders
, Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24