89         const double x, 
const double y, 
const double z,
   154         const double lx, 
const double ly, 
const double lz, 
double& gx,
   155         double& gy, 
double& gz,
   165         const double gx, 
const double gy, 
const double gz, 
double& lx,
   166         double& ly, 
double& lz,
   175     template <
class POINT1, 
class POINT2>
   183     template <
class POINT1, 
class POINT2>
   270         if (!m.fromMatlabStringFormat(
s))
   272         ASSERTMSG_(m.rows() == 1 && m.cols() == 7, 
"Expected vector length=7");
   276         m_quat[0] = m.get_unsafe(0, 3);
   277         m_quat[1] = m.get_unsafe(0, 4);
   278         m_quat[2] = m.get_unsafe(0, 5);
   279         m_quat[3] = m.get_unsafe(0, 6);
   305                 throw std::runtime_error(
   306                     "CPose3DQuat::operator[]: Index of bounds.");
   329                 throw std::runtime_error(
   330                     "CPose3DQuat::operator[]: Index of bounds.");
   384     static constexpr 
bool empty() { 
return false; }
   389             throw std::logic_error(
format(
   390                 "Try to change the size of CPose3DQuat to %u.",
   391                 static_cast<unsigned>(
n)));
   397             throw std::runtime_error(
   398                 "CPose3DQuat::assign: Try to resize to length!=7.");
   404         : 
public std::iterator<std::random_access_iterator_tag, value_type>
   408             std::iterator<std::random_access_iterator_tag, value_type>;
   485             return (*
this) += (-off);
   499             iterator_base::difference_type off)
 const   514         : 
public std::iterator<std::random_access_iterator_tag, value_type>
   518             std::iterator<std::random_access_iterator_tag, value_type>;
   588             iterator_base::difference_type off)
 const   596             return (*
this) += (-off);
   599             iterator_base::difference_type off)
 const   611             iterator_base::difference_type off)
 const CPose3DQuat * m_obj
A reference to the source of this iterator. 
void getAsVector(mrpt::math::CVectorDouble &v) const
Returns a 1x7 vector with [x y z qr qx qy qz]. 
mrpt::math::CQuaternionDouble & quat()
Read/Write access to the quaternion representing the 3D rotation. 
double x() const
Common members of all points & poses classes. 
void inverseComposePoint(const double gx, const double gy, const double gz, double &lx, double &ly, double &lz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *out_jacobian_df_dpose=nullptr) const
Computes the 3D point L such as . 
size_t m_cur_idx
The iterator points to this element. 
const_iterator end() const
void normalize()
Normalize this quaternion, so its norm becomes the unitity. 
std::iterator< std::random_access_iterator_tag, value_type > iterator_base
CPose3DQuat(mrpt::math::TConstructorFlags_Quaternions)
Constructor which left all the quaternion members un-initialized, for use when speed is critical; Use...
void assign(const size_t N, const double val)
mrpt::math::CArrayDouble< 3 > & xyz()
Read/Write access to the translation vector in R^3. 
#define THROW_EXCEPTION(msg)
CPose3DQuat::reference operator*() const
std::reverse_iterator< const_iterator > const_reverse_iterator
reverse_iterator rbegin()
iterator_base::difference_type operator-(const iterator &it) const
TConstructorFlags_Quaternions
static constexpr bool empty()
bool operator!=(const const_iterator &it) const
iterator(CPose3DQuat &obj, size_t start_idx)
const_reverse_iterator rbegin() const
GLdouble GLdouble GLdouble GLdouble q
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0...
bool operator<(const iterator &it2) const
mrpt::math::TPoint3D operator+(const mrpt::math::TPoint3D &L) const
Computes the 3D point G such as . 
CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...
CPose3DQuat(const mrpt::math::TPose3DQuat &p)
Constructor from lightweight object. 
const double & const_reference
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction...
CPose3DQuat::reference operator[](iterator_base::difference_type off) const
mrpt::math::TPose3DQuat asTPose() const
void fromStringRaw(const std::string &s)
Same as fromString, but without requiring the square brackets in the string. 
void sphericalCoordinates(const mrpt::math::TPoint3D &point, double &out_range, double &out_yaw, double &out_pitch, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacob_dryp_dpoint=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *out_jacob_dryp_dpose=nullptr) const
Computes the spherical coordinates of a 3D point as seen from the 6D pose specified by this object...
void check_limits(bool allow_end=false) const
const mrpt::math::CArrayDouble< 3 > & xyz() const
Read-only access to the translation vector in R^3. 
std::iterator< std::random_access_iterator_tag, value_type > iterator_base
void setToNaN() override
Set all data fields to quiet NaN. 
GLsizei GLsizei GLuint * obj
bool operator>(const iterator &it2) const
const_iterator operator++(int)
CPose3DQuat::const_reference operator*() const
iterator & operator+=(iterator_base::difference_type off)
iterator_base::difference_type operator-(const const_iterator &it) const
void composePoint(const double lx, const double ly, const double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *out_jacobian_df_dpose=nullptr) const
Computes the 3D point G such as . 
bool operator!=(const iterator &it) const
A numeric matrix of compile-time fixed size. 
const_iterator begin() const
void getAsVector(mrpt::math::CArrayDouble< 7 > &v) const
const_iterator & operator-=(iterator_base::difference_type off)
value_type T
The type of the matrix elements. 
void composeFrom(const CPose3DQuat &A, const CPose3DQuat &B)
Makes  this method is slightly more efficient than "this= A + B;" since it avoids the temporary objec...
const_iterator operator+(iterator_base::difference_type off) const
static constexpr size_type max_size()
const mrpt::math::CQuaternionDouble & quat() const
Read-only access to the quaternion representing the 3D rotation. 
bool operator!=(const CPoint< DERIVEDCLASS > &p1, const CPoint< DERIVEDCLASS > &p2)
value_type T
The type of the matrix elements. 
CPose2D operator-(const CPose2D &p)
Unary - operator: return the inverse pose "-p" (Note that is NOT the same than a pose with negative x...
const_iterator operator-(iterator_base::difference_type off) const
const CPose3DQuat * m_obj
A reference to the source of this iterator. 
void inverse()
Convert this pose into its inverse, saving the result in itself. 
A base class for representing a pose in 2D or 3D. 
const type_value & getPoseMean() const
bool operator==(const iterator &it) const
double & operator[](unsigned int i)
Read/write [] operator. 
double value_type
The type of the elements. 
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism. 
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz). 
virtual void operator*=(const double s)
Scalar multiplication (all x y z qr qx qy qz elements are multiplied by the scalar). 
iterator operator-(iterator_base::difference_type off) const
GLsizei const GLchar ** string
A class used to store a 3D point. 
type_value & getPoseMean()
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
const_iterator operator--(int)
Lightweight 3D pose (three spatial coordinates, plus a quaternion ). 
mrpt::math::CArrayDouble< 3 > m_coords
The translation vector [x,y,z]. 
void inverseComposePoint(const POINT1 &G, POINT2 &L) const
Computes the 3D point L such as . 
const_iterator & operator++()
CPose3DQuat(TConstructorFlags_Poses)
void composePoint(const POINT1 &L, POINT2 &G) const
Computes the 3D point G such as . 
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. 
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
bool operator<(const const_iterator &it2) const
static void resize(const size_t n)
bool operator==(const CPoint< DERIVEDCLASS > &p1, const CPoint< DERIVEDCLASS > &p2)
CPose3DQuat(const double x, const double y, const double z, const mrpt::math::CQuaternionDouble &q)
Constructor with initilization of the pose - the quaternion is normalized to make sure it's unitary...
A class used to store a 3D pose (a 3D translation + a rotation in 3D). 
void getHomogeneousMatrix(mrpt::math::CMatrixDouble44 &out_HM) const
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (t...
bool operator>(const const_iterator &it2) const
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf. 
CPoint3D operator+(const CPoint3D &L) const
Computes the 3D point G such as . 
CPose3DQuat operator-(const CPose3DQuat &p) const
Return the composed pose . 
iterator operator+(iterator_base::difference_type off) const
iterator & operator-=(iterator_base::difference_type off)
const_reverse_iterator rend() const
const_iterator & operator+=(iterator_base::difference_type off)
The virtual base class which provides a unified interface for all persistent objects in MRPT...
void asString(std::string &s) const
Returns a human-readable textual representation of the object (eg: "[x y z qr qx qy qz]"...
CPose3DQuat()
Default constructor, initialize translation to zeros and quaternion to no rotation. 
static constexpr bool is_PDF()
void inverseComposeFrom(const CPose3DQuat &A, const CPose3DQuat &B)
Makes  this method is slightly more efficient than "this= A - B;" since it avoids the temporary objec...
void check_limits(bool allow_end=false) const
bool operator==(const const_iterator &it) const
mrpt::math::CQuaternionDouble m_quat
The quaternion. 
const double & operator[](unsigned int i) const
Read only [] operator. 
std::ptrdiff_t difference_type
A quaternion, which can represent a 3D rotation as pair , with a real part "r" and a 3D vector ...
size_t m_cur_idx
The iterator points to this element. 
CPose3DQuat operator+(const CPose3DQuat &p) const
Return the composed pose . 
const_iterator & operator--()
const Scalar * const_iterator
const_iterator(const CPose3DQuat &obj, size_t start_idx)
CPose3DQuat & operator+=(const CPose3DQuat &b)
Make . 
static constexpr bool is_3D()
std::reverse_iterator< iterator > reverse_iterator
std::string asString() const
static constexpr size_type size()
CPose3DQuat::const_reference operator[](iterator_base::difference_type off) const
void swap(CPose3DQuat &o)
std::ostream & operator<<(std::ostream &o, const CPoint< DERIVEDCLASS > &p)
Dumps a point as a string [x,y] or [x,y,z]. 
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform. 
CPose3DQuat & operator-=(const CPose3DQuat &b)
Make .