diff --git a/IndoorMap.pro b/IndoorMap.pro
index fe373c8..7103d93 100644
--- a/IndoorMap.pro
+++ b/IndoorMap.pro
@@ -42,7 +42,8 @@ SOURCES += \
params/MetaEditWidget.cpp \
params/MetaEditModel.cpp \
mapview/2D/MapView2D.cpp \
- misc/LINTView.cpp
+ misc/LINTView.cpp \
+ mapview/3DNavMesh/QNavMeshSettings.cpp
HEADERS += MainWindow.h \
@@ -165,13 +166,18 @@ HEADERS += MainWindow.h \
mapview/2D/tools/ToolNewBeacon.h \
mapview/2D/tools/ToolNewGroundTruth.h \
mapview/2D/tools/ToolNewPOI.h \
- mapview/3D/MV3DElementElevator.h
+ mapview/3D/MV3DElementElevator.h \
+ mapview/3DNavMesh/NavMeshView.h \
+ mapview/3DNavMesh/NavMeshRenderer.h \
+ mapview/3DNavMesh/NavMeshModel.h \
+ mapview/3DNavMesh/QNavMeshSettings.h
FORMS += MainWindow.ui
SOURCES += \
- ../Indoor/lib/tinyxml/tinyxml2.cpp
+ ../Indoor/lib/tinyxml/tinyxml2.cpp \
+ ../Indoor/lib/Recast/*.cpp
RESOURCES += \
res.qrc
diff --git a/MainController.cpp b/MainController.cpp
index 94662af..7843b7d 100644
--- a/MainController.cpp
+++ b/MainController.cpp
@@ -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) {
diff --git a/MainController.h b/MainController.h
index 67520e5..6a1acd2 100644
--- a/MainController.h
+++ b/MainController.h
@@ -65,8 +65,9 @@ public slots:
private slots:
- void onShow3DFloorplan();
- void onShow3DGrid();
+ void onSetShow3DFloorplan(bool show);
+ void onSetShow3DGrid(bool show);
+ void onSetShow3DNavMesh(bool show);
private:
diff --git a/MainWindow.cpp b/MainWindow.cpp
index bd39270..224f3c4 100644
--- a/MainWindow.cpp
+++ b/MainWindow.cpp
@@ -114,14 +114,16 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// ui->layTree->addWidget(actionWidget);
- // show mode
- QActionGroup* grpMode = new QActionGroup(this);
- grpMode->addAction(ui->actShow3DFloorplan);
- grpMode->addAction(ui->actShow3DGrid);
+// // show mode (radio buttons)
+// QActionGroup* grpMode = new QActionGroup(this);
+// grpMode->addAction(ui->actShow3DFloorplan);
+// grpMode->addAction(ui->actShow3DGrid);
+// grpMode->addAction(ui->actShow3DNavMesh);
connect(ui->actShow2D, SIGNAL(triggered(bool)), this, SIGNAL(onShow2D()));
- connect(ui->actShow3DGrid, SIGNAL(triggered(bool)), this, SIGNAL(onShow3DGrid()));
- connect(ui->actShow3DFloorplan, SIGNAL(triggered(bool)), this, SIGNAL(onShow3DFloorplan()));
+ connect(ui->actShow3DGrid, SIGNAL(triggered(bool)), this, SIGNAL(onShow3DGrid(bool)));
+ connect(ui->actShow3DFloorplan, SIGNAL(triggered(bool)), this, SIGNAL(onShow3DFloorplan(bool)));
+ connect(ui->actShow3DNavMesh, SIGNAL(triggered(bool)), this, SIGNAL(onShow3DNavMesh(bool)));
// node coloring
diff --git a/MainWindow.h b/MainWindow.h
index f69e8c5..2314a1f 100644
--- a/MainWindow.h
+++ b/MainWindow.h
@@ -40,8 +40,9 @@ public:
signals:
void onShow2D();
- void onShow3DFloorplan();
- void onShow3DGrid();
+ void onShow3DFloorplan(bool show);
+ void onShow3DGrid(bool show);
+ void onShow3DNavMesh(bool show);
void onGridShowEdges(bool);
void onGridNodeColorImp();
void onGridNodeColorType();
diff --git a/MainWindow.ui b/MainWindow.ui
index 88da9ec..c0a76bd 100644
--- a/MainWindow.ui
+++ b/MainWindow.ui
@@ -23,30 +23,31 @@
0
0
777
- 26
+ 30