-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorialPlan.cpp
More file actions
35 lines (26 loc) · 1.12 KB
/
tutorialPlan.cpp
File metadata and controls
35 lines (26 loc) · 1.12 KB
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
#include <QApplication>
#include <Inventor/Qt/SoQt.h>
#include "qt_visualization/QtWindow.h"
#include "TutorialPlanSystem.h"
//Initialize the global singleton variable of the main visualization window with null.
QtWindow* QtWindow::singleton = NULL;
int
main(int argc, char** argv)
{
// Create the qt application object needed for the visualization.
QApplication application(argc, argv);
QObject::connect(&application, SIGNAL(lastWindowClosed()), &application, SLOT(quit()));
// The QtWindow class contains the main window needed for the visualization.
QtWindow* window;
// Initialization of the coin 3D libraries which are needed for the visualization of the robot scenes.
SoQt::init(window);
SoDB::init();
// Create the TutorialPlanSystem class which contains our roblib plan system.
boost::shared_ptr<TutorialPlanSystem> system(new TutorialPlanSystem());
// Create our main visualization window and pass our TutorialPlanSystem to the constructor.
window = QtWindow::instance(system.get());
// Show the main visualization window to the user.
window->show();
// Run the qt application.
return application.exec();
}