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

Remove deprecated functions #605

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions include/gz/math/Angle.hh
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,10 @@ namespace gz::math
{
}

/// \brief Set the value from an angle in radians.
/// \param[in] _radian Radian value.
/// \deprecated Use void SetRadian(double)
public: void GZ_DEPRECATED(7) Radian(double _radian);

/// \brief Set the value from an angle in radians.
/// \param[in] _radian Radian value.
public: void SetRadian(double _radian);

/// \brief Set the value from an angle in degrees
/// \param[in] _degree Degree value
/// \deprecated Use void SetDegree(double)
public: void GZ_DEPRECATED(7) Degree(double _degree);

/// \brief Set the value from an angle in degrees
/// \param[in] _degree Degree value
public: void SetDegree(double _degree);
Expand Down
12 changes: 0 additions & 12 deletions include/gz/math/Helpers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,6 @@ namespace gz::math
/// \brief size_t type with a value of 9
static const size_t GZ_NINE_SIZE_T = 9u;

// TODO(CH3): Deprecated. Remove on tock.
constexpr auto GZ_DEPRECATED(7) IGN_ZERO_SIZE_T = &GZ_ZERO_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_ONE_SIZE_T = &GZ_ONE_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_TWO_SIZE_T = &GZ_TWO_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_THREE_SIZE_T = &GZ_THREE_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_FOUR_SIZE_T = &GZ_FOUR_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_FIVE_SIZE_T = &GZ_FIVE_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_SIX_SIZE_T = &GZ_SIX_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_SEVEN_SIZE_T = &GZ_SEVEN_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_EIGHT_SIZE_T = &GZ_EIGHT_SIZE_T;
constexpr auto GZ_DEPRECATED(7) IGN_NINE_SIZE_T = &GZ_NINE_SIZE_T;

/// \brief Double maximum value. This value will be similar to 1.79769e+308
static const double MAX_D = std::numeric_limits<double>::max();

Expand Down
44 changes: 0 additions & 44 deletions include/gz/math/Matrix3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,6 @@ namespace gz::math
this->data[2][2] = _v22;
}

/// \brief Set the matrix from three axis (1 per column).
/// \param[in] _xAxis The x axis, the first column of the matrix.
/// \param[in] _yAxis The y axis, the second column of the matrix.
/// \param[in] _zAxis The z axis, the third column of the matrix.
/// \deprecated Use SetAxes(const Vector3<T> &, const Vector3<T> &,
/// const Vector3<T> &,)
public: void GZ_DEPRECATED(7) Axes(const Vector3<T> &_xAxis,
const Vector3<T> &_yAxis,
const Vector3<T> &_zAxis)
{
this->SetAxes(_xAxis, _yAxis, _zAxis);
}

/// \brief Set the matrix from three axis (1 per column).
/// \param[in] _xAxis The x axis, the first column of the matrix.
/// \param[in] _yAxis The y axis, the second column of the matrix.
Expand All @@ -209,14 +196,6 @@ namespace gz::math
this->SetCol(2, _zAxis);
}

/// \brief Set as a rotation matrix from an axis and angle.
/// \param[in] _axis the axis
/// \param[in] _angle ccw rotation around the axis in radians
/// \deprecated Use SetFromAxisAngle(const Vector3<T> &, T)
public: void GZ_DEPRECATED(7) Axis(const Vector3<T> &_axis, T _angle)
{
this->SetFromAxisAngle(_axis, _angle);
}

/// \brief Set as a rotation matrix from an axis and angle.
/// \param[in] _axis the axis
Expand All @@ -240,19 +219,6 @@ namespace gz::math
this->data[2][2] = _axis.Z()*_axis.Z()*C + c;
}

/// \brief Set as a rotation matrix to represent rotation from
/// vector _v1 to vector _v2, so that
/// _v2.Normalize() == this * _v1.Normalize() holds.
///
/// \param[in] _v1 The first vector
/// \param[in] _v2 The second vector
/// \deprecated Use SetFrom2Axes(const Vector3<T> &, const Vector3<T> &)
public: void GZ_DEPRECATED(7) From2Axes(
const Vector3<T> &_v1, const Vector3<T> &_v2)
{
this->SetFrom2Axes(_v1, _v2);
}

/// \brief Set as a rotation matrix to represent rotation from
/// vector _v1 to vector _v2, so that
/// _v2.Normalize() == this * _v1.Normalize() holds.
Expand Down Expand Up @@ -296,16 +262,6 @@ namespace gz::math
this->SetFromAxisAngle(cross, acos(dot));
}

/// \brief Set a column.
/// \param[in] _c The colum index [0, 1, 2]. _col is clamped to the
/// range [0, 2].
/// \param[in] _v The value to set in each row of the column.
/// \deprecated Use SetCol(unsigned int _c, const Vector3<T> &_v)
public: void GZ_DEPRECATED(7) Col(unsigned int _c, const Vector3<T> &_v)
{
this->SetCol(_c, _v);
}

/// \brief Set a column.
/// \param[in] _c The colum index [0, 1, 2]. _col is clamped to the
/// range [0, 2].
Expand Down
63 changes: 0 additions & 63 deletions include/gz/math/Pose3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -175,69 +175,6 @@ namespace gz::math
return Pose3<T>(inv * (this->p*-1), inv);
}

/// \brief Addition operator.
/// A is the transform from O to P specified in frame O
/// B is the transform from P to Q specified in frame P
/// then, B + A is the transform from O to Q specified in frame O
/// \param[in] _pose Pose3<T> to add to this pose.
/// \return The resulting pose.
public: GZ_DEPRECATED(7) Pose3<T> operator+(const Pose3<T> &_pose) const
{
Pose3<T> result;

result.p = this->CoordPositionAdd(_pose);
result.q = this->CoordRotationAdd(_pose.q);

return result;
}

/// \brief Addition assignment operator.
/// \param[in] _pose Pose3<T> to add to this pose.
/// \sa operator+(const Pose3<T> &_pose) const.
/// \return The resulting pose.
public: GZ_DEPRECATED(7) const Pose3<T> &
operator+=(const Pose3<T> &_pose)
{
this->p = this->CoordPositionAdd(_pose);
this->q = this->CoordRotationAdd(_pose.q);

return *this;
}

/// \brief Negation operator.
/// A is the transform from O to P in frame O
/// then -A is transform from P to O specified in frame P
/// \return The resulting pose.
public: GZ_DEPRECATED(7) Pose3<T> operator-() const
{
return this->Inverse();
}

/// \brief Subtraction operator.
/// A is the transform from O to P in frame O
/// B is the transform from O to Q in frame O
/// B - A is the transform from P to Q in frame P
/// \param[in] _pose Pose3<T> to subtract from this one.
/// \return The resulting pose.
public: GZ_DEPRECATED(7) Pose3<T> operator-(const Pose3<T> &_pose) const
{
return Pose3<T>(this->CoordPositionSub(_pose),
this->CoordRotationSub(_pose.q));
}

/// \brief Subtraction assignment operator.
/// \param[in] _pose Pose3<T> to subtract from this one
/// \sa operator-(const Pose3<T> &_pose) const.
/// \return The resulting pose
public: GZ_DEPRECATED(7) const Pose3<T> &
operator-=(const Pose3<T> &_pose)
{
this->p = this->CoordPositionSub(_pose);
this->q = this->CoordRotationSub(_pose.q);

return *this;
}

/// \brief Equality operator.
/// \param[in] _pose Pose3<T> for comparison.
/// \return True if this pose is equal to the given pose.
Expand Down
112 changes: 0 additions & 112 deletions include/gz/math/Quaternion.hh
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,6 @@ namespace gz::math
return result;
}

/// \brief Set the quaternion from an axis and angle
/// \param[in] _ax X axis
/// \param[in] _ay Y axis
/// \param[in] _az Z axis
/// \param[in] _aa Angle in radians
/// \deprecated Use SetFromAxisAngle(T, T, T, T)
public: void GZ_DEPRECATED(7) Axis(T _ax, T _ay, T _az, T _aa)
{
this->SetFromAxisAngle(_ax, _ay, _az, _aa);
}

/// \brief Set the quaternion from an axis and angle.
/// \param[in] _ax X axis
/// \param[in] _ay Y axis
Expand Down Expand Up @@ -335,15 +324,6 @@ namespace gz::math
this->Normalize();
}

/// \brief Set the quaternion from an axis and angle
/// \param[in] _axis Axis
/// \param[in] _a Angle in radians
/// \deprecated Use SetFromAxisAngle(const Vector3<T> &_axis, T _a)
public: void GZ_DEPRECATED(7) Axis(const Vector3<T> &_axis, T _a)
{
this->SetFromAxisAngle(_axis, _a);
}

/// \brief Set the quaternion from an axis and angle
/// \param[in] _axis Axis
/// \param[in] _a Angle in radians
Expand All @@ -365,17 +345,6 @@ namespace gz::math
this->qz = _z;
}

/// \brief Set the quaternion from Euler angles. The order of operations
/// is roll, pitch, yaw around a fixed body frame axis
/// (the original frame of the object before rotation is applied).
/// Roll is a rotation about x, pitch is about y, yaw is about z.
/// \param[in] _vec Euler angle
/// \deprecated Use SetFromEuler(const Vector3<T> &)
public: void GZ_DEPRECATED(7) Euler(const Vector3<T> &_vec)
{
this->SetFromEuler(_vec);
}

/// \brief Set the quaternion from Euler angles. The order of operations
/// is roll, pitch, yaw around a fixed body frame axis
/// (the original frame of the object before rotation is applied).
Expand All @@ -386,16 +355,6 @@ namespace gz::math
this->SetFromEuler(_vec.X(), _vec.Y(), _vec.Z());
}

/// \brief Set the quaternion from Euler angles.
/// \param[in] _roll Roll angle (radians).
/// \param[in] _pitch Pitch angle (radians).
/// \param[in] _yaw Yaw angle (radians).
/// \deprecated Use SetFromEuler(T, T, T)
public: void GZ_DEPRECATED(7) Euler(T _roll, T _pitch, T _yaw)
{
this->SetFromEuler(_roll, _pitch, _yaw);
}

/// \brief Set the quaternion from Euler angles.
/// \param[in] _roll Roll angle in radians.
/// \param[in] _pitch Pitch angle in radians.
Expand Down Expand Up @@ -529,15 +488,6 @@ namespace gz::math
return this->Euler().Z();
}

/// \brief Return rotation as axis and angle
/// \param[out] _axis rotation axis
/// \param[out] _angle ccw angle in radians
/// \deprecated Use AxisAngle(Vector3<T> &_axis, T &_angle) const
public: void GZ_DEPRECATED(7) ToAxis(Vector3<T> &_axis, T &_angle) const
{
this->AxisAngle(_axis, _angle);
}

/// \brief Convert this quaternion to an axis and angle.
/// \param[out] _axis Rotation axis.
/// \param[out] _angle CCW angle in radians.
Expand All @@ -557,19 +507,6 @@ namespace gz::math
}
}

/// \brief Set from a rotation matrix.
/// \param[in] _mat rotation matrix (must be orthogonal, the function
/// doesn't check it)
///
/// Implementation inspired by
/// http://www.euclideanspace.com/maths/geometry/rotations/
/// conversions/matrixToQuaternion/
/// \deprecated Use SetFromMatrix(const Matrix3<T>&)
public: void GZ_DEPRECATED(7) Matrix(const Matrix3<T> &_mat)
{
this->SetFromMatrix(_mat);
}

/// \brief Set from a rotation matrix.
/// \param[in] _mat Rotation matrix (must be orthogonal, the function
/// doesn't check it).
Expand Down Expand Up @@ -614,22 +551,6 @@ namespace gz::math
}
}

/// \brief Set this quaternion to represent rotation from
/// vector _v1 to vector _v2, so that
/// _v2.Normalize() == this * _v1.Normalize() holds.
///
/// \param[in] _v1 The first vector.
/// \param[in] _v2 The second vector.
///
/// Implementation inspired by
/// http://stackoverflow.com/a/11741520/1076564
/// \deprecated Use SetFrom2Axes(const Vector3<T> &, const Vector3<T> &)
public: void GZ_DEPRECATED(7) From2Axes(
const Vector3<T> &_v1, const Vector3<T> &_v2)
{
this->SetFrom2Axes(_v1, _v2);
}

/// \brief Set this quaternion to represent rotation from
/// vector _v1 to vector _v2, so that
/// _v2.Normalize() == this * _v1.Normalize() holds.
Expand Down Expand Up @@ -1129,60 +1050,27 @@ namespace gz::math
return this->qz;
}

/// \brief Set the x component.
/// \param[in] _v The new value for the x quaternion component.
/// \deprecated Use SetX(T)
public: inline void GZ_DEPRECATED(7) X(T _v)
{
this->SetX(_v);
}

/// \brief Set the x component.
/// \param[in] _v The new value for the x quaternion component.
public: inline void SetX(T _v)
{
this->qx = _v;
}

/// \brief Set the y component.
/// \param[in] _v The new value for the y quaternion component.
/// \deprecated Use SetY(T)
public: inline void GZ_DEPRECATED(7) Y(T _v)
{
this->SetY(_v);
}

/// \brief Set the y component.
/// \param[in] _v The new value for the y quaternion component.
public: inline void SetY(T _v)
{
this->qy = _v;
}


/// \brief Set the z component.
/// \param[in] _v The new value for the z quaternion component.
/// \deprecated Use SetZ(T)
public: inline void GZ_DEPRECATED(7) Z(T _v)
{
this->SetZ(_v);
}

/// \brief Set the z component.
/// \param[in] _v The new value for the z quaternion component.
public: inline void SetZ(T _v)
{
this->qz = _v;
}

/// \brief Set the w component.
/// \param[in] _v The new value for the w quaternion component.
/// \deprecated Use SetW(T)
public: inline void GZ_DEPRECATED(7) W(T _v)
{
this->SetW(_v);
}

/// \brief Set the w component.
/// \param[in] _v The new value for the w quaternion component.
public: inline void SetW(T _v)
Expand Down
16 changes: 0 additions & 16 deletions include/gz/math/SphericalCoordinates.hh
Original file line number Diff line number Diff line change
Expand Up @@ -142,22 +142,6 @@ namespace gz::math
/// \return Type as string
public: static std::string Convert(SurfaceType _type);

/// \brief Get the distance between two points expressed in geographic
/// latitude and longitude. It assumes that both points are at sea level.
/// Example: _latA = 38.0016667 and _lonA = -123.0016667) represents
/// the point with latitude 38d 0'6.00"N and longitude 123d 0'6.00"W.
/// \param[in] _latA Latitude of point A.
/// \param[in] _lonA Longitude of point A.
/// \param[in] _latB Latitude of point B.
/// \param[in] _lonB Longitude of point B.
/// \return Distance in meters.
/// \deprecated Use DistanceWGS84 instead.
public: GZ_DEPRECATED(7) static double Distance(
const gz::math::Angle &_latA,
const gz::math::Angle &_lonA,
const gz::math::Angle &_latB,
const gz::math::Angle &_lonB);

/// \brief Get the distance between two points expressed in geographic
/// latitude and longitude. It assumes that both points are at sea level.
/// Example: _latA = 38.0016667 and _lonA = -123.0016667) represents
Expand Down
Loading