Commit 31ae7d58 authored by Davis King's avatar Davis King

Gave point_transform_affine member functions so the user can find

out what the transformation matrix is.
parent fc6d6744
...@@ -93,6 +93,12 @@ namespace dlib ...@@ -93,6 +93,12 @@ namespace dlib
return m*p + b; return m*p + b;
} }
const matrix<double,2,2>& get_m(
) const { return m; }
const dlib::vector<double,2>& get_b(
) const { return b; }
private: private:
matrix<double,2,2> m; matrix<double,2,2> m;
dlib::vector<double,2> b; dlib::vector<double,2> b;
......
...@@ -26,6 +26,8 @@ namespace dlib ...@@ -26,6 +26,8 @@ namespace dlib
); );
/*! /*!
ensures ensures
- #get_m() == m
- #get_b() == b
- When (*this)(p) is invoked it will return a point P such that: - When (*this)(p) is invoked it will return a point P such that:
- P == m*p + b - P == m*p + b
!*/ !*/
...@@ -39,6 +41,20 @@ namespace dlib ...@@ -39,6 +41,20 @@ namespace dlib
to p and returns the result. to p and returns the result.
!*/ !*/
const matrix<double,2,2>& get_m(
) const;
/*!
ensures
- returns the transformation matrix used by this object.
!*/
const dlib::vector<double,2>& get_b(
) const;
/*!
ensures
- returns the offset vector used by this object.
!*/
}; };
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment