Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Static Public Member Functions | Public Attributes

mrpt::math::TPose2D Struct Reference


Detailed Description

Lightweight 2D pose.

Allows coordinate access using [] operator.

See also:
mrpt::poses::CPose2D

Definition at line 194 of file lightweight_geom_data.h.

#include <mrpt/math/lightweight_geom_data.h>

List of all members.

Public Member Functions

 TPose2D (const TPoint2D &p)
 Implicit constructor from TPoint2D.
 TPose2D (const TPoint3D &p)
 Constructor from TPoint3D, losing information.
 TPose2D (const TPose3D &p)
 Constructor from TPose3D, losing information.
 TPose2D (const mrpt::poses::CPose2D &p)
 Implicit constructor from heavyweight type.
 TPose2D (double xx, double yy, double pphi)
 Constructor from coordinates.
 TPose2D ()
 Default fast constructor.
double & operator[] (size_t i)
 Unsafe coordinate access using operator[].
const double & operator[] (size_t i) const
 Unsafe coordinate access using operator[].
void getAsVector (vector_double &v) const
 Transformation into vector.
void asString (std::string &s) const
 Returns a human-readable textual representation of the object (eg: "[x y yaw]", yaw in degrees).
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 -45.0]" ).

Static Public Member Functions

static size_t size ()

Public Attributes

double x
 X coordinate.
double y
 Y coordinate.
double phi
 Phi coordinate.

Constructor & Destructor Documentation

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

Implicit constructor from TPoint2D.

Zeroes the phi coordinate.

See also:
TPoint2D
mrpt::math::TPose2D::TPose2D ( const TPoint3D p  )  [explicit]

Constructor from TPoint3D, losing information.

Zeroes the phi coordinate.

See also:
TPoint3D
mrpt::math::TPose2D::TPose2D ( const TPose3D p  )  [explicit]

Constructor from TPose3D, losing information.

The phi corresponds to the original pose's yaw.

See also:
TPose3D
mrpt::math::TPose2D::TPose2D ( const mrpt::poses::CPose2D p  ) 

Implicit constructor from heavyweight type.

See also:
mrpt::poses::CPose2D
mrpt::math::TPose2D::TPose2D ( double  xx,
double  yy,
double  pphi 
) [inline]

Constructor from coordinates.

Definition at line 230 of file lightweight_geom_data.h.

mrpt::math::TPose2D::TPose2D (  )  [inline]

Default fast constructor.

Initializes to garbage.

Definition at line 234 of file lightweight_geom_data.h.


Member Function Documentation

void mrpt::math::TPose2D::asString ( std::string &  s  )  const [inline]

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

See also:
fromString

Definition at line 257 of file lightweight_geom_data.h.

References mrpt::format(), mrpt::utils::RAD2DEG(), and internal::y.

std::string mrpt::math::TPose2D::asString (  )  const [inline]

Definition at line 258 of file lightweight_geom_data.h.

References asString().

Referenced by asString().

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

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

See also:
asString
Exceptions:
std::exception On invalid format
void mrpt::math::TPose2D::getAsVector ( vector_double v  )  const [inline]

Transformation into vector.

Definition at line 250 of file lightweight_geom_data.h.

References mrpt::dynamicsize_vector< T >::resize(), and internal::y.

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

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 244 of file lightweight_geom_data.h.

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

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 238 of file lightweight_geom_data.h.

static size_t mrpt::math::TPose2D::size (  )  [inline, static]

Definition at line 265 of file lightweight_geom_data.h.


Member Data Documentation




Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011