From 534fa6bb31e9a00f76c160d47adbe4553439685b Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 6 Dec 2020 18:20:53 -0500 Subject: [PATCH] formatting and small fixes --- gtsam/geometry/OrientedPlane3.cpp | 4 ++-- gtsam/geometry/OrientedPlane3.h | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gtsam/geometry/OrientedPlane3.cpp b/gtsam/geometry/OrientedPlane3.cpp index 274d8220c..6af79b5d1 100644 --- a/gtsam/geometry/OrientedPlane3.cpp +++ b/gtsam/geometry/OrientedPlane3.cpp @@ -82,8 +82,8 @@ Vector3 OrientedPlane3::error(const OrientedPlane3& plane, Vector3 OrientedPlane3::errorVector(const OrientedPlane3& other, OptionalJacobian<3, 3> H1, OptionalJacobian<3, 3> H2) const { Matrix22 H_n_error_this, H_n_error_other; - Vector2 n_error = n_.errorVector(other.normal(), H1 ? &H_n_error_this : 0, - H2 ? &H_n_error_other : 0); + Vector2 n_error = n_.errorVector(other.n_, H1 ? &H_n_error_this : 0, + H2 ? &H_n_error_other : 0); double d_error = d_ - other.d_; diff --git a/gtsam/geometry/OrientedPlane3.h b/gtsam/geometry/OrientedPlane3.h index e56e650ab..20fa7c112 100644 --- a/gtsam/geometry/OrientedPlane3.h +++ b/gtsam/geometry/OrientedPlane3.h @@ -53,8 +53,8 @@ public: } /// Construct from a Unit3 and a distance - OrientedPlane3(const Unit3& s, double d) : - n_(s), d_(d) { + OrientedPlane3(const Unit3& n, double d) : + n_(n), d_(d) { } /// Construct from a vector of plane coefficients @@ -64,8 +64,7 @@ public: /// Construct from four numbers of plane coeffcients (a, b, c, d) OrientedPlane3(double a, double b, double c, double d) { - Point3 p(a, b, c); - n_ = Unit3(p); + n_ = Unit3(a, b, c); d_ = d; } @@ -110,7 +109,7 @@ public: /** Computes the error between two planes. * The error is a norm 1 difference in tangent space. - * @param the other plane + * @param plane The other plane */ Vector3 error(const OrientedPlane3& plane, OptionalJacobian<3,3> H1 = boost::none,