diff --git a/README.rst b/README.rst index 265844e3..3540f7e5 100644 --- a/README.rst +++ b/README.rst @@ -171,22 +171,6 @@ Both the LASlib and IlmBase libraries may be built using the separate third party build system in ``thirdparty/external/CMakeLists.txt``. -Build options -~~~~~~~~~~~~~ -To read the .las and .laz file formats, you'll need one of the following: - -* LASlib >= something-recent (known to work with 150406). This is the default - because it's reasonably fast and has no additional library dependencies. -* PDAL >= something-recent (known to work with 0.1.0-3668-gff73c08). You may - select PDAL by setting the build option ``DISPLAZ_USE_PDAL=TRUE``. Note that - building PDAL also requires several libraries including boost, laszip and - GDAL. - -If you only want to read ply files (for example, to use the scripting language -bindings), and don't care about las you may set the build option -``DISPLAZ_USE_LAS=FALSE``. - - Supported Systems ----------------- diff --git a/shaders/las_points_selection.glsl b/shaders/las_points_selection.glsl index 653934eb..c6e57ffe 100644 --- a/shaders/las_points_selection.glsl +++ b/shaders/las_points_selection.glsl @@ -77,6 +77,8 @@ void main() else if (classification == 2) classColor = vec3(0.33, 0.18, 0.0); else if (classification == 3) classColor = vec3(1.0, 0.0, 0.0); else if (classification == 4) classColor = vec3(0.0, 1.0, 1.0); + else if (classification == 5) classColor = vec3(0.295, 0.0, 0.5); + else if (classification == 6) classColor = vec3(1.0, 0.63, 0.5); pointColor = classColor + vec3(0,0,float(rr pointScreenSizeLimit) + { + float w = markerWidth; + if (pointScreenSize < 2*pointScreenSizeLimit) + { + // smoothly turn on the markers as we get close enough to see them + w = mix(1, w, pointScreenSize/pointScreenSizeLimit - 1); + } + vec2 p = 2*(gl_PointCoord - 0.5); + p.y = -p.y; + float r = length(p); + const float lineRad = 1.0; + bool inLine = r*(1-w) < max(0.5*lineNormalLen, 2/pointScreenSize) && + abs(dot(lineNormal,p))*(1-w)*pointScreenSize < lineRad; + if (!inLine) + discard; + } + fragColor = vec4(pointColor, 1); +} + +#endif + diff --git a/src/gui/PointViewerMainWindow.cpp b/src/gui/PointViewerMainWindow.cpp index ed6309ac..5eaf4de7 100644 --- a/src/gui/PointViewerMainWindow.cpp +++ b/src/gui/PointViewerMainWindow.cpp @@ -154,7 +154,7 @@ PointViewerMainWindow::PointViewerMainWindow(const QGLFormat& format) viewMenu->addSeparator(); QAction* drawBoundingBoxes = viewMenu->addAction(tr("Draw Bounding bo&xes")); drawBoundingBoxes->setCheckable(true); - drawBoundingBoxes->setChecked(true); + drawBoundingBoxes->setChecked(false); QAction* drawCursor = viewMenu->addAction(tr("Draw 3D &Cursor")); drawCursor->setCheckable(true); drawCursor->setChecked(true); diff --git a/src/render/View3D.cpp b/src/render/View3D.cpp index 024e39f0..ee40467b 100644 --- a/src/render/View3D.cpp +++ b/src/render/View3D.cpp @@ -38,7 +38,7 @@ View3D::View3D(GeometryCollection* geometries, const QGLFormat& format, QWidget m_selectionClassFrom(-1), m_selectionClassTo(1), m_backgroundColor(60, 50, 50), - m_drawBoundingBoxes(true), + m_drawBoundingBoxes(false), m_drawCursor(true), m_drawAxes(true), m_drawGrid(false), @@ -645,50 +645,58 @@ void View3D::wheelEvent(QWheelEvent* event) void View3D::keyPressEvent(QKeyEvent *event) { + #include // Centre camera on current cursor location if(event->key() == Qt::Key_C) { m_camera.setCenter(m_cursorPos); } - else if(event->key() == Qt::Key_0) + else if(!(event->modifiers()& Qt::AltModifier)) { - m_selectionClassTo = 0; - } - else if(event->key() == Qt::Key_1) - { - m_selectionClassTo = 1; - } - else if(event->key() == Qt::Key_2) - { - m_selectionClassTo = 2; - } - else if(event->key() == Qt::Key_3) - { - m_selectionClassTo = 3; - } - else if(event->key() == Qt::Key_4) - { - m_selectionClassTo = 4; - } - else if(event->key() == Qt::Key_5) - { - m_selectionClassTo = 5; - } - else if(event->key() == Qt::Key_6) - { - m_selectionClassTo = 6; - } - else if(event->key() == Qt::Key_7) - { - m_selectionClassTo = 7; - } - else if(event->key() == Qt::Key_8) - { - m_selectionClassTo = 8; - } - else if(event->key() == Qt::Key_9) - { - m_selectionClassTo = 9; + if(event->key() == Qt::Key_0) + { + m_selectionClassTo = 0; + } + else if(event->key() == Qt::Key_1) + { + m_selectionClassTo = 1; + } + else if(event->key() == Qt::Key_2) + { + m_selectionClassTo = 2; + } + else if(event->key() == Qt::Key_3) + { + m_selectionClassTo = 3; + } + else if(event->key() == Qt::Key_4) + { + m_selectionClassTo = 4; + } + else if(event->key() == Qt::Key_5) + { + m_selectionClassTo = 5; + } + else if(event->key() == Qt::Key_6) + { + m_selectionClassTo = 6; + } + else if(event->key() == Qt::Key_7) + { + m_selectionClassTo = 7; + } + else if(event->key() == Qt::Key_8) + { + m_selectionClassTo = 8; + } + else if(event->key() == Qt::Key_9) + { + m_selectionClassTo = 9; + } + else if(event->modifiers() == 0) + { + event->ignore(); + } } else if(event->key() == Qt::Key_S && (event->modifiers() & Qt::ControlModifier)) { @@ -700,6 +708,56 @@ void View3D::keyPressEvent(QKeyEvent *event) m_geometries->get()[sel[i].row()]->saveFile(fileName); } } + else if(event->modifiers() & Qt::AltModifier){ + if(event->key() == Qt::Key_0) + { + m_selectionClassFrom = 0; + } + else if(event->key() == Qt::Key_1) + { + m_selectionClassFrom = 1; + } + else if(event->key() == Qt::Key_2) + { + m_selectionClassFrom = 2; + } + else if(event->key() == Qt::Key_3) + { + m_selectionClassFrom = 3; + } + else if(event->key() == Qt::Key_4) + { + m_selectionClassFrom = 4; + } + else if(event->key() == Qt::Key_5) + { + m_selectionClassFrom = 5; + } + else if(event->key() == Qt::Key_6) + { + m_selectionClassFrom = 6; + } + else if(event->key() == Qt::Key_7) + { + m_selectionClassFrom = 7; + } + else if(event->key() == Qt::Key_8) + { + m_selectionClassFrom = 8; + } + else if(event->key() == Qt::Key_9) + { + m_selectionClassFrom = 9; + } + else if(event->key() == Qt::Key_R) + { + m_selectionClassFrom = 1; + } + else + { + event->ignore(); + } + } else { event->ignore();