diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 0b32eca8..85e51ad0 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -1,7 +1,7 @@ # This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). # For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) -name: CI +name: ROS-CI # This determines when this workflow is run on: [push, pull_request] # on all pushes and PRs @@ -11,21 +11,13 @@ jobs: strategy: matrix: env: - - {ROS_DISTRO: melodic} - - {ROS_DISTRO: noetic} - - {ROS_DISTRO: foxy, PRERELEASE: true} - - {ROS_DISTRO: rolling, PRERELEASE: true} + - {ROS_DISTRO: noetic, PRERELEASE: true} + - {ROS_DISTRO: iron, PRERELEASE: true} + #- {ROS_DISTRO: rolling} # 2024-03-12 temporarily deactivate until transitin to Ubuntu Noble is complete env: - CCACHE_DIR: /github/home/.ccache # Enable ccache BUILDER: colcon runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - # This step will fetch/store the directory used by ccache before/after the ci run - - uses: actions/cache@v2 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - # Run industrial_ci + - uses: actions/checkout@v4 - uses: 'ros-industrial/industrial_ci@master' env: ${{ matrix.env }} diff --git a/CMakeLists.txt b/CMakeLists.txt index e0e5feb6..ff020404 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,8 @@ ADD_SUBDIRECTORY( octomap ) if(BUILD_OCTOVIS_SUBPROJECT) ADD_SUBDIRECTORY( octovis ) -endif() +endif() -if(BUILD_DYNAMICETD3D_SUBPROJECT) +if(BUILD_DYNAMICETD3D_SUBPROJECT) ADD_SUBDIRECTORY( dynamicEDT3D ) -endif() - - +endif() diff --git a/README.md b/README.md index 94ccfbdb..bb57de67 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,15 @@ To compile the complete package, run: Binaries and libs will end up in the directories `bin` and `lib` of the top-level directory where you started the build. +Alternatively, you can build and install octomap using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install octomap + +The octomap port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. See [octomap README](octomap/README.md) and [octovis README](octovis/README.md) for further details and hints on compiling, especially under Windows. diff --git a/dynamicEDT3D/CMakeLists.txt b/dynamicEDT3D/CMakeLists.txt index 6b6a5abe..7edfdde9 100644 --- a/dynamicEDT3D/CMakeLists.txt +++ b/dynamicEDT3D/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2) +CMAKE_MINIMUM_REQUIRED(VERSION 3.5) PROJECT(dynamicEDT3D) include(CTest) @@ -6,8 +6,8 @@ include(GNUInstallDirs) # version (e.g. for packaging) set(DYNAMICEDT3D_MAJOR_VERSION 1) -set(DYNAMICEDT3D_MINOR_VERSION 9) -set(DYNAMICEDT3D_PATCH_VERSION 8) +set(DYNAMICEDT3D_MINOR_VERSION 10) +set(DYNAMICEDT3D_PATCH_VERSION 0) set(DYNAMICEDT3D_VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION}) set(DYNAMICEDT3D_SOVERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}) @@ -76,19 +76,20 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/ament_index/resource_index/packa #TODO: this conflicts with the octomap uninstall #it is not only a target name problem, also both will use the same manifest file #in the same binary directory -#configure_file( -# "${PROJECT_SOURCE_DIR}/CMakeModules/CMakeUninstall.cmake.in" -# "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" -# IMMEDIATE @ONLY) -# -#add_custom_target(uninstall -# COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) +if(NOT TARGET uninstall) + configure_file( + "${PROJECT_SOURCE_DIR}/CMakeModules/CMakeUninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) +endif() # Export the package for use from the build-tree # (this registers the build-tree with a global CMake-registry) export(PACKAGE dynamicEDT3D) - + # Create a dynamicEDT3DConfig.cmake file for the use from the build tree set(DYNAMICEDT3D_INCLUDE_DIRS "${INCLUDE_DIRS}") set(DYNAMICEDT3D_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") @@ -122,7 +123,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE( #install(EXPORT FooBarLibraryDepends DESTINATION # "${INSTALL_DATA_DIR}/FooBar/CMake" # COMPONENT dev) - + # Create a dynamicEDT3DConfig.cmake file for the use from the install tree # and install it set(DYNAMICEDT3D_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}") @@ -145,7 +146,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE( install(FILES "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake" - "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" + "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" DESTINATION "${CMAKE_INSTALL_DATADIR}/dynamicEDT3D") # Write pkgconfig-file: @@ -157,7 +158,7 @@ install_pkg_config_file(dynamicEDT3D VERSION ${DYNAMICEDT3D_VERSION}) -# Documentation +# Documentation FIND_PACKAGE(Doxygen) IF(DOXYGEN_FOUND) ADD_CUSTOM_TARGET(docs_dynamicEDT3D ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dynamicEDT3D.dox @@ -169,7 +170,7 @@ ENDIF(DOXYGEN_FOUND) INCLUDE(CPackSettings) # Finished: -MESSAGE ("\n") +MESSAGE (STATUS "\n") MESSAGE (STATUS "Compile dynamicEDT3D using: make") MESSAGE (STATUS "Install dynamicEDT3D using: make install") MESSAGE (STATUS " (be sure to set the correct CMAKE_INSTALL_PREFIX before)") diff --git a/dynamicEDT3D/CMakeModules/CompilerSettings.cmake b/dynamicEDT3D/CMakeModules/CompilerSettings.cmake index 51f1ebee..e2e6b4f5 100644 --- a/dynamicEDT3D/CMakeModules/CompilerSettings.cmake +++ b/dynamicEDT3D/CMakeModules/CompilerSettings.cmake @@ -4,13 +4,13 @@ IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release) ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) -MESSAGE ("\n") +MESSAGE (STATUS "\n") MESSAGE (STATUS "${PROJECT_NAME} building as ${CMAKE_BUILD_TYPE}") # OCTOMAP_OMP = enable OpenMP # SET(OCTOMAP_OMP 1 CACHE BOOL "Enable/disable OpenMP") # IF($ENV{OCTOMAP_OMP}) -# SET(OCTOMAP_OMP $ENV{OCTOMAP_OMP}) +# SET(OCTOMAP_OMP $ENV{OCTOMAP_OMP}) # MESSAGE(STATUS "Found OCTOMAP_OMP=${OCTOMAP_OMP}") # ENDIF($ENV{OCTOMAP_OMP}) @@ -21,7 +21,7 @@ IF (CMAKE_COMPILER_IS_GNUCC) SET (CMAKE_CXX_FLAGS_RELEASE "-O3 -funroll-loops -DNDEBUG") SET (CMAKE_CXX_FLAGS_DEBUG "-O0 -g") # Shared object compilation under 64bit (vtable) - ADD_DEFINITIONS(-fPIC) + ADD_DEFINITIONS(-fPIC) # IF(OCTOMAP_OMP) # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") # SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -fopenmp") diff --git a/dynamicEDT3D/package.xml b/dynamicEDT3D/package.xml index 346c5635..7c33a3eb 100644 --- a/dynamicEDT3D/package.xml +++ b/dynamicEDT3D/package.xml @@ -1,6 +1,6 @@ dynamic_edt_3d - 1.9.8 + 1.10.0 The dynamicEDT3D library implements an inrementally updatable Euclidean distance transform (EDT) in 3D. It comes with a wrapper to use the OctoMap 3D representation and hooks into the change detection of the OctoMap library to propagate changes to the EDT. Christoph Sprunk diff --git a/octomap/CHANGELOG.txt b/octomap/CHANGELOG.txt index 04ec13be..a5fca3e4 100644 --- a/octomap/CHANGELOG.txt +++ b/octomap/CHANGELOG.txt @@ -1,3 +1,21 @@ +v1.10.0: 2024-03-19 +=================== +- CMake: Fix duplicate uninstall target (#406) +- Fix errors with recent compilers and C++17/20 standard (#394) +- Fix ScanGraph.h c++20 compilation error (#398) +- Add smaller than operator for vectors (#330) +- Add vcpkg installation instructions to Readme (#382) +- Fix test dependencies in CMakeLists (#374) +- replace deprecated std::iterator by defining required types (#373) +- octovis: fix issue with saving not showing any dialog (#414) +- octovis: Fix deprecated QString and glext redefinition warning (#375) +- octovis: Declare missing dependency on opengl (#408) +- ROS: Updates to compile cleanly on ROS 2 Rolling on Ubuntu 24.04 (#415) +- ROS: Remove ccache for ROS-Industrial CI yml (#413) +- ROS: Remove EOL ROS distros from CI actions + + + v1.9.8: 2022-05-12 ================== - Also set lowercase octomap_* variables in CMake config (#369) diff --git a/octomap/CMakeLists.txt b/octomap/CMakeLists.txt index 395f9cd7..87a78e9c 100644 --- a/octomap/CMakeLists.txt +++ b/octomap/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2) +CMAKE_MINIMUM_REQUIRED(VERSION 3.5) PROJECT( octomap ) include(CTest) @@ -6,8 +6,8 @@ include(GNUInstallDirs) # version (e.g. for packaging) set(OCTOMAP_MAJOR_VERSION 1) -set(OCTOMAP_MINOR_VERSION 9) -set(OCTOMAP_PATCH_VERSION 8) +set(OCTOMAP_MINOR_VERSION 10) +set(OCTOMAP_PATCH_VERSION 0) set(OCTOMAP_VERSION ${OCTOMAP_MAJOR_VERSION}.${OCTOMAP_MINOR_VERSION}.${OCTOMAP_PATCH_VERSION}) set(OCTOMAP_SOVERSION ${OCTOMAP_MAJOR_VERSION}.${OCTOMAP_MINOR_VERSION}) if(COMMAND cmake_policy) @@ -77,18 +77,20 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/share/ament_index/resource_index/packages install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/ament_index/resource_index/packages/${PROJECT_NAME} DESTINATION share/ament_index/resource_index/packages) # uninstall target -configure_file( - "${PROJECT_SOURCE_DIR}/CMakeModules/CMakeUninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) +if(NOT TARGET uninstall) + configure_file( + "${PROJECT_SOURCE_DIR}/CMakeModules/CMakeUninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) -add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) +endif() # Export the package for use from the build-tree # (this registers the build-tree with a global CMake-registry) export(PACKAGE octomap) - + # Create a octomap-config.cmake file for the use from the build tree set(OCTOMAP_INCLUDE_DIRS "${INCLUDE_DIRS}") set(OCTOMAP_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") @@ -147,7 +149,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE( install(FILES "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake" - "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake" + "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake" DESTINATION "${CMAKE_INSTALL_DATADIR}/octomap") # Write pkgconfig-file: @@ -158,7 +160,7 @@ install_pkg_config_file(octomap REQUIRES VERSION ${OCTOMAP_VERSION}) -# Documentation +# Documentation FIND_PACKAGE(Doxygen) IF(DOXYGEN_FOUND) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/octomap.dox.in ${CMAKE_CURRENT_BINARY_DIR}/octomap.dox @ONLY) @@ -171,7 +173,7 @@ ENDIF(DOXYGEN_FOUND) INCLUDE(CPackSettings) # Finished: -MESSAGE ("\n") +MESSAGE (STATUS "\n") MESSAGE (STATUS "Compile octomap using: make") MESSAGE (STATUS "Install octomap using: make install") MESSAGE (STATUS " (be sure to set the correct CMAKE_INSTALL_PREFIX before)") diff --git a/octomap/CMakeModules/CompilerSettings.cmake b/octomap/CMakeModules/CompilerSettings.cmake index f4bab3e9..bae0cc48 100644 --- a/octomap/CMakeModules/CompilerSettings.cmake +++ b/octomap/CMakeModules/CompilerSettings.cmake @@ -4,7 +4,7 @@ IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release) ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) -MESSAGE ("\n") +MESSAGE (STATUS "\n") MESSAGE (STATUS "${PROJECT_NAME} building as ${CMAKE_BUILD_TYPE}") # COMPILER FLAGS diff --git a/octomap/include/octomap/AbstractOcTree.h b/octomap/include/octomap/AbstractOcTree.h index e396d28a..c1e93235 100644 --- a/octomap/include/octomap/AbstractOcTree.h +++ b/octomap/include/octomap/AbstractOcTree.h @@ -51,7 +51,7 @@ namespace octomap { friend class StaticMapInit; public: AbstractOcTree(); - virtual ~AbstractOcTree() {}; + virtual ~AbstractOcTree() {} /// virtual constructor: creates a new object of same type virtual AbstractOcTree* create() const = 0; diff --git a/octomap/include/octomap/AbstractOccupancyOcTree.h b/octomap/include/octomap/AbstractOccupancyOcTree.h index 240aedec..dd38571f 100644 --- a/octomap/include/octomap/AbstractOccupancyOcTree.h +++ b/octomap/include/octomap/AbstractOccupancyOcTree.h @@ -52,7 +52,7 @@ namespace octomap { class AbstractOccupancyOcTree : public AbstractOcTree { public: AbstractOccupancyOcTree(); - virtual ~AbstractOccupancyOcTree() {}; + virtual ~AbstractOccupancyOcTree() {} //-- IO diff --git a/octomap/include/octomap/ColorOcTree.h b/octomap/include/octomap/ColorOcTree.h index 03f8b904..5026a07b 100644 --- a/octomap/include/octomap/ColorOcTree.h +++ b/octomap/include/octomap/ColorOcTree.h @@ -192,7 +192,7 @@ namespace octomap { * StaticMemberInitializer, causing this tree failing to register. * Needs to be called from the constructor of this octree. */ - void ensureLinking() {}; + void ensureLinking() {} }; /// static member to ensure static initialization (only once) static StaticMemberInitializer colorOcTreeMemberInit; diff --git a/octomap/include/octomap/CountingOcTree.h b/octomap/include/octomap/CountingOcTree.h index f7ab115c..2b06cc7e 100644 --- a/octomap/include/octomap/CountingOcTree.h +++ b/octomap/include/octomap/CountingOcTree.h @@ -110,7 +110,7 @@ namespace octomap { * StaticMemberInitializer, causing this tree failing to register. * Needs to be called from the constructor of this octree. */ - void ensureLinking() {}; + void ensureLinking() {} }; /// static member to ensure static initialization (only once) static StaticMemberInitializer countingOcTreeMemberInit; diff --git a/octomap/include/octomap/OcTree.h b/octomap/include/octomap/OcTree.h index dcd5ac79..725ec762 100644 --- a/octomap/include/octomap/OcTree.h +++ b/octomap/include/octomap/OcTree.h @@ -59,7 +59,7 @@ namespace octomap { */ OcTree(std::string _filename); - virtual ~OcTree(){}; + virtual ~OcTree(){} /// virtual constructor: creates a new object of same type /// (Covariant return type requires an up-to-date compiler) @@ -89,7 +89,7 @@ namespace octomap { * StaticMemberInitializer, causing this tree failing to register. * Needs to be called from the constructor of this octree. */ - void ensureLinking() {}; + void ensureLinking() {} }; /// to ensure static initialization (only once) diff --git a/octomap/include/octomap/OcTreeBase.h b/octomap/include/octomap/OcTreeBase.h index d53b4056..1e600494 100644 --- a/octomap/include/octomap/OcTreeBase.h +++ b/octomap/include/octomap/OcTreeBase.h @@ -43,7 +43,7 @@ namespace octomap { template class OcTreeBase : public OcTreeBaseImpl { public: - OcTreeBase(double res) : OcTreeBaseImpl(res) {}; + OcTreeBase(double res) : OcTreeBaseImpl(res) {} /// virtual constructor: creates a new object of same type /// (Covariant return type requires an up-to-date compiler) diff --git a/octomap/include/octomap/OcTreeBaseImpl.h b/octomap/include/octomap/OcTreeBaseImpl.h index 74711c2d..7109d9cc 100644 --- a/octomap/include/octomap/OcTreeBaseImpl.h +++ b/octomap/include/octomap/OcTreeBaseImpl.h @@ -244,7 +244,7 @@ namespace octomap { virtual size_t memoryUsage() const; /// \return Memory usage of a single octree node - virtual inline size_t memoryUsageNode() const {return sizeof(NODE); }; + virtual inline size_t memoryUsageNode() const {return sizeof(NODE); } /// \return Memory usage of a full grid of the same size as the OcTree in bytes (for comparison) /// \note this can be larger than the adressable memory - size_t may not be enough to hold it! @@ -324,12 +324,12 @@ namespace octomap { typedef leaf_iterator iterator; /// @return beginning of the tree as leaf iterator - iterator begin(unsigned char maxDepth=0) const {return iterator(this, maxDepth);}; + iterator begin(unsigned char maxDepth=0) const {return iterator(this, maxDepth);} /// @return end of the tree as leaf iterator - const iterator end() const {return leaf_iterator_end;}; // TODO: RVE? + const iterator end() const {return leaf_iterator_end;} // TODO: RVE? /// @return beginning of the tree as leaf iterator - leaf_iterator begin_leafs(unsigned char maxDepth=0) const {return leaf_iterator(this, maxDepth);}; + leaf_iterator begin_leafs(unsigned char maxDepth=0) const {return leaf_iterator(this, maxDepth);} /// @return end of the tree as leaf iterator const leaf_iterator end_leafs() const {return leaf_iterator_end;} diff --git a/octomap/include/octomap/OcTreeDataNode.h b/octomap/include/octomap/OcTreeDataNode.h index febe0384..1ecdf808 100644 --- a/octomap/include/octomap/OcTreeDataNode.h +++ b/octomap/include/octomap/OcTreeDataNode.h @@ -100,9 +100,9 @@ namespace octomap { OCTOMAP_DEPRECATED(bool hasChildren() const); /// @return value stored in the node - T getValue() const{return value;}; + T getValue() const{return value;} /// sets value to be stored in the node - void setValue(T v) {value = v;}; + void setValue(T v) {value = v;} // file IO: diff --git a/octomap/include/octomap/OcTreeIterator.hxx b/octomap/include/octomap/OcTreeIterator.hxx index 66ae63f8..64cbdd7a 100644 --- a/octomap/include/octomap/OcTreeIterator.hxx +++ b/octomap/include/octomap/OcTreeIterator.hxx @@ -39,8 +39,15 @@ * const with respect to the tree. This file is included within * OcTreeBaseImpl.h, you should probably not include this directly. */ - class iterator_base : public std::iterator{ + template + class iterator_base{ public: + using iterator_category = std::forward_iterator_tag; + using value_type = NodeType; + using difference_type = NodeType; + using pointer = NodeType*; + using reference = NodeType&; + struct StackElement; /// Default ctor, only used for the end-iterator iterator_base() : tree(NULL), maxDepth(0){} @@ -95,7 +102,7 @@ maxDepth = other.maxDepth; stack = other.stack; return *this; - }; + } /// Ptr operator will return the current node in the octree which the /// iterator is referring to @@ -204,16 +211,16 @@ * } * @endcode */ - class tree_iterator : public iterator_base { + class tree_iterator : public iterator_base { public: - tree_iterator() : iterator_base(){} + tree_iterator() : iterator_base(){} /** * Constructor of the iterator. * * @param ptree OcTreeBaseImpl on which the iterator is used on * @param depth Maximum depth to traverse the tree. 0 (default): unlimited */ - tree_iterator(OcTreeBaseImpl const* ptree, uint8_t depth=0) : iterator_base(ptree, depth) {}; + tree_iterator(OcTreeBaseImpl const* ptree, uint8_t depth=0) : iterator_base(ptree, depth) {} /// postfix increment operator of iterator (it++) tree_iterator operator++(int){ @@ -260,9 +267,9 @@ * @endcode * */ - class leaf_iterator : public iterator_base { + class leaf_iterator : public iterator_base { public: - leaf_iterator() : iterator_base(){} + leaf_iterator() : iterator_base(){} /** * Constructor of the iterator. @@ -270,7 +277,7 @@ * @param ptree OcTreeBaseImpl on which the iterator is used on * @param depth Maximum depth to traverse the tree. 0 (default): unlimited */ - leaf_iterator(OcTreeBaseImpl const* ptree, uint8_t depth=0) : iterator_base(ptree, depth) { + leaf_iterator(OcTreeBaseImpl const* ptree, uint8_t depth=0) : iterator_base(ptree, depth) { // tree could be empty (= no stack) if (this->stack.size() > 0){ // skip forward to next valid leaf node: @@ -280,7 +287,7 @@ } } - leaf_iterator(const leaf_iterator& other) : iterator_base(other) {}; + leaf_iterator(const leaf_iterator& other) : iterator_base(other) {} /// postfix increment operator of iterator (it++) leaf_iterator operator++(int){ @@ -332,9 +339,9 @@ * } * @endcode */ - class leaf_bbx_iterator : public iterator_base { + class leaf_bbx_iterator : public iterator_base { public: - leaf_bbx_iterator() : iterator_base() {}; + leaf_bbx_iterator() : iterator_base() {} /** * Constructor of the iterator. The bounding box corners min and max are * converted into an OcTreeKey first. @@ -351,7 +358,7 @@ * @param depth Maximum depth to traverse the tree. 0 (default): unlimited */ leaf_bbx_iterator(OcTreeBaseImpl const* ptree, const point3d& min, const point3d& max, uint8_t depth=0) - : iterator_base(ptree, depth) + : iterator_base(ptree, depth) { if (this->stack.size() > 0){ assert(ptree); @@ -379,7 +386,7 @@ * @param depth Maximum depth to traverse the tree. 0 (default): unlimited */ leaf_bbx_iterator(OcTreeBaseImpl const* ptree, const OcTreeKey& min, const OcTreeKey& max, uint8_t depth=0) - : iterator_base(ptree, depth), minKey(min), maxKey(max) + : iterator_base(ptree, depth), minKey(min), maxKey(max) { // tree could be empty (= no stack) if (this->stack.size() > 0){ @@ -389,7 +396,7 @@ } } - leaf_bbx_iterator(const leaf_bbx_iterator& other) : iterator_base(other) { + leaf_bbx_iterator(const leaf_bbx_iterator& other) : iterator_base(other) { minKey = other.minKey; maxKey = other.maxKey; } @@ -425,15 +432,15 @@ return *this; - }; + } protected: void singleIncrement(){ - typename iterator_base::StackElement top = this->stack.top(); + typename iterator_base::StackElement top = this->stack.top(); this->stack.pop(); - typename iterator_base::StackElement s; + typename iterator_base::StackElement s; s.depth = top.depth +1; key_type center_offset_key = this->tree->tree_max_val >> s.depth; // push on stack in reverse order diff --git a/octomap/include/octomap/OcTreeStamped.h b/octomap/include/octomap/OcTreeStamped.h index 21cf6463..3fa648c3 100644 --- a/octomap/include/octomap/OcTreeStamped.h +++ b/octomap/include/octomap/OcTreeStamped.h @@ -116,7 +116,7 @@ namespace octomap { * StaticMemberInitializer, causing this tree failing to register. * Needs to be called from the constructor of this octree. */ - void ensureLinking() {}; + void ensureLinking() {} }; /// to ensure static initialization (only once) static StaticMemberInitializer ocTreeStampedMemberInit; diff --git a/octomap/include/octomap/ScanGraph.h b/octomap/include/octomap/ScanGraph.h index 91c26719..7652362d 100644 --- a/octomap/include/octomap/ScanGraph.h +++ b/octomap/include/octomap/ScanGraph.h @@ -60,7 +60,7 @@ namespace octomap { ~ScanNode(); - bool operator == (const ScanNode& other) { + bool operator == (const ScanNode& other) const { return (id == other.id); } @@ -87,7 +87,7 @@ namespace octomap { : first(_first), second(_second), constraint(_constraint), weight(1.0) { } ScanEdge() {} - bool operator == (const ScanEdge& other) { + bool operator == (const ScanEdge& other) const { return ( (*first == *(other.first) ) && ( *second == *(other.second) ) ); } @@ -115,7 +115,7 @@ namespace octomap { public: - ScanGraph() {}; + ScanGraph() {} ~ScanGraph(); /// Clears all nodes and edges, and will delete the corresponding objects diff --git a/octomap/include/octomap/math/Vector3.h b/octomap/include/octomap/math/Vector3.h index 8bc4546e..185f940b 100644 --- a/octomap/include/octomap/math/Vector3.h +++ b/octomap/include/octomap/math/Vector3.h @@ -255,7 +255,18 @@ namespace octomath { } return true; } - + + inline bool operator< (const Vector3 &other) const { + for (unsigned int i=0; i<3; i++){ + if (operator()(i) < other(i)) + return true; + else if (operator()(i) == other(i)) + continue; + else + return false; + } + } + /// @return length of the vector ("L2 norm") inline double norm () const { return sqrt(norm_sq()); diff --git a/octomap/package.xml b/octomap/package.xml index 900b6eb0..733ce768 100644 --- a/octomap/package.xml +++ b/octomap/package.xml @@ -1,6 +1,6 @@ octomap - 1.9.8 + 1.10.0 The OctoMap library implements a 3D occupancy grid mapping approach, providing data structures and mapping algorithms in C++. The map implementation is based on an octree. See http://octomap.github.io for details. diff --git a/octomap/src/Pointcloud.cpp b/octomap/src/Pointcloud.cpp index a6d4a745..87c9e05e 100644 --- a/octomap/src/Pointcloud.cpp +++ b/octomap/src/Pointcloud.cpp @@ -38,7 +38,7 @@ #if defined(_MSC_VER) || defined(_LIBCPP_VERSION) #include - #if __cplusplus > 199711L + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) || __cplusplus >= 201103L) #include #endif #else @@ -213,7 +213,7 @@ namespace octomap { #if defined(_MSC_VER) || defined(_LIBCPP_VERSION) samples.reserve(this->size()); samples.insert(samples.end(), this->begin(), this->end()); - #if __cplusplus > 199711L + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) || __cplusplus >= 201103L) std::random_device r; std::mt19937 urbg(r()); std::shuffle(samples.begin(), samples.end(), urbg); diff --git a/octomap/src/compare_octrees.cpp b/octomap/src/compare_octrees.cpp index 0ab8c26b..c02ceea8 100644 --- a/octomap/src/compare_octrees.cpp +++ b/octomap/src/compare_octrees.cpp @@ -132,7 +132,7 @@ int main(int argc, char** argv) { else kld +=log(p1/p2)*p1 + log((1-p1)/(1-p2))*(1-p1); -#if __cplusplus >= 201103L +#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) || __cplusplus >= 201103L) if (std::isnan(kld)){ #else if (isnan(kld)){ diff --git a/octomap/src/testing/CMakeLists.txt b/octomap/src/testing/CMakeLists.txt index eae2876d..5dc1d952 100644 --- a/octomap/src/testing/CMakeLists.txt +++ b/octomap/src/testing/CMakeLists.txt @@ -50,4 +50,6 @@ if(BUILD_TESTING) ADD_TEST (NAME test_mapcollection COMMAND test_mapcollection ${PROJECT_SOURCE_DIR}/share/data/mapcoll.txt) ADD_TEST (NAME test_color_tree COMMAND test_color_tree) ADD_TEST (NAME test_bbx COMMAND test_bbx) + + SET_TESTS_PROPERTIES (ReadGraph PROPERTIES DEPENDS InsertScan) endif() diff --git a/octovis/CMakeLists.txt b/octovis/CMakeLists.txt index 37afa04e..84fa3675 100644 --- a/octovis/CMakeLists.txt +++ b/octovis/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2) +CMAKE_MINIMUM_REQUIRED(VERSION 3.5) PROJECT( octovis ) include(CTest) @@ -6,8 +6,8 @@ include(GNUInstallDirs) # # version (e.g. for packaging) set(OCTOVIS_MAJOR_VERSION 1) -set(OCTOVIS_MINOR_VERSION 9) -set(OCTOVIS_PATCH_VERSION 8) +set(OCTOVIS_MINOR_VERSION 10) +set(OCTOVIS_PATCH_VERSION 0) set(OCTOVIS_VERSION ${OCTOVIS_MAJOR_VERSION}.${OCTOVIS_MINOR_VERSION}.${OCTOVIS_PATCH_VERSION}) set(OCTOVIS_SOVERSION ${OCTOVIS_MAJOR_VERSION}.${OCTOVIS_MINOR_VERSION}) # get rid of a useless warning: @@ -61,20 +61,21 @@ set(INSTALL_TARGETS_DEFAULT_ARGS ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) -# Builds the "octovis" viewer based on OpenGL and +# Builds the "octovis" viewer based on OpenGL and # libQGLViewer, if dependencies available SET( BUILD_VIEWER 0) option(OCTOVIS_QT5 "Link Octovis against Qt5?" ON) # Look for required libraries: +set(OpenGL_GL_PREFERENCE LEGACY) FIND_PACKAGE(OpenGL) if(NOT OCTOVIS_QT5) FIND_PACKAGE(Qt4) endif(NOT OCTOVIS_QT5) -IF (OpenGL-NOTFOUND OR Qt4-NOTFOUND) - MESSAGE ( "OpenGL and QT4 are required for octovis but could not be found.") +IF (OpenGL-NOTFOUND OR Qt4-NOTFOUND) + MESSAGE ( "OpenGL and QT4 are required for octovis but could not be found.") ELSE() FIND_PACKAGE(QGLViewer) IF(QGLViewer_FOUND) @@ -89,12 +90,12 @@ ENDIF() IF(BUILD_VIEWER) MESSAGE(STATUS "\n") MESSAGE(STATUS "viewer octovis will be built") - + set(INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include") INCLUDE_DIRECTORIES(${INCLUDE_DIRS}) - + INCLUDE( CMakeLists_src.txt ) - + # Create an octovis-config.cmake file for the use from the build tree set(OCTOVIS_INCLUDE_DIRS "${INCLUDE_DIRS}") set(OCTOVIS_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") @@ -125,7 +126,7 @@ IF(BUILD_VIEWER) # not used right now (export depends?) #set(OCTOMAP_CMAKE_DIR "${PROJECT_BINARY_DIR}") - + # Create a octovis-config.cmake file for the use from the install tree # and install it set(OCTOVIS_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}") @@ -148,7 +149,7 @@ IF(BUILD_VIEWER) install(FILES "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config.cmake" - "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake" + "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake" DESTINATION "${CMAKE_INSTALL_DATADIR}/octovis") # #installation: @@ -162,10 +163,9 @@ IF(BUILD_VIEWER) # Allows Colcon to find non-Ament packages when using workspace underlays file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/share/ament_index/resource_index/packages/${PROJECT_NAME} "") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/ament_index/resource_index/packages/${PROJECT_NAME} DESTINATION share/ament_index/resource_index/packages) - + ELSE() MESSAGE ( "Unfortunately, the viewer (octovis) can not be built because some requirements are missing.") MESSAGE ( "This will not affect the compilation of the stand-alone library and tools (octomap)") MESSAGE ( "See README.txt or http://octomap.sf.net for further information.\n") ENDIF() - diff --git a/octovis/CMakeModules/CompilerSettings.cmake b/octovis/CMakeModules/CompilerSettings.cmake index 759902f9..51f689b0 100644 --- a/octovis/CMakeModules/CompilerSettings.cmake +++ b/octovis/CMakeModules/CompilerSettings.cmake @@ -4,13 +4,13 @@ IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release) ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) -MESSAGE ("\n") +MESSAGE (STATUS "\n") MESSAGE (STATUS "${PROJECT_NAME} building as ${CMAKE_BUILD_TYPE}") # OCTOMAP_OMP = enable OpenMP # SET(OCTOMAP_OMP 1 CACHE BOOL "Enable/disable OpenMP") # IF($ENV{OCTOMAP_OMP}) -# SET(OCTOMAP_OMP $ENV{OCTOMAP_OMP}) +# SET(OCTOMAP_OMP $ENV{OCTOMAP_OMP}) # MESSAGE(STATUS "Found OCTOMAP_OMP=${OCTOMAP_OMP}") # ENDIF($ENV{OCTOMAP_OMP}) diff --git a/octovis/include/octovis/OcTreeDrawer.h b/octovis/include/octovis/OcTreeDrawer.h index 34d719a3..5d444057 100644 --- a/octovis/include/octovis/OcTreeDrawer.h +++ b/octovis/include/octovis/OcTreeDrawer.h @@ -62,14 +62,14 @@ namespace octomap { void setAlternativeDrawing(bool flag){m_alternativeDrawing = flag;} void enableOcTree(bool enabled = true); - void enableOcTreeCells(bool enabled = true) { m_update = true; m_drawOccupied = enabled; }; - void enableFreespace(bool enabled = true) { m_update = true; m_drawFree = enabled; }; - void enableSelection(bool enabled = true) { m_update = true; m_drawSelection = enabled; }; - void setMax_tree_depth(unsigned int max_tree_depth) { m_update = true; m_max_tree_depth = max_tree_depth;}; + void enableOcTreeCells(bool enabled = true) { m_update = true; m_drawOccupied = enabled; } + void enableFreespace(bool enabled = true) { m_update = true; m_drawFree = enabled; } + void enableSelection(bool enabled = true) { m_update = true; m_drawSelection = enabled; } + void setMax_tree_depth(unsigned int max_tree_depth) { m_update = true; m_max_tree_depth = max_tree_depth;} // set new origin (move object) void setOrigin(octomap::pose6d t); - void enableAxes(bool enabled = true) { m_update = true; m_displayAxes = enabled; }; + void enableAxes(bool enabled = true) { m_update = true; m_displayAxes = enabled; } protected: //void clearOcTree(); diff --git a/octovis/include/octovis/SceneObject.h b/octovis/include/octovis/SceneObject.h index 240c4650..d0298ab0 100644 --- a/octovis/include/octovis/SceneObject.h +++ b/octovis/include/octovis/SceneObject.h @@ -57,7 +57,7 @@ namespace octomap { public: SceneObject(); - virtual ~SceneObject(){}; + virtual ~SceneObject(){} /** * Actual draw function which will be called to visualize the object @@ -67,7 +67,7 @@ namespace octomap { /** * Clears the object's representation (will be called when it gets invalid) */ - virtual void clear(){}; + virtual void clear(){} public: //! the color mode has to be set before calling OcTreDrawer::setMap() @@ -95,8 +95,8 @@ namespace octomap { */ class ScanGraphDrawer : public SceneObject { public: - ScanGraphDrawer(): SceneObject(){}; - virtual ~ScanGraphDrawer(){}; + ScanGraphDrawer(): SceneObject(){} + virtual ~ScanGraphDrawer(){} /** * Notifies drawer of a new or changed ScanGraph, so that the internal diff --git a/octovis/include/octovis/ViewerSettings.h b/octovis/include/octovis/ViewerSettings.h index 2d9e94e3..55708682 100644 --- a/octovis/include/octovis/ViewerSettings.h +++ b/octovis/include/octovis/ViewerSettings.h @@ -40,12 +40,12 @@ class ViewerSettings : public QDialog public: ViewerSettings(QWidget *parent = 0); ~ViewerSettings(); - double getResolution(){return ui.resolution->value(); }; - void setResolution(double resolution){ui.resolution->setValue(resolution);}; - unsigned int getLaserType(){return ui.laserType->currentIndex(); }; - void setLaserType(int type){ui.laserType->setCurrentIndex(type); }; - double getMaxRange(){return ui.maxRange->value(); }; - void setMaxRange(double range){ui.maxRange->setValue(range); }; + double getResolution(){return ui.resolution->value(); } + void setResolution(double resolution){ui.resolution->setValue(resolution);} + unsigned int getLaserType(){return ui.laserType->currentIndex(); } + void setLaserType(int type){ui.laserType->setCurrentIndex(type); } + double getMaxRange(){return ui.maxRange->value(); } + void setMaxRange(double range){ui.maxRange->setValue(range); } private: Ui::ViewerSettingsClass ui; diff --git a/octovis/package.xml b/octovis/package.xml index e0457789..4443bc26 100644 --- a/octovis/package.xml +++ b/octovis/package.xml @@ -1,6 +1,6 @@ octovis - 1.9.8 + 1.10.0 octovis is visualization tool for the OctoMap library based on Qt and libQGLViewer. See http://octomap.github.io for details. @@ -22,6 +22,7 @@ octomap + opengl libqglviewer-dev-qt5 @@ -34,6 +35,7 @@ libqt4-opengl-dev --> octomap + opengl libqglviewer2-qt5 diff --git a/octovis/src/OcTreeDrawer.cpp b/octovis/src/OcTreeDrawer.cpp index 8b6e6a94..1dfd7fca 100644 --- a/octovis/src/OcTreeDrawer.cpp +++ b/octovis/src/OcTreeDrawer.cpp @@ -23,6 +23,7 @@ */ #include +#undef GL_GLEXT_VERSION // Previously defined by glu #include #define OTD_RAD2DEG 57.2957795 diff --git a/octovis/src/ViewerGui.cpp b/octovis/src/ViewerGui.cpp index 3534b26b..5fab2a0c 100644 --- a/octovis/src/ViewerGui.cpp +++ b/octovis/src/ViewerGui.cpp @@ -716,7 +716,7 @@ void ViewerGui::on_actionSave_file_triggered(){ } QString filename = QFileDialog::getSaveFileName(this, tr("Save octree file"), - "", tr("Full OcTree (*.ot);;Bonsai Tree file (*.bt);;")); + "", tr("Full OcTree (*.ot);;Bonsai Tree file (*.bt);;"), 0, QFileDialog::DontUseNativeDialog); if (filename != ""){ QApplication::setOverrideCursor(Qt::WaitCursor); @@ -1259,13 +1259,13 @@ void ViewerGui::saveCameraPosition(const char* filename) const { ViewerWidget* aux = const_cast( m_glwidget); aux->setStateFileName(QString(filename)); aux->saveStateToFile(); - aux->setStateFileName(QString::null); + aux->setStateFileName(QString()); } void ViewerGui::loadCameraPosition(const char* filename) { m_glwidget->setStateFileName(QString(filename)); m_glwidget->restoreStateFromFile(); - m_glwidget->setStateFileName(QString::null); + m_glwidget->setStateFileName(QString()); } diff --git a/octovis/src/extern/QGLViewer/VRender/Exporter.h b/octovis/src/extern/QGLViewer/VRender/Exporter.h index e01b7eea..4bf5669b 100644 --- a/octovis/src/extern/QGLViewer/VRender/Exporter.h +++ b/octovis/src/extern/QGLViewer/VRender/Exporter.h @@ -60,7 +60,7 @@ namespace vrender { public: Exporter() ; - virtual ~Exporter() {}; + virtual ~Exporter() {} virtual void exportToFile(const QString& filename,const std::vector&,VRenderParams&) ; @@ -92,7 +92,7 @@ namespace vrender { public: EPSExporter() ; - virtual ~EPSExporter() {}; + virtual ~EPSExporter() {} protected: virtual void spewPoint(const Point *, QTextStream& out) ; @@ -120,7 +120,7 @@ namespace vrender class PSExporter: public EPSExporter { public: - virtual ~PSExporter() {}; + virtual ~PSExporter() {} protected: virtual void writeFooter(QTextStream& out) const ; }; @@ -129,7 +129,7 @@ namespace vrender { public: FIGExporter() ; - virtual ~FIGExporter() {}; + virtual ~FIGExporter() {} protected: virtual void spewPoint(const Point *, QTextStream& out) ; diff --git a/octovis/src/extern/QGLViewer/camera.cpp b/octovis/src/extern/QGLViewer/camera.cpp index 70dde8e3..45f028ce 100644 --- a/octovis/src/extern/QGLViewer/camera.cpp +++ b/octovis/src/extern/QGLViewer/camera.cpp @@ -199,8 +199,8 @@ void Camera::setScreenWidthAndHeight(int width, int height) \code class myCamera :: public qglviewer::Camera { - virtual qreal Camera::zNear() const { return 0.001; }; - virtual qreal Camera::zFar() const { return 100.0; }; + virtual qreal Camera::zNear() const { return 0.001; } + virtual qreal Camera::zFar() const { return 100.0; } } \endcode diff --git a/octovis/src/extern/QGLViewer/constraint.h b/octovis/src/extern/QGLViewer/constraint.h index d90d8203..cc1d8ad1 100644 --- a/octovis/src/extern/QGLViewer/constraint.h +++ b/octovis/src/extern/QGLViewer/constraint.h @@ -197,7 +197,7 @@ class QGLVIEWER_EXPORT AxisPlaneConstraint : public Constraint case MyAxisPlaneConstraint::FREE: ... break; case MyAxisPlaneConstraint::CUSTOM: ... break; } - }; + } MyAxisPlaneConstraint* c = new MyAxisPlaneConstraint(); // Note the Type conversion @@ -209,11 +209,11 @@ class QGLVIEWER_EXPORT AxisPlaneConstraint : public Constraint /*! @name Translation constraint */ //@{ /*! Overloading of Constraint::constrainTranslation(). Empty */ - virtual void constrainTranslation(Vec& translation, Frame* const frame) { Q_UNUSED(translation); Q_UNUSED(frame); }; + virtual void constrainTranslation(Vec& translation, Frame* const frame) { Q_UNUSED(translation); Q_UNUSED(frame); } void setTranslationConstraint(Type type, const Vec& direction); /*! Sets the Type() of the translationConstraintType(). Default is AxisPlaneConstraint::FREE. */ - void setTranslationConstraintType(Type type) { translationConstraintType_ = type; }; + void setTranslationConstraintType(Type type) { translationConstraintType_ = type; } void setTranslationConstraintDirection(const Vec& direction); /*! Returns the translation constraint Type(). @@ -225,7 +225,7 @@ class QGLVIEWER_EXPORT AxisPlaneConstraint : public Constraint Use Frame::setPosition() to define the position of the constrained Frame before it gets constrained. */ - Type translationConstraintType() const { return translationConstraintType_; }; + Type translationConstraintType() const { return translationConstraintType_; } /*! Returns the direction used by the translation constraint. It represents the axis direction (AxisPlaneConstraint::AXIS) or the plane normal @@ -235,20 +235,20 @@ class QGLVIEWER_EXPORT AxisPlaneConstraint : public Constraint The AxisPlaneConstraint derived classes express this direction in different coordinate system (camera for CameraConstraint, local for LocalConstraint, and world for WorldConstraint). This value can be modified with setTranslationConstraintDirection(). */ - Vec translationConstraintDirection() const { return translationConstraintDir_; }; + Vec translationConstraintDirection() const { return translationConstraintDir_; } //@} /*! @name Rotation constraint */ //@{ /*! Overloading of Constraint::constrainRotation(). Empty. */ - virtual void constrainRotation(Quaternion& rotation, Frame* const frame) { Q_UNUSED(rotation); Q_UNUSED(frame); }; + virtual void constrainRotation(Quaternion& rotation, Frame* const frame) { Q_UNUSED(rotation); Q_UNUSED(frame); } void setRotationConstraint(Type type, const Vec& direction); void setRotationConstraintType(Type type); void setRotationConstraintDirection(const Vec& direction); /*! Returns the rotation constraint Type(). */ - Type rotationConstraintType() const { return rotationConstraintType_; }; + Type rotationConstraintType() const { return rotationConstraintType_; } /*! Returns the axis direction used by the rotation constraint. This direction is defined only when rotationConstraintType() is AxisPlaneConstraint::AXIS. @@ -256,7 +256,7 @@ class QGLVIEWER_EXPORT AxisPlaneConstraint : public Constraint The AxisPlaneConstraint derived classes express this direction in different coordinate system (camera for CameraConstraint, local for LocalConstraint, and world for WorldConstraint). This value can be modified with setRotationConstraintDirection(). */ - Vec rotationConstraintDirection() const { return rotationConstraintDir_; }; + Vec rotationConstraintDirection() const { return rotationConstraintDir_; } //@} private: @@ -280,7 +280,7 @@ class QGLVIEWER_EXPORT LocalConstraint : public AxisPlaneConstraint { public: /*! Virtual destructor. Empty. */ - virtual ~LocalConstraint() {}; + virtual ~LocalConstraint() {} virtual void constrainTranslation(Vec& translation, Frame* const frame); virtual void constrainRotation (Quaternion& rotation, Frame* const frame); @@ -300,7 +300,7 @@ class QGLVIEWER_EXPORT WorldConstraint : public AxisPlaneConstraint { public: /*! Virtual destructor. Empty. */ - virtual ~WorldConstraint() {}; + virtual ~WorldConstraint() {} virtual void constrainTranslation(Vec& translation, Frame* const frame); virtual void constrainRotation (Quaternion& rotation, Frame* const frame); @@ -321,13 +321,13 @@ class QGLVIEWER_EXPORT CameraConstraint : public AxisPlaneConstraint public: explicit CameraConstraint(const Camera* const camera); /*! Virtual destructor. Empty. */ - virtual ~CameraConstraint() {}; + virtual ~CameraConstraint() {} virtual void constrainTranslation(Vec& translation, Frame* const frame); virtual void constrainRotation (Quaternion& rotation, Frame* const frame); /*! Returns the associated Camera. Set using the CameraConstraint constructor. */ - const Camera* camera() const { return camera_; }; + const Camera* camera() const { return camera_; } private: const Camera* const camera_; diff --git a/octovis/src/extern/QGLViewer/qglviewer.cpp b/octovis/src/extern/QGLViewer/qglviewer.cpp index 542545c0..adf6e014 100644 --- a/octovis/src/extern/QGLViewer/qglviewer.cpp +++ b/octovis/src/extern/QGLViewer/qglviewer.cpp @@ -1553,7 +1553,7 @@ QString QGLViewer::mouseActionString(QGLViewer::MouseAction ma) { switch (ma) { - case QGLViewer::NO_MOUSE_ACTION : return QString::null; + case QGLViewer::NO_MOUSE_ACTION : return QString(); case QGLViewer::ROTATE : return QGLViewer::tr("Rotates", "ROTATE mouse action"); case QGLViewer::ZOOM : return QGLViewer::tr("Zooms", "ZOOM mouse action"); case QGLViewer::TRANSLATE : return QGLViewer::tr("Translates", "TRANSLATE mouse action"); @@ -1566,14 +1566,14 @@ QString QGLViewer::mouseActionString(QGLViewer::MouseAction ma) case QGLViewer::SCREEN_TRANSLATE : return QGLViewer::tr("Horizontally/Vertically translates", "SCREEN_TRANSLATE mouse action"); case QGLViewer::ZOOM_ON_REGION : return QGLViewer::tr("Zooms on region for", "ZOOM_ON_REGION mouse action"); } - return QString::null; + return QString(); } QString QGLViewer::clickActionString(QGLViewer::ClickAction ca) { switch (ca) { - case QGLViewer::NO_CLICK_ACTION : return QString::null; + case QGLViewer::NO_CLICK_ACTION : return QString(); case QGLViewer::ZOOM_ON_PIXEL : return QGLViewer::tr("Zooms on pixel", "ZOOM_ON_PIXEL click action"); case QGLViewer::ZOOM_TO_FIT : return QGLViewer::tr("Zooms to fit scene", "ZOOM_TO_FIT click action"); case QGLViewer::SELECT : return QGLViewer::tr("Selects", "SELECT click action"); @@ -1585,7 +1585,7 @@ QString QGLViewer::clickActionString(QGLViewer::ClickAction ca) case QGLViewer::ALIGN_FRAME : return QGLViewer::tr("Aligns manipulated frame", "ALIGN_FRAME click action"); case QGLViewer::ALIGN_CAMERA : return QGLViewer::tr("Aligns camera", "ALIGN_CAMERA click action"); } - return QString::null; + return QString(); } static QString keyString(unsigned int key) @@ -1831,7 +1831,7 @@ void QGLViewer::setKeyDescription(unsigned int key, QString description) QString QGLViewer::cameraPathKeysString() const { if (pathIndex_.isEmpty()) - return QString::null; + return QString(); QVector keys; keys.reserve(pathIndex_.count()); @@ -3366,7 +3366,7 @@ This is the name of the XML file where saveStateToFile() saves the viewer state widget geometry, display flags... see domElement()) on exit. Use restoreStateFromFile() to restore this state later (usually in your init() method). -Setting this value to \c QString::null will disable the automatic state file saving that normally +Setting this value to \c QString() will disable the automatic state file saving that normally occurs on exit. If more than one viewer are created by the application, this function will return a numbered file @@ -3395,7 +3395,7 @@ domElement(). Use restoreStateFromFile() to restore this viewer state. This method is automatically called when a viewer is closed (using Escape or using the window's -upper right \c x close button). setStateFileName() to \c QString::null to prevent this. */ +upper right \c x close button). setStateFileName() to \c QString() to prevent this. */ void QGLViewer::saveStateToFile() { QString name = stateFileName(); diff --git a/octovis/src/extern/QGLViewer/qglviewer.h b/octovis/src/extern/QGLViewer/qglviewer.h index 14a08192..586ac457 100644 --- a/octovis/src/extern/QGLViewer/qglviewer.h +++ b/octovis/src/extern/QGLViewer/qglviewer.h @@ -81,9 +81,9 @@ class QGLVIEWER_EXPORT QGLViewer : public QGLWidget #else - explicit QGLViewer(QWidget* parent=0, const QGLWidget* shareWidget=0, Qt::WindowFlags flags=0); - explicit QGLViewer(QGLContext *context, QWidget* parent=0, const QGLWidget* shareWidget=0, Qt::WindowFlags flags=0); - explicit QGLViewer(const QGLFormat& format, QWidget* parent=0, const QGLWidget* shareWidget=0, Qt::WindowFlags flags=0); + explicit QGLViewer(QWidget* parent=0, const QGLWidget* shareWidget=0, Qt::WindowFlags flags=Qt::WindowFlags()); + explicit QGLViewer(QGLContext *context, QWidget* parent=0, const QGLWidget* shareWidget=0, Qt::WindowFlags flags=Qt::WindowFlags()); + explicit QGLViewer(const QGLFormat& format, QWidget* parent=0, const QGLWidget* shareWidget=0, Qt::WindowFlags flags=Qt::WindowFlags()); #endif virtual ~QGLViewer(); @@ -1059,8 +1059,8 @@ public Q_SLOTS: void setStateFileName(const QString& name) { stateFileName_ = name; } #ifndef DOXYGEN - void saveToFile(const QString& fileName=QString::null); - bool restoreFromFile(const QString& fileName=QString::null); + void saveToFile(const QString& fileName=QString()); + bool restoreFromFile(const QString& fileName=QString()); #endif private: