From 852e0096aae2a2acb94f3dfe9be1b5995c2f656b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Ag=C3=BCero?= Date: Thu, 5 Dec 2024 21:43:56 +0100 Subject: [PATCH 1/2] Remove deprecations: tock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Agüero --- CMakeLists.txt | 3 --- Migration.md | 14 ++++++++++++++ include/gz/rendering/config.hh.in | 4 ---- .../gz/rendering/ogre2/Ogre2SelectionBuffer.hh | 10 ---------- ogre2/src/Ogre2SelectionBuffer.cc | 14 -------------- 5 files changed, 14 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b26ca9b5..4ef9052be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,8 +151,6 @@ endif() set(GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR ${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/engine-plugins ) -set(GZ_RENDERING_ENGINE_INSTALL_DIR - ${CMAKE_INSTALL_PREFIX}/${GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR}) #-------------------------------------- # Find DL if doing relocatable installation @@ -196,7 +194,6 @@ else() endif() set(GZ_RENDERING_RELATIVE_RESOURCE_PATH ${GZ_DATA_INSTALL_DIR}) -set(GZ_RENDERING_RESOURCE_PATH ${CMAKE_INSTALL_PREFIX}/${GZ_RENDERING_RELATIVE_RESOURCE_PATH}) #============================================================================ # Configure the build diff --git a/Migration.md b/Migration.md index 11c187501..852ca33cc 100644 --- a/Migration.md +++ b/Migration.md @@ -5,6 +5,20 @@ Deprecated code produces compile-time warnings. These warning serve as notification to users that their code should be upgraded. The next major release will remove the deprecated code. +## Gazebo Rendering 9.x to 10.x + +### Removals + +1. The environment variable `GZ_RENDERING_RESOURCE_PATH` is removed. Use +`gz::rendering::getResourcePath()` instead. + +1. The environment variable `GZ_RENDERING_ENGINE_INSTALL_DIR` is removed. Use +`gz::rendering::getEngineInstallDir()` instead. + +1. **Ogre2SelectionBuffer** + + Removed: `bool ExecuteQuery(const int _x, const int _y, Ogre::Item *&_item, math::Vector3d &_point)` + + Replacement: `bool ExecuteQuery(int _x, int _y, Ogre::MovableObject *&_obj, math::Vector3d &_point)` + ## Gazebo Rendering 8.x to 9.x ### Deprecations diff --git a/include/gz/rendering/config.hh.in b/include/gz/rendering/config.hh.in index f76f96d1f..cbe8b689b 100644 --- a/include/gz/rendering/config.hh.in +++ b/include/gz/rendering/config.hh.in @@ -32,10 +32,6 @@ #define GZ_RENDERING_VERSION_HEADER "Gazebo Rendering, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2014 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n" -#define GZ_RENDERING_RESOURCE_PATH _Pragma ("GCC warning \"'GZ_RENDERING_RESOURCE_PATH' macro is deprecated, use gz::rendering::getResourcePath() function instead. \"") "${GZ_RENDERING_RESOURCE_PATH}" - -#define GZ_RENDERING_ENGINE_INSTALL_DIR _Pragma ("GCC warning \"'GZ_RENDERING_ENGINE_INSTALL_DIR' macro is deprecated, use gz::rendering::getEngineInstallDir() function instead. \"") "${GZ_RENDERING_ENGINE_INSTALL_DIR}" - #cmakedefine GZ_RENDERING_HAVE_OGRE 1 #cmakedefine GZ_RENDERING_HAVE_OGRE2 1 #cmakedefine GZ_RENDERING_HAVE_OPTIX 1 diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2SelectionBuffer.hh b/ogre2/include/gz/rendering/ogre2/Ogre2SelectionBuffer.hh index dbe0e3abf..fa137d8de 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2SelectionBuffer.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2SelectionBuffer.hh @@ -65,16 +65,6 @@ namespace gz /// \return Returns the Ogre movable object at the coordinate. public: Ogre::MovableObject *OnSelectionClick(int _x, int _y); - /// \brief Perform selection operation and get ogre item and - /// point of intersection. - /// \param[in] _x X coordinate in pixels. - /// \param[in] _y Y coordinate in pixels. - /// \param[out] _item Ogre item at the coordinate. - /// \param[out] _point 3D point of intersection with the ogre item's mesh. - /// \return True if an ogre item is found, false otherwise - public: bool GZ_DEPRECATED(9) ExecuteQuery(const int _x, const int _y, - Ogre::Item *&_item, math::Vector3d &_point); - /// \brief Perform selection operation and get ogre item and /// point of intersection. /// \param[in] _x X coordinate in pixels. diff --git a/ogre2/src/Ogre2SelectionBuffer.cc b/ogre2/src/Ogre2SelectionBuffer.cc index 543ea59a5..bc28f3a09 100644 --- a/ogre2/src/Ogre2SelectionBuffer.cc +++ b/ogre2/src/Ogre2SelectionBuffer.cc @@ -421,20 +421,6 @@ Ogre::MovableObject *Ogre2SelectionBuffer::OnSelectionClick(int _x, int _y) return obj; } -///////////////////////////////////////////////// -bool Ogre2SelectionBuffer::ExecuteQuery(const int _x, const int _y, - Ogre::Item *&_item, math::Vector3d &_point) -{ - Ogre::MovableObject *obj = nullptr; - bool out = this->ExecuteQuery(_x, _y, obj, _point); - - Ogre::Item *item = dynamic_cast(obj); - if (item) - _item = item; - - return out; -} - ///////////////////////////////////////////////// bool Ogre2SelectionBuffer::ExecuteQuery(int _x, int _y, Ogre::MovableObject *&_obj, math::Vector3d &_point) From 2fe623c04b3debd479388a603c34ff6eb5bddbcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Ag=C3=BCero?= Date: Thu, 5 Dec 2024 22:20:45 +0100 Subject: [PATCH 2/2] Update Migration.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ian Chen Signed-off-by: Carlos Agüero --- Migration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Migration.md b/Migration.md index 852ca33cc..379d1e0ca 100644 --- a/Migration.md +++ b/Migration.md @@ -9,10 +9,10 @@ release will remove the deprecated code. ### Removals -1. The environment variable `GZ_RENDERING_RESOURCE_PATH` is removed. Use +1. The macro `GZ_RENDERING_RESOURCE_PATH` is removed. Use `gz::rendering::getResourcePath()` instead. -1. The environment variable `GZ_RENDERING_ENGINE_INSTALL_DIR` is removed. Use +1. The macro `GZ_RENDERING_ENGINE_INSTALL_DIR` is removed. Use `gz::rendering::getEngineInstallDir()` instead. 1. **Ogre2SelectionBuffer**