Skip to content

Commit

Permalink
Remove deprecations: tock (#1091)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Co-authored-by: Ian Chen <[email protected]>
  • Loading branch information
caguero and iche033 authored Dec 16, 2024
1 parent 33626b5 commit f5dbc9d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ 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})

Expand Down Expand Up @@ -196,7 +197,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
Expand Down
14 changes: 14 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 macro `GZ_RENDERING_RESOURCE_PATH` is removed. Use
`gz::rendering::getResourcePath()` instead.

1. The macro `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
Expand Down
4 changes: 0 additions & 4 deletions include/gz/rendering/config.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions ogre2/include/gz/rendering/ogre2/Ogre2SelectionBuffer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 0 additions & 14 deletions ogre2/src/Ogre2SelectionBuffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Ogre::Item *>(obj);
if (item)
_item = item;

return out;
}

/////////////////////////////////////////////////
bool Ogre2SelectionBuffer::ExecuteQuery(int _x, int _y,
Ogre::MovableObject *&_obj, math::Vector3d &_point)
Expand Down

0 comments on commit f5dbc9d

Please sign in to comment.