42 inline
CPoint3D(const
double x = 0, const
double y = 0, const
double z = 0)
113 static constexpr
bool empty() {
return false; }
118 throw std::logic_error(
format(
119 "Try to change the size of CPoint3D to %u.",
120 static_cast<unsigned>(
n)));
129 std::ostream&
operator<<(std::ostream& o,
const CPoint3D&
p);
const double & const_reference
A compile-time fixed-size numeric matrix container.
static constexpr bool is_3D()
void setToNaN() override
Set all data fields to quiet NaN.
mrpt::math::CVectorFixedDouble< 3 > m_coords
[x,y,z]
std::ostream & operator<<(std::ostream &o, const CPoint2D &p)
Dumps a point as a string (x,y)
void asVector(vector_t &v) const
Return the pose or point as a 3x1 vector [x y z]'.
CPoint3D(const mrpt::math::TPoint3D &p)
Constructor from lightweight object.
static constexpr bool empty()
#define DEFINE_SCHEMA_SERIALIZABLE()
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
static constexpr size_type size()
CPoint3D(const mrpt::math::CVectorFixedDouble< 3 > &xyz)
Constructor from a XYZ 3-vector.
A base class for representing a point in 2D or 3D.
double x() const
Common members of all points & poses classes.
A class used to store a 2D point.
A class used to store a 3D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
mrpt::math::TPoint3D asTPoint() const
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...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
CPoint3D operator-(const CPose3D &b) const
Returns this point as seen from "b", i.e.
double value_type
The type of the elements.
CPoint3D(const double x=0, const double y=0, const double z=0)
Constructor for initializing point coordinates.
CVectorFixed< double, N > CVectorFixedDouble
Specialization of CVectorFixed for double numbers.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
static void resize(const size_t n)
static constexpr bool is_PDF()
CPoint3D operator+(const CPoint3D &b) const
Returns this point plus point "b", i.e.
std::ptrdiff_t difference_type
static constexpr size_type max_size()