Lightweight 3D pose (three spatial coordinates, plus a quaternion ).
Allows coordinate access using [] operator.
Definition at line 767 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Public Types | |
| enum | { static_size = 7 } |
Public Member Functions | |
| TPose3DQuat (double _x, double _y, double _z, double _qr, double _qx, double _qy, double _qz) | |
| Constructor from coordinates. More... | |
| TPose3DQuat () | |
| Default fast constructor. More... | |
| TPose3DQuat (const mrpt::poses::CPose3DQuat &p) | |
| Constructor from a CPose3DQuat. More... | |
| double & | operator[] (size_t i) |
| Coordinate access using operator[]. More... | |
| 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 |
| anonymous enum |
| Enumerator | |
|---|---|
| static_size | |
Definition at line 769 of file lightweight_geom_data.h.
|
inline |
Constructor from coordinates.
Definition at line 779 of file lightweight_geom_data.h.
|
inline |
Default fast constructor.
Initializes to garbage.
Definition at line 786 of file lightweight_geom_data.h.
| mrpt::math::TPose3DQuat::TPose3DQuat | ( | const mrpt::poses::CPose3DQuat & | p | ) |
Constructor from a CPose3DQuat.
Definition at line 314 of file lightweight_geom_data.cpp.
|
inline |
Returns a human-readable textual representation of the object as "[x y z qr qx qy qz]".
Definition at line 848 of file lightweight_geom_data.h.
References mrpt::mrpt::format(), qr, qx, qy, and qz.

|
inline |
Definition at line 852 of file lightweight_geom_data.h.
| 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]" )
| std::exception | On invalid format |
Definition at line 324 of file lightweight_geom_data.cpp.
References ASSERTMSG_, mrpt::mrpt::math::size(), and THROW_EXCEPTION.

|
inline |
Gets the pose as a vector of doubles.
Definition at line 839 of file lightweight_geom_data.h.
|
inline |
Pose's spatial coordinates norm.
Definition at line 837 of file lightweight_geom_data.h.
References mrpt::math::square().

|
inline |
|
inline |
|
inlinestatic |
Definition at line 865 of file lightweight_geom_data.h.
| double mrpt::math::TPose3DQuat::qr |
Unit quaternion part, qr,qx,qy,qz.
Definition at line 776 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and operator[]().
| double mrpt::math::TPose3DQuat::qx |
Definition at line 776 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and operator[]().
| double mrpt::math::TPose3DQuat::qy |
Definition at line 776 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and operator[]().
| double mrpt::math::TPose3DQuat::qz |
Definition at line 776 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and operator[]().
| double mrpt::math::TPose3DQuat::x |
Translation in x,y,z.
Definition at line 774 of file lightweight_geom_data.h.
Referenced by mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and operator[]().
| double mrpt::math::TPose3DQuat::y |
Definition at line 774 of file lightweight_geom_data.h.
Referenced by mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and operator[]().
| double mrpt::math::TPose3DQuat::z |
Definition at line 774 of file lightweight_geom_data.h.
Referenced by mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and operator[]().
| Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |