diff --git a/include/gz/math/Angle.hh b/include/gz/math/Angle.hh index 0baaee12..de508778 100644 --- a/include/gz/math/Angle.hh +++ b/include/gz/math/Angle.hh @@ -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); diff --git a/include/gz/math/Helpers.hh b/include/gz/math/Helpers.hh index d1a8477d..19100fc1 100644 --- a/include/gz/math/Helpers.hh +++ b/include/gz/math/Helpers.hh @@ -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::max(); diff --git a/include/gz/math/Matrix3.hh b/include/gz/math/Matrix3.hh index e96d7607..a20f7d75 100644 --- a/include/gz/math/Matrix3.hh +++ b/include/gz/math/Matrix3.hh @@ -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 &, const Vector3 &, - /// const Vector3 &,) - public: void GZ_DEPRECATED(7) Axes(const Vector3 &_xAxis, - const Vector3 &_yAxis, - const Vector3 &_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. @@ -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) - public: void GZ_DEPRECATED(7) Axis(const Vector3 &_axis, T _angle) - { - this->SetFromAxisAngle(_axis, _angle); - } /// \brief Set as a rotation matrix from an axis and angle. /// \param[in] _axis the axis @@ -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 &, const Vector3 &) - public: void GZ_DEPRECATED(7) From2Axes( - const Vector3 &_v1, const Vector3 &_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. @@ -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 &_v) - public: void GZ_DEPRECATED(7) Col(unsigned int _c, const Vector3 &_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]. diff --git a/include/gz/math/Pose3.hh b/include/gz/math/Pose3.hh index f2051aeb..7b6903a1 100644 --- a/include/gz/math/Pose3.hh +++ b/include/gz/math/Pose3.hh @@ -175,69 +175,6 @@ namespace gz::math return Pose3(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 to add to this pose. - /// \return The resulting pose. - public: GZ_DEPRECATED(7) Pose3 operator+(const Pose3 &_pose) const - { - Pose3 result; - - result.p = this->CoordPositionAdd(_pose); - result.q = this->CoordRotationAdd(_pose.q); - - return result; - } - - /// \brief Addition assignment operator. - /// \param[in] _pose Pose3 to add to this pose. - /// \sa operator+(const Pose3 &_pose) const. - /// \return The resulting pose. - public: GZ_DEPRECATED(7) const Pose3 & - operator+=(const Pose3 &_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 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 to subtract from this one. - /// \return The resulting pose. - public: GZ_DEPRECATED(7) Pose3 operator-(const Pose3 &_pose) const - { - return Pose3(this->CoordPositionSub(_pose), - this->CoordRotationSub(_pose.q)); - } - - /// \brief Subtraction assignment operator. - /// \param[in] _pose Pose3 to subtract from this one - /// \sa operator-(const Pose3 &_pose) const. - /// \return The resulting pose - public: GZ_DEPRECATED(7) const Pose3 & - operator-=(const Pose3 &_pose) - { - this->p = this->CoordPositionSub(_pose); - this->q = this->CoordRotationSub(_pose.q); - - return *this; - } - /// \brief Equality operator. /// \param[in] _pose Pose3 for comparison. /// \return True if this pose is equal to the given pose. diff --git a/include/gz/math/Quaternion.hh b/include/gz/math/Quaternion.hh index fa06dc4c..c2381161 100644 --- a/include/gz/math/Quaternion.hh +++ b/include/gz/math/Quaternion.hh @@ -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 @@ -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 &_axis, T _a) - public: void GZ_DEPRECATED(7) Axis(const Vector3 &_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 @@ -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 &) - public: void GZ_DEPRECATED(7) Euler(const Vector3 &_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). @@ -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. @@ -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 &_axis, T &_angle) const - public: void GZ_DEPRECATED(7) ToAxis(Vector3 &_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. @@ -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&) - public: void GZ_DEPRECATED(7) Matrix(const Matrix3 &_mat) - { - this->SetFromMatrix(_mat); - } - /// \brief Set from a rotation matrix. /// \param[in] _mat Rotation matrix (must be orthogonal, the function /// doesn't check it). @@ -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 &, const Vector3 &) - public: void GZ_DEPRECATED(7) From2Axes( - const Vector3 &_v1, const Vector3 &_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. @@ -1129,14 +1050,6 @@ 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) @@ -1144,14 +1057,6 @@ namespace gz::math 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) @@ -1159,15 +1064,6 @@ namespace gz::math 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) @@ -1175,14 +1071,6 @@ namespace gz::math 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) diff --git a/include/gz/math/SphericalCoordinates.hh b/include/gz/math/SphericalCoordinates.hh index 3c895f68..8cd36244 100644 --- a/include/gz/math/SphericalCoordinates.hh +++ b/include/gz/math/SphericalCoordinates.hh @@ -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 diff --git a/src/Angle.cc b/src/Angle.cc index 30c1e856..fc566d03 100644 --- a/src/Angle.cc +++ b/src/Angle.cc @@ -35,24 +35,12 @@ const Angle &Angle::Pi = gPi; const Angle &Angle::HalfPi = gHalfPi; const Angle &Angle::TwoPi = gTwoPi; -////////////////////////////////////////////////// -void Angle::Radian(double _radian) -{ - this->value = _radian; -} - ////////////////////////////////////////////////// void Angle::SetRadian(double _radian) { this->value = _radian; } -////////////////////////////////////////////////// -void Angle::Degree(double _degree) -{ - this->value = _degree * GZ_PI / 180.0; -} - ////////////////////////////////////////////////// void Angle::SetDegree(double _degree) {