added nav-mesh support to indoor-map

some fixes/changes
This commit is contained in:
2018-01-16 12:43:45 +01:00
parent 281ef3f7dc
commit 4dda7e656b
16 changed files with 524 additions and 60 deletions

View File

@@ -87,8 +87,9 @@ MainController::MainController() {
connect(mw->getActionWidget(), SIGNAL(onSave()), this, SLOT(onSave()));
// 3D view change
connect(mw, SIGNAL(onShow3DFloorplan()), this, SLOT(onShow3DFloorplan()));
connect(mw, SIGNAL(onShow3DGrid()), this, SLOT(onShow3DGrid()));
connect(mw, SIGNAL(onShow3DFloorplan(bool)), this, SLOT(onSetShow3DFloorplan(bool)));
connect(mw, SIGNAL(onShow3DGrid(bool)), this, SLOT(onSetShow3DGrid(bool)));
connect(mw, SIGNAL(onShow3DNavMesh(bool)), this, SLOT(onSetShow3DNavMesh(bool)));
// 3D grid view config
connect(mw, &MainWindow::onGridNodeColorImp, [&] () {mw->getMapView3D()->getGridRenderer()->setNodeColorMode(GridRendererColorMode::SHOW_NODE_IMPORTANCE);} );
@@ -99,8 +100,9 @@ MainController::MainController() {
//mapModel->load("../IndoorMap/maps/SHL38_no_elev.xml");
//mapModel->load("/apps/testmap.xml");
//mapModel->load("/apps/map24b.xml");
//mapModel->load("/apps/SHL41.xml");
mapModel->load("/apps/SHL41.xml");
mapModel->load("/mnt/vm/paper/diss/data/maps/SHL41_nm.xml");
//mapModel->load("/apps/paper/diss/data/maps/map_elevator2.xml");
//mapModel->load("/apps/paper/diss/data/maps/map_issue6.xml");
@@ -145,12 +147,16 @@ void MainController::onLayerVisibilityChanged(MapLayer *layer, const bool visibl
(void) visible;
}
void MainController::onShow3DFloorplan() {
mw->getMapView3D()->showFloorplan();
void MainController::onSetShow3DFloorplan(bool show) {
mw->getMapView3D()->setShowFloorplan(show);
}
void MainController::onShow3DGrid() {
mw->getMapView3D()->showGrid();
void MainController::onSetShow3DGrid(bool show) {
mw->getMapView3D()->setShowGrid(show);
}
void MainController::onSetShow3DNavMesh(bool show) {
mw->getMapView3D()->setShowNavMesh(show);
}
void MainController::layerSelected(QModelIndex idx) {