39 #ifndef _vpHomogeneousMatrix_h_
40 #define _vpHomogeneousMatrix_h_
54 #include <visp3/core/vpArray2D.h>
55 #include <visp3/core/vpRotationMatrix.h>
56 #include <visp3/core/vpThetaUVector.h>
58 #include <visp3/core/vpPoseVector.h>
60 #ifdef VISP_HAVE_NLOHMANN_JSON
61 #include <nlohmann/json.hpp>
212 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
224 void buildFrom(
const std::vector<float> &v);
225 void buildFrom(
const std::vector<double> &v);
226 void buildFrom(
double tx,
double ty,
double tz,
double tux,
double tuy,
double tuz);
228 void convert(std::vector<float> &M);
229 void convert(std::vector<double> &M);
245 bool isAnHomogeneousMatrix(
double threshold = 1e-6)
const;
246 bool isValid()
const;
259 void load(std::ifstream &f);
261 void save(std::ofstream &f)
const;
277 void orthogonalizeRotation();
286 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify =
true)
294 static vpHomogeneousMatrix compute3d3dTransformation(
const std::vector<vpPoint> &p,
const std::vector<vpPoint> &q);
298 #ifdef VISP_HAVE_NLOHMANN_JSON
305 void parse_json(
const nlohmann::json &j);
306 void convert_to_json(nlohmann::json &j)
const;
311 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
324 vp_deprecated
void setIdentity();
332 #ifdef VISP_HAVE_NLOHMANN_JSON
335 T.convert_to_json(j);
Implementation of a generic 2D array used as base class for matrices and vectors.
static bool load(const std::string &filename, vpArray2D< Type > &A, bool binary=false, char *header=NULL)
void insert(const vpArray2D< Type > &A, unsigned int r, unsigned int c)
friend void to_json(nlohmann::json &j, const vpArray2D< T > &array)
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
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.
static const std::string jsonTypeName
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)
vp_deprecated void init()
virtual ~vpHomogeneousMatrix()
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.
vpColVector operator*(const double &x, const vpColVector &v)