#include <transform3D.h>
Public Member Functions | |
Transform3D () | |
Default constructor. | |
Transform3D (double a00, double a01, double a02, double a03, double a10, double a11, double a12, double a13, double a20, double a21, double a22, double a23, double a30, double a31, double a32, double a33) | |
Build a Transform3D instance by explicitly setting element values as if setting the elements of a 4x4 transformation matrix: [[a00, a01, a02, a03], [a10, a11, a12, a13], [a20, a21, a22, a23], [a30, a31, a32, a33]]. | |
Transform3D (const Array2D< double > &source) | |
Build a Transform3D from a homogeneous 4x4 matrix. | |
Transform3D (const Transform3D &src) | |
The copy constructor simply duplicates its argument. | |
~Transform3D () | |
Destructor. | |
Transform3DFunctor | getFunctor () const |
This member function returns a functor which makes it easier to transform arrays of points using algorithms such as std::transform(). | |
template<size_t row, size_t column> | |
double | getValue () const |
This member function returns one element from the matrix representation of the coordinate transform by value. | |
Transform3D | invert () const |
This member function returns the inverse of *this. | |
void | setTransform (double a00, double a01, double a02, double a03, double a10, double a11, double a12, double a13, double a20, double a21, double a22, double a23, double a30, double a31, double a32, double a33) |
Change the Transform3D value by explicitly setting element values as if setting the elements of a 4x4 transformation matrix: [[a00, a01, a02, a03], [a10, a11, a12, a13], [a20, a21, a22, a23], [a30, a31, a32, a33]]. | |
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. | |
void | setValue (double a00, double a01, double a02, double a03, double a10, double a11, double a12, double a13, double a20, double a21, double a22, double a23, double a30, double a31, double a32, double a33) |
This member function is an alias for member function setTransform(). | |
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. | |
Vector3D | operator* (const Vector3D &vector0) const |
This operator takes a point and applies the coordinate transform, returning the result. | |
Transform3D & | operator= (const Transform3D &source) |
The assignment operator simply duplicates its argument. |
Definition at line 34 of file transform3D.h.
dlr::numeric::Transform3D::Transform3D | ( | ) | [inline] |
Default constructor.
Initializes to identity.
Definition at line 41 of file transform3D.h.
Referenced by invert().
dlr::numeric::Transform3D::Transform3D | ( | double | a00, | |
double | a01, | |||
double | a02, | |||
double | a03, | |||
double | a10, | |||
double | a11, | |||
double | a12, | |||
double | a13, | |||
double | a20, | |||
double | a21, | |||
double | a22, | |||
double | a23, | |||
double | a30, | |||
double | a31, | |||
double | a32, | |||
double | a33 | |||
) | [inline] |
Build a Transform3D instance by explicitly setting element values as if setting the elements of a 4x4 transformation matrix: [[a00, a01, a02, a03], [a10, a11, a12, a13], [a20, a21, a22, a23], [a30, a31, a32, a33]].
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. | |
a03 | 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. | |
a13 | 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. | |
a23 | The value of one element of the transformation matrix. | |
a30 | The value of one element of the transformation matrix. | |
a31 | The value of one element of the transformation matrix. | |
a32 | The value of one element of the transformation matrix. | |
a33 | The value of one element of the transformation matrix. |
Definition at line 73 of file transform3D.h.
dlr::numeric::Transform3D::Transform3D | ( | const Array2D< double > & | source | ) |
Build a Transform3D from a homogeneous 4x4 matrix.
source | A 2D array containing the elements of the desired homogeneous transformation. |
Definition at line 23 of file transform3D.cpp.
References dlr::numeric::Array2D< Type >::columns(), and dlr::numeric::Array2D< Type >::rows().
dlr::numeric::Transform3D::Transform3D | ( | const Transform3D & | src | ) | [inline] |
The copy constructor simply duplicates its argument.
src | This is the Transform3D instance to be copied. |
Definition at line 98 of file transform3D.h.
dlr::numeric::Transform3D::~Transform3D | ( | ) | [inline] |
Transform3DFunctor dlr::numeric::Transform3D::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 45 of file transform3D.cpp.
double dlr::numeric::Transform3D::getValue | ( | ) | const [inline] |
This member function returns one element from the matrix representation of the coordinate transform by value.
Note that indexing is zero-based. For example, calling myTransform3D.value<1, 2>() will return the element from the 2nd row, 3rd column of the matrix representation of the coordinate transformation. Indexing using this function is faster than operator()(), but the indices must be known at compile time. This is an alias for member function template value<row, column>().
Definition at line 144 of file transform3D.h.
Transform3D dlr::numeric::Transform3D::invert | ( | ) | const |
This member function returns the inverse of *this.
It is an error if *this is not invertible.
Definition at line 53 of file transform3D.cpp.
References Transform3D().
double dlr::numeric::Transform3D::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 215 of file transform3D.cpp.
This operator takes a point and applies the coordinate transform, returning the result.
vector0 | The point to be transformed. |
Definition at line 271 of file transform3D.cpp.
References dlr::numeric::Vector3D::x(), dlr::numeric::Vector3D::y(), and dlr::numeric::Vector3D::z().
Transform3D & dlr::numeric::Transform3D::operator= | ( | const Transform3D & | source | ) |
The assignment operator simply duplicates its argument.
source | This is the Transform3D instance to be copied. |
Definition at line 284 of file transform3D.cpp.
References m_00, m_01, m_02, m_03, m_10, m_11, m_12, m_13, m_20, m_21, m_22, m_23, m_30, m_31, and m_32.
void dlr::numeric::Transform3D::setTransform | ( | double | a00, | |
double | a01, | |||
double | a02, | |||
double | a03, | |||
double | a10, | |||
double | a11, | |||
double | a12, | |||
double | a13, | |||
double | a20, | |||
double | a21, | |||
double | a22, | |||
double | a23, | |||
double | a30, | |||
double | a31, | |||
double | a32, | |||
double | a33 | |||
) |
Change the Transform3D value by explicitly setting element values as if setting the elements of a 4x4 transformation matrix: [[a00, a01, a02, a03], [a10, a11, a12, a13], [a20, a21, a22, a23], [a30, a31, a32, a33]].
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. | |
a03 | 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. | |
a13 | 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. | |
a23 | The value of one element of the transformation matrix. | |
a30 | The value of one element of the transformation matrix. | |
a31 | The value of one element of the transformation matrix. | |
a32 | The value of one element of the transformation matrix. | |
a33 | The value of one element of the transformation matrix. |
Definition at line 145 of file transform3D.cpp.
Referenced by dlr::numeric::operator>>(), and setValue().
void dlr::numeric::Transform3D::setValue | ( | double | a00, | |
double | a01, | |||
double | a02, | |||
double | a03, | |||
double | a10, | |||
double | a11, | |||
double | a12, | |||
double | a13, | |||
double | a20, | |||
double | a21, | |||
double | a22, | |||
double | a23, | |||
double | a30, | |||
double | a31, | |||
double | a32, | |||
double | a33 | |||
) | [inline] |
This member function is an alias for member function setTransform().
Definition at line 240 of file transform3D.h.
References setTransform().
void dlr::numeric::Transform3D::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 myTransform3D.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<3, 3>(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 431 of file transform3D.h.
void dlr::numeric::Transform3D::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 myTransform3D.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(3, 3, ...) 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 163 of file transform3D.cpp.
double dlr::numeric::Transform3D::value | ( | ) | const [inline] |
This member function returns one element from the matrix representation of the coordinate transform by value.
Note that indexing is zero-based. For example, calling myTransform3D.value<1, 2>() will return the element from the 2nd row, 3rd column of the matrix representation of the coordinate transformation.
Definition at line 486 of file transform3D.h.
Referenced by dlr::numeric::operator*(), and dlr::numeric::operator<<().