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

Detailed Description

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

Allows coordinate access using [] operator.

See also
mrpt::poses::CPose3D

Definition at line 441 of file lightweight_geom_data.h.

#include <mrpt/math/lightweight_geom_data.h>

Public Member Functions

 TPose3D (const TPoint2D &p)
 Implicit constructor from TPoint2D. More...
 
 TPose3D (const TPose2D &p)
 Implicit constructor from TPose2D. More...
 
 TPose3D (const TPoint3D &p)
 Implicit constructor from TPoint3D. More...
 
 TPose3D (const mrpt::poses::CPose3D &p)
 Implicit constructor from heavyweight type. More...
 
 TPose3D (double _x, double _y, double _z, double _yaw, double _pitch, double _roll)
 Constructor from coordinates. More...
 
 TPose3D ()
 Default fast constructor. More...
 
double & operator[] (size_t i)
 Unsafe coordinate access using operator[]. More...
 
const double & operator[] (size_t i) const
 Unsafe coordinate access using operator[]. More...
 
double norm () const
 Pose's spatial coordinates norm. More...
 
void getAsVector (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 (eg: "[x y z yaw pitch roll]", angles in degrees.) 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]" ) More...
 

Static Public Member Functions

static size_t size ()
 

Public Attributes

double x
 X coordinate. More...
 
double y
 Y coordinate. More...
 
double z
 Z coordinate. More...
 
double yaw
 Yaw coordinate (rotation angle over Z axis). More...
 
double pitch
 Pitch coordinate (rotation angle over Y axis). More...
 
double roll
 Roll coordinate (rotation angle over X coordinate). More...
 

Constructor & Destructor Documentation

◆ TPose3D() [1/6]

mrpt::math::TPose3D::TPose3D ( const TPoint2D p)

Implicit constructor from TPoint2D.

Zeroes all the unprovided information.

See also
TPoint2D

◆ TPose3D() [2/6]

mrpt::math::TPose3D::TPose3D ( const TPose2D p)

Implicit constructor from TPose2D.

Gets the yaw from the 2D pose's phi, zeroing all the unprovided information.

See also
TPose2D

◆ TPose3D() [3/6]

mrpt::math::TPose3D::TPose3D ( const TPoint3D p)

Implicit constructor from TPoint3D.

Zeroes angular information.

See also
TPoint3D

◆ TPose3D() [4/6]

mrpt::math::TPose3D::TPose3D ( const mrpt::poses::CPose3D p)

Implicit constructor from heavyweight type.

See also
mrpt::poses::CPose3D

◆ TPose3D() [5/6]

mrpt::math::TPose3D::TPose3D ( double  _x,
double  _y,
double  _z,
double  _yaw,
double  _pitch,
double  _roll 
)
inline

Constructor from coordinates.

Definition at line 489 of file lightweight_geom_data.h.

◆ TPose3D() [6/6]

mrpt::math::TPose3D::TPose3D ( )
inline

Default fast constructor.

Initializes to garbage.

Definition at line 493 of file lightweight_geom_data.h.

Member Function Documentation

◆ asString() [1/2]

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

Returns a human-readable textual representation of the object (eg: "[x y z yaw pitch roll]", angles in degrees.)

See also
fromString

Definition at line 522 of file lightweight_geom_data.h.

References mrpt::mrpt::format(), and RAD2DEG.

◆ asString() [2/2]

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

Definition at line 523 of file lightweight_geom_data.h.

References asString().

Referenced by asString().

◆ fromString()

void mrpt::math::TPose3D::fromString ( const std::string &  s)

Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8]" )

See also
asString
Exceptions
std::exceptionOn invalid format

◆ getAsVector()

void mrpt::math::TPose3D::getAsVector ( vector_double v) const
inline

Gets the pose as a vector of doubles.

Definition at line 515 of file lightweight_geom_data.h.

References mrpt::dynamicsize_vector< T >::resize().

◆ norm()

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

Pose's spatial coordinates norm.

Definition at line 509 of file lightweight_geom_data.h.

References mrpt::utils::square().

◆ operator[]() [1/2]

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

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 497 of file lightweight_geom_data.h.

◆ operator[]() [2/2]

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

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 503 of file lightweight_geom_data.h.

◆ size()

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

Member Data Documentation

◆ pitch

double mrpt::math::TPose3D::pitch

Pitch coordinate (rotation angle over Y axis).

Definition at line 461 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator!=(), and mrpt::math::operator==().

◆ roll

double mrpt::math::TPose3D::roll

Roll coordinate (rotation angle over X coordinate).

Definition at line 465 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator!=(), and mrpt::math::operator==().

◆ x

double mrpt::math::TPose3D::x

X coordinate.

Definition at line 445 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator!=(), and mrpt::math::operator==().

◆ y

double mrpt::math::TPose3D::y

Y coordinate.

Definition at line 449 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator!=(), and mrpt::math::operator==().

◆ yaw

double mrpt::math::TPose3D::yaw

Yaw coordinate (rotation angle over Z axis).

Definition at line 457 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator!=(), and mrpt::math::operator==().

◆ z

double mrpt::math::TPose3D::z

Z coordinate.

Definition at line 453 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator!=(), and mrpt::math::operator==().




Page generated by Doxygen 1.8.14 for MRPT 1.0.2 SVN: at lun oct 28 00:52:41 CET 2019 Hosted on:
SourceForge.net Logo