Struct TPose3DQuat

Inheritance Relationships

Base Types

Struct Documentation

struct TPose3DQuat : public mrpt::math::TPoseOrPoint, public mrpt::math::internal::ProvideStaticResize<TPose3DQuat>

Lightweight 3D pose (three spatial coordinates, plus a quaternion ). Allows coordinate access using [] operator.

Public Functions

inline constexpr TPose3DQuat(double _x, double _y, double _z, double _qr, double _qx, double _qy, double _qz)

Constructor from coordinates.

TPose3DQuat() = default

Default fast constructor. Initializes to identity transformation.

inline double &operator[](size_t i)

Coordinate access using operator[]. Order: x,y,z,qr,qx,qy,qz

inline 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.

inline void asVector(std::vector<double> &v) const

Gets the pose as a vector of doubles.

inline 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

fromString

inline std::string asString() const
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]” )

See also

asString

Throws:

std::exception – On invalid format

Public Members

double x = {.0}

Translation in x,y,z

double y = {.0}
double z = {.0}
double qr = {1.}

Unit quaternion part, qr,qx,qy,qz

double qx = {.0}
double qy = {.0}
double qz = {.0}

Public Static Functions

static inline TPose3DQuat FromString(const std::string &s)

Public Static Attributes

static constexpr std::size_t static_size = 7