39#ifndef VP_HOMOGENEOUS_MATRIX_H
40#define VP_HOMOGENEOUS_MATRIX_H
45#include <visp3/core/vpConfig.h>
60#include <visp3/core/vpArray2D.h>
61#include <visp3/core/vpRotationMatrix.h>
62#include <visp3/core/vpThetaUVector.h>
63#include <visp3/core/vpPoseVector.h>
65#ifdef VISP_HAVE_NLOHMANN_JSON
66#include VISP_NLOHMANN_JSON(json.hpp)
232#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
242 vpHomogeneousMatrix &
buildFrom(
const double &tx,
const double &ty,
const double &tz,
const double &tux,
const double &tuy,
const double &tuz);
244 void convert(std::vector<float> &M);
245 void convert(std::vector<double> &M);
291 void load(std::ifstream &f);
309 void load(
const std::string &filename);
339 void save(std::ofstream &f)
const;
368 void save(
const std::string &filename)
const;
393 VP_NORETURN
void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify =
true)
401 static vpHomogeneousMatrix compute3d3dTransformation(
const std::vector<vpPoint> &p,
const std::vector<vpPoint> &q);
405#ifdef VISP_HAVE_NLOHMANN_JSON
412 void parse_json(
const nlohmann::json &j);
413 void convert_to_json(nlohmann::json &j)
const;
418#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
431 VP_DEPRECATED
void setIdentity();
438 static const unsigned int constr_value_4;
441#ifdef VISP_HAVE_NLOHMANN_JSON
444 T.convert_to_json(j);
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
void insert(const vpArray2D< Type > &A, unsigned int r, unsigned int c)
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
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< double > t() const
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)
Implementation of column vector and the associated operations.
error that can be emitted by ViSP classes.
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpThetaUVector getThetaUVector() const
friend void from_json(const nlohmann::json &j, vpHomogeneousMatrix &T)
void print() const
Print the matrix as a pose vector .
vpRotationMatrix getRotationMatrix() const
bool isAnHomogeneousMatrix(double threshold=1e-6) const
void orthogonalizeRotation()
VP_DEPRECATED void init()
vpHomogeneousMatrix & operator*=(const vpHomogeneousMatrix &M)
VP_NORETURN void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)
vpHomogeneousMatrix & buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
vpHomogeneousMatrix inverse() const
vpTranslationVector getTranslationVector() const
void convert(std::vector< float > &M)
void extract(vpRotationMatrix &R) const
vpColVector getCol(unsigned int j) const
vpHomogeneousMatrix operator*(const vpHomogeneousMatrix &M) const
friend void to_json(nlohmann::json &j, const vpHomogeneousMatrix &T)
static const std::string jsonTypeName
vpHomogeneousMatrix & operator,(double val)
Implementation of a matrix and operations on matrices.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Implementation of a pose vector and operations on poses.
Implementation of a rotation vector as quaternion angle minimal representation.
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as axis-angle minimal representation.
Class that consider the case of a translation vector.