tumvis.cpp 793 Bytes
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
#include "tgt/camera.h"
#include "tgt/qt/qtapplication.h"
#include "tgt/qt/qtcanvas.h"

#include "tumvispainter.h"

7
using namespace TUMVis;
schultezub's avatar
schultezub committed
8

schultezub's avatar
schultezub committed
9
10
11
12
13
14
15
/**
 * TUMVis main function, application entry point
 *
 * \param   argc    number of passed arguments
 * \param   argv    vector of arguments
 * \return  0 if program exited successfully
 **/
16
17
18
int main(int argc, char** argv) {  
    tgt::QtApplication* app = new tgt::QtApplication(argc, argv);
    tgt::QtCanvas* canvas = new tgt::QtCanvas("TUMVis");
schultezub's avatar
schultezub committed
19

20
    app->addCanvas(canvas);  
schultezub's avatar
schultezub committed
21
22
    app->init();
    
schultezub's avatar
schultezub committed
23

24
25
26
27
    tgt::Camera camera;  
    canvas->setCamera(&camera);  
    TumVisPainter painter(canvas);  
    canvas->setPainter(&painter);  
schultezub's avatar
schultezub committed
28

29
    app->run();  
schultezub's avatar
schultezub committed
30

31
32
    delete canvas;  
    delete app;  
schultezub's avatar
schultezub committed
33

34
    return 0;  
schultezub's avatar
schultezub committed
35
}