32 double vx_,
double vy_,
double vz_,
double wx_,
double wy_,
double wz_)
56 throw std::out_of_range(
"index out of range");
77 throw std::out_of_range(
"index out of range");
96 template <
typename VECTORLIKE>
100 for (
int i = 0; i < 6; i++)
v[i] = (*
this)[i];
102 template <
typename VECTORLIKE>
111 template <
typename VECTORLIKE>
115 for (
int i = 0; i < 6; i++) (*
this)[i] =
v[i];
constexpr const double & operator[](size_t i) const
void asVector(VECTORLIKE &v) const
Transformation into vector [vx vy vz wx wy wz].
constexpr const double & operator()(int row, int col) const
bool operator==(const TTwist3D &o) const
constexpr TTwist3D(double vx_, double vy_, double vz_, double wx_, double wy_, double wz_)
Constructor from components.
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[vx vy vz wx wy wz]" ) ...
double & operator[](size_t i)
Coordinate access using operator[].
3D twist: 3D velocity vector (vx,vy,vz) + angular velocity (wx,wy,wz)
This base provides a set of functions for maths stuff.
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
TTwist3D()=default
Default fast constructor.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
void rotate(const mrpt::math::TPose3D &rot)
Transform all 6 components for a change of reference frame from "A" to another frame "B" whose rotati...
GLsizei const GLchar ** string
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
void fromVector(const VECTORLIKE &v)
Sets from a vector [vx vy vz wx wy wz].
VECTORLIKE asVector() const
double wx
Angular velocity (rad/s)
Virtual base class for "archives": classes abstracting I/O streams.
double vx
Velocity components: X,Y (m/s)
Provided for STL and matrices/vectors compatibility.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
GLenum GLenum GLvoid * row
bool operator!=(const TTwist3D &o) const
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
double & operator()(int row, int col)
(i,0) access operator (provided for API compatibility with matrices).
std::string asString() const