Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz Namespace Migration : gz-math #430

Merged
merged 24 commits into from
May 28, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
67 changes: 35 additions & 32 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ release will remove the deprecated code.
1. **Helpers.hh**
+ **Deprecation:** template<typename T> inline void appendToStream(std::ostream, T, int)
+ **Replacement:** template<typename T> inline void appendToStream(std::ostream, T)
1. The `ignition` namespace is deprecated and will be removed in future versions. Use `gz` instead.
1. Header files under `ignition/...` are deprecated and will be removed in future versions.
Use `gz/...` instead.

### Modifications

Expand Down Expand Up @@ -181,97 +184,97 @@ release will remove the deprecated code.

1. **Helpers.hh**
+ ***Deprecation:*** IGN_DBL_MAX
+ ***Replacement:*** ignition::math::MAX_D
+ ***Replacement:*** gz::math::MAX_D

+ ***Deprecation:*** IGN_DBL_MIN
+ ***Replacement:*** ignition::math::MIN_D
+ ***Replacement:*** gz::math::MIN_D

+ ***Deprecation:*** IGN_DBL_LOW
+ ***Replacement:*** ignition::math::LOW_D
+ ***Replacement:*** gz::math::LOW_D

+ ***Deprecation:*** IGN_DBL_INF
+ ***Replacement:*** ignition::math::INF_D
+ ***Replacement:*** gz::math::INF_D

+ ***Deprecation:*** IGN_FLT_MAX
+ ***Replacement:*** ignition::math::MAX_F
+ ***Replacement:*** gz::math::MAX_F

+ ***Deprecation:*** IGN_FLT_MIN
+ ***Replacement:*** ignition::math::MIN_F
+ ***Replacement:*** gz::math::MIN_F

+ ***Deprecation:*** IGN_FLT_LOW
+ ***Replacement:*** ignition::math::LOW_F
+ ***Replacement:*** gz::math::LOW_F

+ ***Deprecation:*** IGN_FLT_INF
+ ***Replacement:*** ignition::math::INF_F
+ ***Replacement:*** gz::math::INF_F

+ ***Deprecation:*** IGN_UI16_MAX
+ ***Replacement:*** ignition::math::MAX_UI16
+ ***Replacement:*** gz::math::MAX_UI16

+ ***Deprecation:*** IGN_UI16_MIN
+ ***Replacement:*** ignition::math::MIN_UI16
+ ***Replacement:*** gz::math::MIN_UI16

+ ***Deprecation:*** IGN_UI16_LOW
+ ***Replacement:*** ignition::math::LOW_UI16
+ ***Replacement:*** gz::math::LOW_UI16

+ ***Deprecation:*** IGN_UI16_INF
+ ***Replacement:*** ignition::math::INF_UI16
+ ***Replacement:*** gz::math::INF_UI16

+ ***Deprecation:*** IGN_I16_MAX
+ ***Replacement:*** ignition::math::MAX_I16
+ ***Replacement:*** gz::math::MAX_I16

+ ***Deprecation:*** IGN_I16_MIN
+ ***Replacement:*** ignition::math::MIN_I16
+ ***Replacement:*** gz::math::MIN_I16

+ ***Deprecation:*** IGN_I16_LOW
+ ***Replacement:*** ignition::math::LOW_I16
+ ***Replacement:*** gz::math::LOW_I16

+ ***Deprecation:*** IGN_I16_INF
+ ***Replacement:*** ignition::math::INF_I16
+ ***Replacement:*** gz::math::INF_I16

+ ***Deprecation:*** IGN_UI32_MAX
+ ***Replacement:*** ignition::math::MAX_UI32
+ ***Replacement:*** gz::math::MAX_UI32

+ ***Deprecation:*** IGN_UI32_MIN
+ ***Replacement:*** ignition::math::MIN_UI32
+ ***Replacement:*** gz::math::MIN_UI32

+ ***Deprecation:*** IGN_UI32_LOW
+ ***Replacement:*** ignition::math::LOW_UI32
+ ***Replacement:*** gz::math::LOW_UI32

+ ***Deprecation:*** IGN_UI32_INF
+ ***Replacement:*** ignition::math::INF_UI32
+ ***Replacement:*** gz::math::INF_UI32

+ ***Deprecation:*** IGN_I32_MAX
+ ***Replacement:*** ignition::math::MAX_I32
+ ***Replacement:*** gz::math::MAX_I32

+ ***Deprecation:*** IGN_I32_MIN
+ ***Replacement:*** ignition::math::MIN_I32
+ ***Replacement:*** gz::math::MIN_I32

+ ***Deprecation:*** IGN_I32_LOW
+ ***Replacement:*** ignition::math::LOW_I32
+ ***Replacement:*** gz::math::LOW_I32

+ ***Deprecation:*** IGN_I32_INF
+ ***Replacement:*** ignition::math::INF_I32
+ ***Replacement:*** gz::math::INF_I32

+ ***Deprecation:*** IGN_UI64_MAX
+ ***Replacement:*** ignition::math::MAX_UI64
+ ***Replacement:*** gz::math::MAX_UI64

+ ***Deprecation:*** IGN_UI64_MIN
+ ***Replacement:*** ignition::math::MIN_UI64
+ ***Replacement:*** gz::math::MIN_UI64

+ ***Deprecation:*** IGN_UI64_LOW
+ ***Replacement:*** ignition::math::LOW_UI64
+ ***Replacement:*** gz::math::LOW_UI64

+ ***Deprecation:*** IGN_UI64_INF
+ ***Replacement:*** ignition::math::INF_UI64
+ ***Replacement:*** gz::math::INF_UI64

+ ***Deprecation:*** IGN_I64_MAX
+ ***Replacement:*** ignition::math::MAX_I64
+ ***Replacement:*** gz::math::MAX_I64

+ ***Deprecation:*** IGN_I64_MIN
+ ***Replacement:*** ignition::math::MIN_I64
+ ***Replacement:*** gz::math::MIN_I64

+ ***Deprecation:*** IGN_I64_LOW
+ ***Replacement:*** ignition::math::LOW_I64
+ ***Replacement:*** gz::math::LOW_I64

+ ***Deprecation:*** IGN_I64_INF
+ ***Replacement:*** ignition::math::INF_I64
+ ***Replacement:*** gz::math::INF_I64
72 changes: 36 additions & 36 deletions eigen3/include/gz/math/eigen3/Conversions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,34 @@
#include <gz/math/Quaternion.hh>
#include <gz/math/Vector3.hh>

namespace ignition
namespace gz
{
namespace math
{
namespace eigen3
{
/// \brief Convert from ignition::math::Vector3d to Eigen::Vector3d.
/// \param[in] _v ignition::math::Vector3d to convert
/// \brief Convert from gz::math::Vector3d to Eigen::Vector3d.
/// \param[in] _v gz::math::Vector3d to convert
/// \return The equivalent Eigen::Vector3d.
inline Eigen::Vector3d convert(const ignition::math::Vector3d &_v)
inline Eigen::Vector3d convert(const gz::math::Vector3d &_v)
{
return Eigen::Vector3d(_v[0], _v[1], _v[2]);
}

/// \brief Convert from ignition::math::AxisAlignedBox to
/// \brief Convert from gz::math::AxisAlignedBox to
/// Eigen::AlignedBox3d.
/// \param[in] _b ignition::math::AxisAlignedBox to convert
/// \param[in] _b gz::math::AxisAlignedBox to convert
/// \return The equivalent Eigen::AlignedBox3d.
inline Eigen::AlignedBox3d convert(
const ignition::math::AxisAlignedBox &_b)
const gz::math::AxisAlignedBox &_b)
{
return Eigen::AlignedBox3d(convert(_b.Min()), convert(_b.Max()));
}

/// \brief Convert from ignition::math::Matrix3d to Eigen::Matrix3d.
/// \param[in] _m ignition::math::Matrix3d to convert.
/// \brief Convert from gz::math::Matrix3d to Eigen::Matrix3d.
/// \param[in] _m gz::math::Matrix3d to convert.
/// \return The equivalent Eigen::Matrix3d.
inline Eigen::Matrix3d convert(const ignition::math::Matrix3d &_m)
inline Eigen::Matrix3d convert(const gz::math::Matrix3d &_m)
{
Eigen::Matrix3d matrix;
for (std::size_t i=0; i < 3; ++i)
Expand All @@ -66,10 +66,10 @@ namespace ignition
return matrix;
}

/// \brief Convert ignition::math::Quaterniond to Eigen::Quaterniond.
/// \param[in] _q ignition::math::Quaterniond to convert.
/// \brief Convert gz::math::Quaterniond to Eigen::Quaterniond.
/// \param[in] _q gz::math::Quaterniond to convert.
/// \return The equivalent Eigen::Quaterniond.
inline Eigen::Quaterniond convert(const ignition::math::Quaterniond &_q)
inline Eigen::Quaterniond convert(const gz::math::Quaterniond &_q)
{
Eigen::Quaterniond quat;
quat.w() = _q.W();
Expand All @@ -80,10 +80,10 @@ namespace ignition
return quat;
}

/// \brief Convert ignition::math::Pose3d to Eigen::Isometry3d.
/// \param[in] _pose ignition::math::Pose3d to convert.
/// \brief Convert gz::math::Pose3d to Eigen::Isometry3d.
/// \param[in] _pose gz::math::Pose3d to convert.
/// \return The equivalent Eigen::Isometry3d.
inline Eigen::Isometry3d convert(const ignition::math::Pose3d &_pose)
inline Eigen::Isometry3d convert(const gz::math::Pose3d &_pose)
{
Eigen::Isometry3d tf = Eigen::Isometry3d::Identity();
tf.translation() = convert(_pose.Pos());
Expand All @@ -92,38 +92,38 @@ namespace ignition
return tf;
}

/// \brief Convert Eigen::Vector3d to ignition::math::Vector3d.
/// \brief Convert Eigen::Vector3d to gz::math::Vector3d.
/// \param[in] _v Eigen::Vector3d to convert.
/// \return The equivalent ignition::math::Vector3d.
inline ignition::math::Vector3d convert(const Eigen::Vector3d &_v)
/// \return The equivalent gz::math::Vector3d.
inline gz::math::Vector3d convert(const Eigen::Vector3d &_v)
{
ignition::math::Vector3d vec;
gz::math::Vector3d vec;
vec.X() = _v[0];
vec.Y() = _v[1];
vec.Z() = _v[2];

return vec;
}

/// \brief Convert Eigen::AlignedBox3d to ignition::math::AxisAlignedBox.
/// \brief Convert Eigen::AlignedBox3d to gz::math::AxisAlignedBox.
/// \param[in] _b Eigen::AlignedBox3d to convert.
/// \return The equivalent ignition::math::AxisAlignedBox.
inline ignition::math::AxisAlignedBox convert(
/// \return The equivalent gz::math::AxisAlignedBox.
inline gz::math::AxisAlignedBox convert(
const Eigen::AlignedBox3d &_b)
{
ignition::math::AxisAlignedBox box;
gz::math::AxisAlignedBox box;
box.Min() = convert(_b.min());
box.Max() = convert(_b.max());

return box;
}

/// \brief Convert Eigen::Matrix3d to ignition::math::Matrix3d.
/// \brief Convert Eigen::Matrix3d to gz::math::Matrix3d.
/// \param[in] _m Eigen::Matrix3d to convert.
/// \return The equivalent ignition::math::Matrix3d.
inline ignition::math::Matrix3d convert(const Eigen::Matrix3d &_m)
/// \return The equivalent gz::math::Matrix3d.
inline gz::math::Matrix3d convert(const Eigen::Matrix3d &_m)
{
ignition::math::Matrix3d matrix;
gz::math::Matrix3d matrix;
for (std::size_t i=0; i < 3; ++i)
{
for (std::size_t j=0; j < 3; ++j)
Expand All @@ -135,12 +135,12 @@ namespace ignition
return matrix;
}

/// \brief Convert Eigen::Quaterniond to ignition::math::Quaterniond.
/// \brief Convert Eigen::Quaterniond to gz::math::Quaterniond.
/// \param[in] _q Eigen::Quaterniond to convert.
/// \return The equivalent ignition::math::Quaterniond.
inline ignition::math::Quaterniond convert(const Eigen::Quaterniond &_q)
/// \return The equivalent gz::math::Quaterniond.
inline gz::math::Quaterniond convert(const Eigen::Quaterniond &_q)
{
ignition::math::Quaterniond quat;
gz::math::Quaterniond quat;
quat.W() = _q.w();
quat.X() = _q.x();
quat.Y() = _q.y();
Expand All @@ -149,12 +149,12 @@ namespace ignition
return quat;
}

/// \brief Convert Eigen::Isometry3d to ignition::math::Pose3d.
/// \brief Convert Eigen::Isometry3d to gz::math::Pose3d.
/// \param[in] _tf Eigen::Isometry3d to convert.
/// \return The equivalent ignition::math::Pose3d.
inline ignition::math::Pose3d convert(const Eigen::Isometry3d &_tf)
/// \return The equivalent gz::math::Pose3d.
inline gz::math::Pose3d convert(const Eigen::Isometry3d &_tf)
{
ignition::math::Pose3d pose;
gz::math::Pose3d pose;
pose.Pos() = convert(Eigen::Vector3d(_tf.translation()));
pose.Rot() = convert(Eigen::Quaterniond(_tf.linear()));

Expand Down
4 changes: 2 additions & 2 deletions eigen3/include/gz/math/eigen3/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <gz/math/Vector3.hh>
#include <gz/math/eigen3/Conversions.hh>

namespace ignition
namespace gz
{
namespace math
{
Expand Down Expand Up @@ -84,7 +84,7 @@ namespace ignition
/// http://codextechnicanum.blogspot.com/2015/04/find-minimum-oriented-bounding-box-of.html
/// \param[in] _vertices a vector of 3d vertices
/// \return Oriented 3D box
inline ignition::math::OrientedBoxd verticesToOrientedBox(
inline gz::math::OrientedBoxd verticesToOrientedBox(
const std::vector<math::Vector3d> &_vertices)
{
math::OrientedBoxd box;
Expand Down
Loading