-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewer.cpp
More file actions
31 lines (23 loc) · 746 Bytes
/
Copy pathviewer.cpp
File metadata and controls
31 lines (23 loc) · 746 Bytes
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
#include "viewer.hpp"
using std::cout;
using std::endl;
namespace shared {
ViewerTest::ViewerTest()
{
}
void ViewerTest::testView(OpenRAVE::EnvironmentBasePtr &penv) {
std::string viewername = "qtcoin";
boost::thread thviewer(boost::bind(&ViewerTest::SetViewer, this, penv, viewername));
//thviewer.join();
}
void ViewerTest::SetViewer(OpenRAVE::EnvironmentBasePtr &penv, const std::string &viewername)
{
OpenRAVE::ViewerBasePtr viewer = OpenRAVE::RaveCreateViewer(penv, viewername);
BOOST_ASSERT(!!viewer);
// attach it to the environment:
penv->Add(viewer);
// finally call the viewer's infinite loop (this is why a separate thread is needed)
bool showgui = true;
viewer->main(showgui);
}
}