19 template <
class DERIVEDCLASS, std::
size_t DIM>
27 for (
int i = 0; i < DERIVEDCLASS::static_size; i++)
28 derived().m_coords[i] = m(0, i);
31 template <
class DERIVEDCLASS, std::
size_t DIM>
34 s = (!DERIVEDCLASS::is3DPoseOrPoint())
36 "[%f %f]", static_cast<const DERIVEDCLASS*>(
this)->x(),
37 static_cast<const DERIVEDCLASS*
>(
this)->
y())
39 "[%f %f %f]", static_cast<const DERIVEDCLASS*>(
this)->x(),
40 static_cast<const DERIVEDCLASS*
>(
this)->
y(),
41 static_cast<const DERIVEDCLASS*
>(
this)->m_coords[2]);
#define THROW_EXCEPTION(msg)
std::string asString() const
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
bool fromMatlabStringFormat(const std::string &s, mrpt::optional_ref< std::ostream > dump_errors_here=std::nullopt)
Reads a matrix from a string in Matlab-like format, for example: "[1 0 2; 0 4 -1]" The string must st...
GLsizei const GLchar ** string
size_type rows() const
Number of rows in the matrix.
size_type cols() const
Number of columns in the matrix.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04]" ) ...