16 #include <type_traits> 53 template <
typename Derived>
56 constexpr std::size_t
rows()
const {
return Derived::static_size; }
57 constexpr std::size_t
cols()
const {
return 1; }
58 constexpr std::size_t
size()
const {
return Derived::static_size; }
67 class PoseOrPoint,
typename = std::enable_if_t<std::is_base_of_v<
69 std::ostream&
operator<<(std::ostream& o,
const PoseOrPoint&
p)
77 class PoseOrPoint,
typename = std::enable_if_t<std::is_base_of_v<
82 for (
int i = 0; i < o.static_size; i++)
in >> o[i];
88 class PoseOrPoint,
typename = std::enable_if_t<std::is_base_of_v<
93 for (
int i = 0; i < o.static_size; i++) out << o[i];
constexpr std::size_t rows() const
static constexpr unsigned char GEOMETRIC_TYPE_POLYGON
Object type identifier for TPolygon2D or TPolygon3D.
Base type of all TPoseXX and TPointXX classes in mrpt::math.
void resize(std::size_t n)
throws if attempted to resize to incorrect length
Standard type for storing any lightweight 2D type.
static constexpr unsigned char GEOMETRIC_TYPE_POINT
Object type identifier for TPoint2D or TPoint3D.
Standard object for storing any 3D lightweight object.
3D twist: 3D velocity vector (vx,vy,vz) + angular velocity (wx,wy,wz)
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
static constexpr unsigned char GEOMETRIC_TYPE_PLANE
Object type identifier for TPlane.
This base provides a set of functions for maths stuff.
2D segment, consisting of two points.
3D segment, consisting of two points.
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
static constexpr unsigned char GEOMETRIC_TYPE_UNDEFINED
Object type identifier for empty TObject2D or TObject3D.
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
Lightweight 3D pose (three spatial coordinates, plus a quaternion ).
constexpr std::size_t size() const
Virtual base class for "archives": classes abstracting I/O streams.
Provided for STL and matrices/vectors compatibility.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
constexpr std::size_t cols() const
static constexpr unsigned char GEOMETRIC_TYPE_SEGMENT
Object type identifier for TSegment2D or TSegment3D.
A quaternion, which can represent a 3D rotation as pair , with a real part "r" and a 3D vector ...
static constexpr unsigned char GEOMETRIC_TYPE_LINE
Object type identifier for TLine2D or TLine3D.
2D polygon, inheriting from std::vector<TPoint2D>.
3D polygon, inheriting from std::vector<TPoint3D>
3D line, represented by a base point and a director vector.
2D line without bounds, represented by its equation .