35 #ifndef vpPOSEVECTOR_H
36 #define vpPOSEVECTOR_H
52 #include <visp3/core/vpArray2D.h>
53 #include <visp3/core/vpHomogeneousMatrix.h>
54 #include <visp3/core/vpMatrix.h>
55 #include <visp3/core/vpRotationMatrix.h>
57 #ifdef VISP_HAVE_NLOHMANN_JSON
58 #include <nlohmann/json.hpp>
194 vpPoseVector(
double tx,
double ty,
double tz,
double tux,
double tuy,
double tuz);
202 vpPoseVector buildFrom(
double tx,
double ty,
double tz,
double tux,
double tuy,
double tuz);
220 void load(std::ifstream &f);
246 inline double &
operator[](
unsigned int i) {
return *(data + i); }
265 inline const double &
operator[](
unsigned int i)
const {
return *(data + i); }
269 int print(std::ostream &s,
unsigned int length,
char const *intro = 0)
const;
276 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify =
true)
285 void save(std::ofstream &f)
const;
286 void set(
double tx,
double ty,
double tz,
double tux,
double tuy,
double tuz);
289 std::vector<double> toStdVector()
const;
291 #ifdef VISP_HAVE_NLOHMANN_JSON
298 void parse_json(
const nlohmann::json &j);
299 void convert_to_json(nlohmann::json &j)
const;
303 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
317 #ifdef VISP_HAVE_NLOHMANN_JSON
318 #include <nlohmann/json.hpp>
321 r.convert_to_json(j);
Implementation of a generic 2D array used as base class for matrices and vectors.
friend void to_json(nlohmann::json &j, const vpArray2D< T > &array)
static bool load(const std::string &filename, vpArray2D< Type > &A, bool binary=false, char *header=nullptr)
vpArray2D< Type > t() const
Compute the transpose of the array.
static bool save(const std::string &filename, const vpArray2D< Type > &A, bool binary=false, const char *header="")
friend void from_json(const nlohmann::json &j, vpArray2D< T > &array)
error that can be emitted by ViSP classes.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a pose vector and operations on poses.
vp_deprecated void init()
const double & operator[](unsigned int i) const
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)
double & operator[](unsigned int i)
static const std::string jsonTypeName
Implementation of a rotation vector as quaternion angle minimal representation.
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of row vector and the associated operations.
Implementation of a rotation vector as axis-angle minimal representation.
Class that consider the case of a translation vector.