MRPT logo

mrpt::math::TPoint3D Struct Reference

Lightweight 3D point. More...

#include <mrpt/math/lightweight_geom_data.h>

List of all members.

Public Member Functions

 TPoint3D (const TPoint2D &p)
 Implicit constructor from TPoint2D.
 TPoint3D (const TPose2D &p)
 Constructor from TPose2D, losing information.
 TPoint3D (const TPose3D &p)
 Constructor from TPose3D, losing information.
 TPoint3D (const mrpt::poses::CPoint3D &p)
 Implicit constructor from heavyweight type.
 TPoint3D (const mrpt::poses::CPose3D &p)
 Constructor from heavyweight 3D pose.
 TPoint3D (double xx, double yy, double zz)
 Constructor from coordinates.
 TPoint3D ()
 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[].
double distanceTo (const TPoint3D &p) const
 Point-to-point distance.
double sqrDistanceTo (const TPoint3D &p) const
 Point-to-point distance, squared.
double norm () const
 Point norm.
void operator*= (const double f)
 Point scale.
void getAsVector (vector_double &v) const
 Transformation into vector.
const TPoint3Doperator+= (const TPoint3D &p)
 Translation.
const TPoint3Doperator-= (const TPoint3D &p)
 Difference between points.
TPoint3D operator+ (const TPoint3D &p)
 Point sum.
TPoint3D operator- (const TPoint3D &p)
 Poinst substraction.

Public Attributes

double x
 X coordinate.
double y
 Y coordinate.
double z
 Z coordinate.


Detailed Description

Lightweight 3D point.

Allows coordinate access using [] operator.

See also:
mrpt::poses::TPoint3D

Definition at line 196 of file lightweight_geom_data.h.


Constructor & Destructor Documentation

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

Implicit constructor from TPoint2D.

Zeroes the z.

See also:
TPoint2D

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

Constructor from TPose2D, losing information.

Zeroes the z.

See also:
TPose2D

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

Constructor from TPose3D, losing information.

See also:
TPose3D

mrpt::math::TPoint3D::TPoint3D ( const mrpt::poses::CPoint3D p  ) 

Implicit constructor from heavyweight type.

See also:
mrpt::poses::CPoint3D

mrpt::math::TPoint3D::TPoint3D ( const mrpt::poses::CPose3D p  )  [explicit]

Constructor from heavyweight 3D pose.

See also:
mrpt::poses::CPose3D.

mrpt::math::TPoint3D::TPoint3D ( double  xx,
double  yy,
double  zz 
) [inline]

Constructor from coordinates.

Definition at line 237 of file lightweight_geom_data.h.

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

Default fast constructor.

Initializes to garbage.

Definition at line 241 of file lightweight_geom_data.h.


Member Function Documentation

double mrpt::math::TPoint3D::distanceTo ( const TPoint3D p  )  const [inline]

Point-to-point distance.

Definition at line 257 of file lightweight_geom_data.h.

References mrpt::utils::square(), x, y, and z.

void mrpt::math::TPoint3D::getAsVector ( vector_double v  )  const [inline]

Transformation into vector.

Definition at line 281 of file lightweight_geom_data.h.

double mrpt::math::TPoint3D::norm (  )  const [inline]

Point norm.

Definition at line 269 of file lightweight_geom_data.h.

References mrpt::utils::square().

void mrpt::math::TPoint3D::operator*= ( const double  f  )  [inline]

Point scale.

Definition at line 275 of file lightweight_geom_data.h.

TPoint3D mrpt::math::TPoint3D::operator+ ( const TPoint3D p  )  [inline]

Point sum.

Definition at line 306 of file lightweight_geom_data.h.

References x, y, and z.

const TPoint3D& mrpt::math::TPoint3D::operator+= ( const TPoint3D p  )  [inline]

Translation.

Definition at line 288 of file lightweight_geom_data.h.

References x, y, and z.

TPoint3D mrpt::math::TPoint3D::operator- ( const TPoint3D p  )  [inline]

Poinst substraction.

Definition at line 312 of file lightweight_geom_data.h.

References x, y, and z.

const TPoint3D& mrpt::math::TPoint3D::operator-= ( const TPoint3D p  )  [inline]

Difference between points.

Definition at line 297 of file lightweight_geom_data.h.

References x, y, and z.

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

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 251 of file lightweight_geom_data.h.

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

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 245 of file lightweight_geom_data.h.

double mrpt::math::TPoint3D::sqrDistanceTo ( const TPoint3D p  )  const [inline]

Point-to-point distance, squared.

Definition at line 263 of file lightweight_geom_data.h.

References mrpt::utils::square(), x, y, and z.


Member Data Documentation




Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:21:34 EDT 2009