Main MRPT website > C++ reference for MRPT 1.5.5
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

Detailed Description

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

Allows coordinate access using [] operator.

See Also
mrpt::poses::CPose3DQuat

Definition at line 483 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
 
double y
 
double z
 Translation in x,y,z. More...
 
double qr
 
double qx
 
double qy
 
double qz
 Unit quaternion part, qr,qx,qy,qz. More...
 

Member Enumeration Documentation

anonymous enum
Enumerator
static_size 

Definition at line 484 of file lightweight_geom_data.h.

Constructor & Destructor Documentation

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 489 of file lightweight_geom_data.h.

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

Default fast constructor.

Initializes to garbage.

Definition at line 491 of file lightweight_geom_data.h.

mrpt::math::TPose3DQuat::TPose3DQuat ( const mrpt::poses::CPose3DQuat p)

Constructor from a CPose3DQuat.

Definition at line 242 of file lightweight_geom_data.cpp.

Member Function Documentation

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 511 of file lightweight_geom_data.h.

References mrpt::mrpt::format().

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

Definition at line 512 of file lightweight_geom_data.h.

References asString().

Referenced by asString().

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 245 of file lightweight_geom_data.cpp.

References ASSERTMSG_, mrpt::mrpt::math::size(), and THROW_EXCEPTION.

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

Gets the pose as a vector of doubles.

Definition at line 504 of file lightweight_geom_data.h.

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

Pose's spatial coordinates norm.

Definition at line 500 of file lightweight_geom_data.h.

References mrpt::math::square().

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

Coordinate access using operator[].

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

Definition at line 496 of file lightweight_geom_data.h.

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 498 of file lightweight_geom_data.h.

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

Definition at line 519 of file lightweight_geom_data.h.

Member Data Documentation

double mrpt::math::TPose3DQuat::qr
double mrpt::math::TPose3DQuat::qx
double mrpt::math::TPose3DQuat::qy
double mrpt::math::TPose3DQuat::qz

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

Definition at line 486 of file lightweight_geom_data.h.

Referenced by mrpt::graphs::detail::graph_ops< GRAPH_T >::load_graph_of_poses_from_text_file().

double mrpt::math::TPose3DQuat::x
double mrpt::math::TPose3DQuat::y
double mrpt::math::TPose3DQuat::z



Page generated by Doxygen 1.8.6 for MRPT 1.5.5 Git: e06b63d Fri Dec 1 14:41:11 2017 +0100 at sáb dic 2 13:00:21 CET 2017