Template Class CPoint
Defined in File CPoint.h
Inheritance Relationships
Base Types
public mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >(Template Class CPoseOrPoint)public mrpt::Stringifyable
Class Documentation
-
template<class DERIVEDCLASS, std::size_t DIM>
class CPoint : public mrpt::poses::CPoseOrPoint<DERIVEDCLASS, DIM>, public mrpt::Stringifyable A base class for representing a point in 2D or 3D. For more information refer to the 2D/3D Geometry tutorial online.
See also
Note
This class is based on the CRTP design pattern
Methods common to all 2D or 3D points
-
template<class OTHERCLASS>
inline void AddComponents(const OTHERCLASS &b) Scalar addition of all coordinates. This is different from poses/point composition, which is implemented as “+” operators in classes derived from “CPose”
-
inline void operator*=(const double s)
Scalar multiplication.
-
template<class MATRIX44>
inline void getHomogeneousMatrix(MATRIX44 &out_HM) const Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
See also
-
virtual std::string asString() const override
Returns a human-readable textual representation of the object (eg: “[0.02 1.04]” )
See also
-
void fromString(const std::string &s)
Set the current object value from a string generated by ‘asString’ (eg: “[0.02 1.04]” )
See also
- Throws:
std::exception – On invalid format
-
inline double operator[](unsigned int i) const
-
inline double &operator[](unsigned int i)
Public Functions
-
CPoint() = default
-
template<class OTHERCLASS>