#include <transform2D.h>
Public Member Functions | |
| Transform2D () | |
| Default constructor. | |
| Transform2D (double a00, double a01, double a02, double a10, double a11, double a12, double a20, double a21, double a22) | |
| Build a Transform2D instance by explicitly setting element values as if setting the elements of a 3x3 transformation matrix: [[a00, a01, a02], [a10, a11, a12], [a20, a21, a22]]. | |
| Transform2D (const Array2D< double > &source) | |
| Build a Transform2D from a homogeneous 3x3 matrix. | |
| Transform2D (const Transform2D &src) | |
| The copy constructor simply duplicates its argument. | |
| ~Transform2D () | |
| Destructor. | |
| Transform2DFunctor | getFunctor () const |
| This member function returns a functor which makes it easier to transform arrays of points using algorithms such as std::transform(). | |
| Transform2D | invert () const |
| This member function returns the inverse of *this. | |
| void | setTransform (double a00, double a01, double a02, double a10, double a11, double a12, double a20, double a21, double a22) |
| Change the Transform2D value by explicitly setting element values as if setting the elements of a 3x3 transformation matrix: [[a00, a01, a02], [a10, a11, a12], [a20, a21, a22]]. | |
| void | setValue (size_t row, size_t column, double value) |
| This member function sets one element of the matrix representation of the coordinate transform. | |
| template<size_t row, size_t column> | |
| void | setValue (double value) |
| This member function sets one element from the matrix representation of the coordinate transform. | |
| template<size_t row, size_t column> | |
| double | value () const |
| This member function returns one element from the matrix representation of the coordinate transform by value. | |
| double | operator() (size_t row, size_t column) const |
| This operator returns one element from the matrix representation of the coordinate transform by value. | |
| Vector2D | operator * (const Vector2D &vector0) const |
| This operator takes a point and applies the coordinate transform, returning the result. | |
| Transform2D & | operator= (const Transform2D &source) |
| The assignment operator simply duplicates its argument. | |
Definition at line 34 of file transform2D.h.
| dlr::numeric::Transform2D::Transform2D | ( | ) | [inline] |
Default constructor.
Initializes to identity.
Definition at line 40 of file transform2D.h.
Referenced by invert(), and dlr::numeric::operator *().
| dlr::numeric::Transform2D::Transform2D | ( | double | a00, | |
| double | a01, | |||
| double | a02, | |||
| double | a10, | |||
| double | a11, | |||
| double | a12, | |||
| double | a20, | |||
| double | a21, | |||
| double | a22 | |||
| ) | [inline] |
Build a Transform2D instance by explicitly setting element values as if setting the elements of a 3x3 transformation matrix: [[a00, a01, a02], [a10, a11, a12], [a20, a21, a22]].
| a00 | The value of one element of the transformation matrix. | |
| a01 | The value of one element of the transformation matrix. | |
| a02 | The value of one element of the transformation matrix. | |
| a10 | The value of one element of the transformation matrix. | |
| a11 | The value of one element of the transformation matrix. | |
| a12 | The value of one element of the transformation matrix. | |
| a20 | The value of one element of the transformation matrix. | |
| a21 | The value of one element of the transformation matrix. | |
| a22 | The value of one element of the transformation matrix. |
Definition at line 63 of file transform2D.h.
| dlr::numeric::Transform2D::Transform2D | ( | const Array2D< double > & | source | ) |
Build a Transform2D from a homogeneous 3x3 matrix.
| source | A 2D array containing the elements of the desired homogeneous transformation. |
Definition at line 23 of file transform2D.cpp.
References dlr::numeric::Array2D< Type >::columns(), DLR_THROW, and dlr::numeric::Array2D< Type >::rows().
| dlr::numeric::Transform2D::Transform2D | ( | const Transform2D & | src | ) | [inline] |
The copy constructor simply duplicates its argument.
| src | This is the Transform2D instance to be copied. |
Definition at line 86 of file transform2D.h.
| dlr::numeric::Transform2D::~Transform2D | ( | ) | [inline] |
| Transform2DFunctor dlr::numeric::Transform2D::getFunctor | ( | ) | const |
This member function returns a functor which makes it easier to transform arrays of points using algorithms such as std::transform().
For example:
std::transform(myPoints.begin(), myPoints.end(), myNewPoints.begin(),
myTransform.getFunctor());
Definition at line 44 of file transform2D.cpp.
| Transform2D dlr::numeric::Transform2D::invert | ( | ) | const |
This member function returns the inverse of *this.
It is an error if *this is not invertible.
Definition at line 52 of file transform2D.cpp.
References DLR_THROW, and Transform2D().
| void dlr::numeric::Transform2D::setTransform | ( | double | a00, | |
| double | a01, | |||
| double | a02, | |||
| double | a10, | |||
| double | a11, | |||
| double | a12, | |||
| double | a20, | |||
| double | a21, | |||
| double | a22 | |||
| ) |
Change the Transform2D value by explicitly setting element values as if setting the elements of a 3x3 transformation matrix: [[a00, a01, a02], [a10, a11, a12], [a20, a21, a22]].
| a00 | The value of one element of the transformation matrix. | |
| a01 | The value of one element of the transformation matrix. | |
| a02 | The value of one element of the transformation matrix. | |
| a10 | The value of one element of the transformation matrix. | |
| a11 | The value of one element of the transformation matrix. | |
| a12 | The value of one element of the transformation matrix. | |
| a20 | The value of one element of the transformation matrix. | |
| a21 | The value of one element of the transformation matrix. | |
| a22 | The value of one element of the transformation matrix. |
Definition at line 104 of file transform2D.cpp.
Referenced by dlr::numeric::operator>>().
| void dlr::numeric::Transform2D::setValue | ( | size_t | row, | |
| size_t | column, | |||
| double | value | |||
| ) |
This member function sets one element of the matrix representation of the coordinate transform.
Note that indexing is zero-based. For example, calling myTransform2D.setValue(1, 2, 5.0) will set the element from the 2nd row, 3rd column of the matrix representation of the coordinate transformation to 5.0. If blindingly fast execution is important, consider using the setValue<size_t, size_t>(double) member function instead.
It is not permitted to set the value of the lower-right element of the matrix: setValue(2, 2, ...) will throw an IndexException.
| row | This argument specifies the row of the matrix element to be modified. | |
| column | This argument specifies the row of the matrix element to be modified. | |
| value | This argument specifies the value to be copied into the matrix element at the specified row & column. |
Definition at line 120 of file transform2D.cpp.
References DLR_THROW.
| void dlr::numeric::Transform2D::setValue | ( | double | value | ) | [inline] |
This member function sets one element from the matrix representation of the coordinate transform.
Note that indexing is zero-based. For example, calling myTransform2D.setValue<1, 2>(5.0) will set the element from the 2nd row, 3rd column of the matrix representation of the coordinate transformation to 5.0.
It is not permitted to set the value of the lower-right element of the matrix: setValue<2, 2>(double) will throw an IndexException.
| value | This argument specifies the value to be copied into the matrix element at the specified row & column. |
Definition at line 367 of file transform2D.h.
References DLR_THROW.
| double dlr::numeric::Transform2D::value | ( | ) | const [inline] |
This member function returns one element from the matrix representation of the coordinate transform by value.
For example, calling myTransform2D.value<1, 2>() will return the element from the 2nd row, 3rd column of the matrix representation of the coordinate transformation.
Definition at line 410 of file transform2D.h.
References DLR_THROW3.
Referenced by dlr::numeric::operator *(), and dlr::numeric::operator<<().
| double dlr::numeric::Transform2D::operator() | ( | size_t | row, | |
| size_t | column | |||
| ) | const |
This operator returns one element from the matrix representation of the coordinate transform by value.
If blindingly fast execution is important, consider using value<size_t, size_t>() member function.
| row | The row of the requested element. | |
| column | The column of the requested element. |
Definition at line 160 of file transform2D.cpp.
References DLR_THROW3.
This operator takes a point and applies the coordinate transform, returning the result.
| vector0 | The point to be transformed. |
Definition at line 203 of file transform2D.cpp.
References dlr::numeric::Vector2D::x(), and dlr::numeric::Vector2D::y().
| Transform2D & dlr::numeric::Transform2D::operator= | ( | const Transform2D & | source | ) |
1.5.2