formatting and small fixes

release/4.3a0
Varun Agrawal 2020-12-06 18:20:53 -05:00
parent edb3aea680
commit 534fa6bb31
2 changed files with 6 additions and 7 deletions

View File

@ -82,7 +82,7 @@ Vector3 OrientedPlane3::error(const OrientedPlane3& plane,
Vector3 OrientedPlane3::errorVector(const OrientedPlane3& other, OptionalJacobian<3, 3> H1, Vector3 OrientedPlane3::errorVector(const OrientedPlane3& other, OptionalJacobian<3, 3> H1,
OptionalJacobian<3, 3> H2) const { OptionalJacobian<3, 3> H2) const {
Matrix22 H_n_error_this, H_n_error_other; Matrix22 H_n_error_this, H_n_error_other;
Vector2 n_error = n_.errorVector(other.normal(), H1 ? &H_n_error_this : 0, Vector2 n_error = n_.errorVector(other.n_, H1 ? &H_n_error_this : 0,
H2 ? &H_n_error_other : 0); H2 ? &H_n_error_other : 0);
double d_error = d_ - other.d_; double d_error = d_ - other.d_;

View File

@ -53,8 +53,8 @@ public:
} }
/// Construct from a Unit3 and a distance /// Construct from a Unit3 and a distance
OrientedPlane3(const Unit3& s, double d) : OrientedPlane3(const Unit3& n, double d) :
n_(s), d_(d) { n_(n), d_(d) {
} }
/// Construct from a vector of plane coefficients /// Construct from a vector of plane coefficients
@ -64,8 +64,7 @@ public:
/// Construct from four numbers of plane coeffcients (a, b, c, d) /// Construct from four numbers of plane coeffcients (a, b, c, d)
OrientedPlane3(double a, double b, double c, double d) { OrientedPlane3(double a, double b, double c, double d) {
Point3 p(a, b, c); n_ = Unit3(a, b, c);
n_ = Unit3(p);
d_ = d; d_ = d;
} }
@ -110,7 +109,7 @@ public:
/** Computes the error between two planes. /** Computes the error between two planes.
* The error is a norm 1 difference in tangent space. * The error is a norm 1 difference in tangent space.
* @param the other plane * @param plane The other plane
*/ */
Vector3 error(const OrientedPlane3& plane, Vector3 error(const OrientedPlane3& plane,
OptionalJacobian<3,3> H1 = boost::none, OptionalJacobian<3,3> H1 = boost::none,