26#include <gtsam/geometry/Unit3.h>
45 inline constexpr static auto dimension = 3;
62 : n_(vec(0), vec(1), vec(2)), d_(vec(3)) {}
75 void print(
const std::string& s = std::string())
const;
79 return (n_.equals(s.n_, tol) && (std::abs(d_ - s.d_) < tol));
92 OptionalJacobian<3, 6> Hr = {})
const;
101 Vector3 errorVector(
const OrientedPlane3& other,
102 OptionalJacobian<3, 3> H1 = {},
103 OptionalJacobian<3, 3> H2 = {})
const;
106 inline static size_t Dim() {
111 inline size_t dim()
const {
120 Vector3 localCoordinates(
const OrientedPlane3& s)
const;
124 Vector3 unit_vec = n_.unitVector();
125 return Vector4(unit_vec[0], unit_vec[1], unit_vec[2], d_);
130 if (H) *H << I_2x2, Z_2x1;
136 if (H) *H = Matrix13{{0, 0, 1}};
Macros for Matrix constants to avoid excessive template instantiation.
Macros for Vector constants to avoid excessive template instantiation.
3D Pose manifold SO(3) x R^3 and group SE(3)
Global functions in a separate testing namespace.
Definition chartTesting.h:28
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
Both ManifoldTraits and Testable.
Definition Manifold.h:156
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:40
Represents an infinite plane in 3D, which is composed of a planar normal and its perpendicular distan...
Definition OrientedPlane3.h:39
OrientedPlane3(double a, double b, double c, double d)
Construct from four numbers of plane coeffcients (a, b, c, d).
Definition OrientedPlane3.h:65
Vector4 planeCoefficients() const
Returns the plane coefficients.
Definition OrientedPlane3.h:123
OrientedPlane3(const Unit3 &n, double d)
Construct from a Unit3 and a distance.
Definition OrientedPlane3.h:56
size_t dim() const
Dimensionality of tangent space = 3 DOF.
Definition OrientedPlane3.h:111
bool equals(const OrientedPlane3 &s, double tol=1e-9) const
The equals function with tolerance.
Definition OrientedPlane3.h:78
OrientedPlane3(const Vector4 &vec)
Construct from a vector of plane coefficients.
Definition OrientedPlane3.h:61
static size_t Dim()
Dimensionality of tangent space = 3 DOF.
Definition OrientedPlane3.h:106
OrientedPlane3()
Default constructor.
Definition OrientedPlane3.h:51
double distance(OptionalJacobian< 1, 3 > H={}) const
Return the perpendicular distance to the origin.
Definition OrientedPlane3.h:135
Unit3 normal(OptionalJacobian< 2, 3 > H={}) const
Return the normal.
Definition OrientedPlane3.h:129
A 3D pose (R,t) : (Rot3,Point3).
Definition Pose3.h:42
Represents a 3D point on a unit sphere.
Definition Unit3.h:44