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 
40 
41 #include <chrono>
42 #include <stdio.h>
43 #include <stdlib.h>
44 
45 #include <ncursesw/ncurses.h>
46 #include <memory>
47 
48 
50 
51 using namespace lvr2;
52 
53 
54 int main(int argc, char** argv)
55 {
56  ascii_viewer::Options opt(argc, argv);
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 
static ModelPtr readModel(std::string filename)
A class to parse the program options for the reconstruction executable.
std::shared_ptr< Model > ModelPtr
Definition: Model.hpp:80
std::shared_ptr< AsciiRenderer > AsciiRendererPtr
int main(int argc, char **argv)
char ** argv


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 Mon Feb 28 2022 22:46:08