Skip to content

Commit

Permalink
Move Rot3::quaternion to the deprecated block
Browse files Browse the repository at this point in the history
  • Loading branch information
HViktorTsoi committed Jun 8, 2022
1 parent 28db8b2 commit a52591c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gtsam/geometry/Rot3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ double Rot3::yaw(OptionalJacobian<1, 3> H) const {
}

/* ************************************************************************* */
Vector Rot3::quaternion() const {
#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
Vector GTSAM_DEPRECATED Rot3::quaternion() const {
gtsam::Quaternion q = toQuaternion();
Vector v(4);
v(0) = q.w();
Expand All @@ -237,6 +238,7 @@ Vector Rot3::quaternion() const {
v(3) = q.z();
return v;
}
#endif

/* ************************************************************************* */
pair<Unit3, double> Rot3::axisAngle() const {
Expand Down
7 changes: 6 additions & 1 deletion gtsam/geometry/Rot3.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,16 @@ class GTSAM_EXPORT Rot3 : public LieGroup<Rot3, 3> {
*/
gtsam::Quaternion toQuaternion() const;

#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
/**
* Converts to a generic matrix to allow for use with matlab
* In format: w x y z
* @deprecated: use Rot3::toQuaternion() instead.
* If still using this API, remind that in the returned Vector `V`,
* `V.x()` denotes the actual `qw`, `V.y()` denotes 'qx', `V.z()` denotes `qy`, and `V.w()` denotes 'qz'.
*/
Vector quaternion() const;
Vector GTSAM_DEPRECATED quaternion() const;
#endif

/**
* @brief Spherical Linear intERPolation between *this and other
Expand Down

0 comments on commit a52591c

Please sign in to comment.