struct mrpt::math::TPose3DQuat¶
Lightweight 3D pose (three spatial coordinates, plus a quaternion ).
Allows coordinate access using [] operator.
See also:
#include <mrpt/math/TPose3DQuat.h> struct TPose3DQuat: public mrpt::math::TPoseOrPoint, public mrpt::math::internal::ProvideStaticResize { // enums enum { static_size = 7, }; // fields double x {.0}; double y {.0}; double z {.0}; double qr {1.}; double qx {.0}; double qy {.0}; double qz {.0}; // construction TPose3DQuat( double _x, double _y, double _z, double _qr, double _qx, double _qy, double _qz ); TPose3DQuat(); // methods double& operator [] (size_t i); constexpr double operator [] (size_t i) const; double norm() const; void asVector(std::vector<double>& v) const; void asString(std::string& s) const; std::string asString() const; void fromString(const std::string& s); static TPose3DQuat FromString(const std::string& s); };
Construction¶
TPose3DQuat( double _x, double _y, double _z, double _qr, double _qx, double _qy, double _qz )
Constructor from coordinates.
TPose3DQuat()
Default fast constructor.
Initializes to identity transformation.
Methods¶
double& operator [] (size_t i)
Coordinate access using operator[].
Order: x,y,z,qr,qx,qy,qz
constexpr double operator [] (size_t i) const
Coordinate access using operator[].
Order: x,y,z,qr,qx,qy,qz
double norm() const
Pose’s spatial coordinates (x,y,z) norm.
void asVector(std::vector<double>& v) const
Gets the pose as a vector of doubles.
void asString(std::string& s) const
Returns a human-readable textual representation of the object as “[x y z qr qx qy qz]”.
See also:
void fromString(const std::string& s)
Set the current object value from a string generated by ‘asString’ (eg: “[0.02 1.04 -0.8 1.0 0.0 0.0 0.0]” )
Parameters:
std::exception |
On invalid format |
See also: