MRPT  1.9.9
mrpt::math::TPose3DQuat Struct Reference

Detailed Description

Lightweight 3D pose (three spatial coordinates, plus a quaternion ).

Allows coordinate access using [] operator.

See also
mrpt::poses::CPose3DQuat

Definition at line 765 of file lightweight_geom_data.h.

#include <mrpt/math/lightweight_geom_data.h>

Inheritance diagram for mrpt::math::TPose3DQuat:
Inheritance graph

Public Types

enum  { static_size = 7 }
 

Public Member Functions

constexpr TPose3DQuat (double _x, double _y, double _z, double _qr, double _qx, double _qy, double _qz)
 Constructor from coordinates. More...
 
 TPose3DQuat ()
 Default fast constructor. More...
 
double & operator[] (size_t i)
 Coordinate access using operator[]. More...
 
constexpr const double & operator[] (size_t i) const
 Coordinate access using operator[]. More...
 
double norm () const
 Pose's spatial coordinates norm. More...
 
void getAsVector (std::vector< double > &v) const
 Gets the pose as a vector of doubles. More...
 
void asString (std::string &s) const
 Returns a human-readable textual representation of the object as "[x y z qr qx qy qz]". More...
 
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]" ) More...
 

Static Public Member Functions

static size_t size ()
 

Public Attributes

double x
 Translation in x,y,z. More...
 
double y
 
double z
 
double qr
 Unit quaternion part, qr,qx,qy,qz. More...
 
double qx
 
double qy
 
double qz
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
static_size 

Definition at line 767 of file lightweight_geom_data.h.

Constructor & Destructor Documentation

◆ TPose3DQuat() [1/2]

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

Constructor from coordinates.

Definition at line 777 of file lightweight_geom_data.h.

◆ TPose3DQuat() [2/2]

mrpt::math::TPose3DQuat::TPose3DQuat ( )
inline

Default fast constructor.

Initializes to garbage.

Definition at line 784 of file lightweight_geom_data.h.

Member Function Documentation

◆ asString() [1/2]

void mrpt::math::TPose3DQuat::asString ( std::string s) const
inline

Returns a human-readable textual representation of the object as "[x y z qr qx qy qz]".

See also
fromString

Definition at line 843 of file lightweight_geom_data.h.

References mrpt::format(), qr, qx, qy, and qz.

◆ asString() [2/2]

std::string mrpt::math::TPose3DQuat::asString ( ) const
inline

Definition at line 847 of file lightweight_geom_data.h.

◆ fromString()

void mrpt::math::TPose3DQuat::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
Exceptions
std::exceptionOn invalid format

Definition at line 408 of file lightweight_geom_data.cpp.

References ASSERTMSG_, and THROW_EXCEPTION.

◆ getAsVector()

void mrpt::math::TPose3DQuat::getAsVector ( std::vector< double > &  v) const
inline

Gets the pose as a vector of doubles.

Definition at line 834 of file lightweight_geom_data.h.

◆ norm()

double mrpt::math::TPose3DQuat::norm ( ) const
inline

Pose's spatial coordinates norm.

Definition at line 832 of file lightweight_geom_data.h.

References mrpt::square().

◆ operator[]() [1/2]

double& mrpt::math::TPose3DQuat::operator[] ( size_t  i)
inline

Coordinate access using operator[].

Order: x,y,z,qr,qx,qy,qz

Definition at line 786 of file lightweight_geom_data.h.

References qr, qx, qy, qz, x, y, and z.

◆ operator[]() [2/2]

constexpr const double& mrpt::math::TPose3DQuat::operator[] ( size_t  i) const
inline

Coordinate access using operator[].

Order: x,y,z,qr,qx,qy,qz

Definition at line 809 of file lightweight_geom_data.h.

References qr, qx, qy, qz, x, y, and z.

◆ size()

static size_t mrpt::math::TPose3DQuat::size ( )
inlinestatic

Definition at line 860 of file lightweight_geom_data.h.

Member Data Documentation

◆ qr

double mrpt::math::TPose3DQuat::qr

Unit quaternion part, qr,qx,qy,qz.

Definition at line 774 of file lightweight_geom_data.h.

Referenced by asString(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_stream(), and operator[]().

◆ qx

double mrpt::math::TPose3DQuat::qx

◆ qy

double mrpt::math::TPose3DQuat::qy

◆ qz

double mrpt::math::TPose3DQuat::qz

◆ x

double mrpt::math::TPose3DQuat::x

◆ y

double mrpt::math::TPose3DQuat::y

◆ z

double mrpt::math::TPose3DQuat::z



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020