31 double x{.0},
y{.0},
z{.0};
62 double _x,
double _y,
double _z,
double _yaw,
double _pitch,
89 throw std::out_of_range(
"index out of range");
110 throw std::out_of_range(
"index out of range");
203 TPose3D
operator-(
const TPose3D&
b,
const TPose3D&
a);
208 return (p1.
x == p2.
x) && (p1.
y == p2.
y) && (p1.
z == p2.
z) &&
218 return (p1.
x != p2.
x) || (p1.
y != p2.
y) || (p1.
z != p2.
z) ||
std::vector< T1 > operator-(const std::vector< T1 > &v1, const std::vector< T2 > &v2)
void inverseComposePoint(const TPoint3D &g, TPoint3D &l) const
A compile-time fixed-size numeric matrix container.
static void SO3_to_yaw_pitch_roll(const mrpt::math::CMatrixDouble33 &R, double &yaw, double &pitch, double &roll)
constexpr const double & operator[](size_t i) const
Coordinate access using operator[].
double roll
Roll coordinate (rotation angle over X coordinate).
Base type of all TPoseXX and TPointXX classes in mrpt::math.
GLdouble GLdouble GLdouble GLdouble q
mrpt::math::CMatrixDouble33 getRotationMatrix() const
double yaw
Yaw coordinate (rotation angle over Z axis).
mrpt::math::CMatrixDouble44 getHomogeneousMatrix() const
double norm() const
Pose's spatial coordinates norm.
static constexpr TPose3D Identity()
Returns the identity transformation, T=eye(4)
T square(const T x)
Inline function for the square of a number.
This base provides a set of functions for maths stuff.
void fromHomogeneousMatrix(const mrpt::math::CMatrixDouble44 &HG)
constexpr TPose3D()=default
Default fast constructor.
void getAsQuaternion(mrpt::math::CQuaternion< double > &q, mrpt::math::CMatrixFixed< double, 4, 3 > *out_dq_dr=nullptr) const
Returns the quaternion associated to the rotation of this object (NOTE: XYZ translation is ignored) ...
T wrapTo2Pi(T a)
Modifies the given angle to translate it into the [0,2pi[ range.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
GLsizei const GLchar ** string
constexpr TPose3D(double _x, double _y, double _z, double _yaw, double _pitch, double _roll)
Constructor from coordinates.
double pitch
Pitch coordinate (rotation angle over Y axis).
Provided for STL and matrices/vectors compatibility.
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0...
mrpt::math::CMatrixDouble44 getInverseHomogeneousMatrix() const
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
void asVector(std::vector< double > &v) const
Gets the pose as a vector of doubles.
double & operator[](size_t i)
Coordinate access using operator[].
A quaternion, which can represent a 3D rotation as pair , with a real part "r" and a 3D vector ...
constexpr bool operator==(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
std::string asString() const
GLubyte GLubyte GLubyte a
constexpr bool operator!=(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
void composePoint(const TPoint3D &l, TPoint3D &g) const
void composePose(const TPose3D other, TPose3D &result) const