27 double x{.0},
y{.0},
z{.0};
33 double _x,
double _y,
double _z,
double _qr,
double _qx,
double _qy,
35 :
x(_x),
y(_y),
z(_z),
qr(_qr),
qx(_qx),
qy(_qy),
qz(_qz)
60 throw std::out_of_range(
"index out of range");
83 throw std::out_of_range(
"index out of range");
92 for (
size_t i = 0; i < 7; i++)
v[i] = (*
this)[i];
constexpr TPose3DQuat(double _x, double _y, double _z, double _qr, double _qx, double _qy, double _qz)
Constructor from coordinates.
TPose3DQuat()=default
Default fast constructor.
Base type of all TPoseXX and TPointXX classes in mrpt::math.
std::string asString() const
double & operator[](size_t i)
Coordinate access using operator[].
T square(const T x)
Inline function for the square of a number.
This base provides a set of functions for maths stuff.
void asVector(std::vector< double > &v) const
Gets the pose as a vector of doubles.
constexpr const double & operator[](size_t i) const
Coordinate access using operator[].
double x
Translation in x,y,z.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
GLsizei const GLchar ** string
double qr
Unit quaternion part, qr,qx,qy,qz.
Lightweight 3D pose (three spatial coordinates, plus a quaternion ).
Provided for STL and matrices/vectors compatibility.
double norm() const
Pose's spatial coordinates norm.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0...
void asString(std::string &s) const
Returns a human-readable textual representation of the object as "[x y z qr qx qy qz]"...