![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
\( N \times N \) translation matrix in homogeneous coordinates. More...
#include <AffineTransform.hpp>
Inheritance diagram for CDPL::Math::TranslationMatrix< T >:Public Types | |
| typedef T | ValueType |
| The scalar value type. More... | |
| typedef const T | Reference |
Reference type (always a const reference — elements are computed). More... | |
| typedef const T | ConstReference |
| Constant reference type to an element. More... | |
| typedef std::size_t | SizeType |
| The unsigned size type. More... | |
| typedef std::ptrdiff_t | DifferenceType |
| The signed difference type. More... | |
| typedef MatrixReference< SelfType > | ClosureType |
| Closure type used when this matrix appears inside another expression. More... | |
| typedef const MatrixReference< const SelfType > | ConstClosureType |
| Constant closure type used when this matrix appears inside another expression. More... | |
| typedef Matrix< T, std::vector< T > > | MatrixTemporaryType |
| Concrete temporary matrix type used by expression-template machinery. More... | |
| typedef Vector< T, std::vector< T > > | VectorTemporaryType |
| Concrete temporary vector type used when assembling vectors from this matrix. More... | |
Public Types inherited from CDPL::Math::MatrixContainer< TranslationMatrix< T > > | |
| typedef TranslationMatrix< T > | ContainerType |
| The derived matrix container type. More... | |
Public Types inherited from CDPL::Math::MatrixExpression< E > | |
| typedef E | ExpressionType |
| The derived matrix expression type. More... | |
Public Types inherited from CDPL::Math::Expression< E > | |
| typedef E | ExpressionType |
| The derived expression type (made available to expression-template machinery). More... | |
Public Member Functions | |
| TranslationMatrix (SizeType n, const ValueType &tx=ValueType(), const ValueType &ty=ValueType(), const ValueType &tz=ValueType()) | |
| Constructs an \( N \times N \) translation matrix with the supplied per-axis translation components. More... | |
| TranslationMatrix (const TranslationMatrix &m) | |
| Constructs a copy of the translation matrix m. More... | |
| void | set (const ValueType &tx=ValueType(), const ValueType &ty=ValueType(), const ValueType &tz=ValueType()) |
| Sets the per-axis translation components. More... | |
| ConstReference | operator() (SizeType i, SizeType j) const |
| Returns the translation-matrix entry at (i, j). More... | |
| bool | isEmpty () const |
| Tells whether the matrix is empty (size zero). More... | |
| SizeType | getSize1 () const |
| Returns the dimension N (the row count). More... | |
| SizeType | getSize2 () const |
| Returns the dimension N (the column count). More... | |
| SizeType | getMaxSize1 () const |
| Returns the maximum representable row count. More... | |
| SizeType | getMaxSize2 () const |
| Returns the maximum representable column count. More... | |
| TranslationMatrix & | operator= (const TranslationMatrix &m) |
| Copy-assigns the dimension and the translation components from m. More... | |
| void | swap (TranslationMatrix &m) |
| Swaps the dimension and the translation components with m. More... | |
| void | resize (SizeType n) |
| Resizes the matrix dimension to n (the translation components are left unchanged). More... | |
Public Member Functions inherited from CDPL::Math::MatrixContainer< TranslationMatrix< T > > | |
| const ContainerType & | operator() () const |
Returns a const reference to the derived matrix container. More... | |
| ContainerType & | operator() () |
| Returns a reference to the derived matrix container. More... | |
Public Member Functions inherited from CDPL::Math::MatrixExpression< E > | |
| const ExpressionType & | operator() () const |
Returns a const reference to the derived matrix expression. More... | |
| ExpressionType & | operator() () |
| Returns a reference to the derived matrix expression. More... | |
Friends | |
| void | swap (TranslationMatrix &m1, TranslationMatrix &m2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::MatrixContainer< TranslationMatrix< T > > | |
| MatrixContainer () | |
| ~MatrixContainer () | |
Protected Member Functions inherited from CDPL::Math::MatrixExpression< E > | |
| MatrixExpression () | |
| ~MatrixExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
\( N \times N \) translation matrix in homogeneous coordinates.
The diagonal entries are all 1; the last column (above the diagonal) holds the per-axis translation components; all other entries are 0. The size \( N \) is configurable to fit the embedding coordinate dimension plus one (e.g. 4 for translations of 3D points in homogeneous form).
| T | The scalar value type. |
| typedef T CDPL::Math::TranslationMatrix< T >::ValueType |
The scalar value type.
| typedef const T CDPL::Math::TranslationMatrix< T >::Reference |
Reference type (always a const reference — elements are computed).
| typedef const T CDPL::Math::TranslationMatrix< T >::ConstReference |
Constant reference type to an element.
| typedef std::size_t CDPL::Math::TranslationMatrix< T >::SizeType |
The unsigned size type.
| typedef std::ptrdiff_t CDPL::Math::TranslationMatrix< T >::DifferenceType |
The signed difference type.
| typedef MatrixReference<SelfType> CDPL::Math::TranslationMatrix< T >::ClosureType |
Closure type used when this matrix appears inside another expression.
| typedef const MatrixReference<const SelfType> CDPL::Math::TranslationMatrix< T >::ConstClosureType |
Constant closure type used when this matrix appears inside another expression.
| typedef Matrix<T, std::vector<T> > CDPL::Math::TranslationMatrix< T >::MatrixTemporaryType |
Concrete temporary matrix type used by expression-template machinery.
| typedef Vector<T, std::vector<T> > CDPL::Math::TranslationMatrix< T >::VectorTemporaryType |
Concrete temporary vector type used when assembling vectors from this matrix.
|
inlineexplicit |
Constructs an \( N \times N \) translation matrix with the supplied per-axis translation components.
| n | The matrix dimension N. |
| tx | The x-axis translation (default: 0). |
| ty | The y-axis translation (default: 0). |
| tz | The z-axis translation (default: 0). |
|
inline |
Constructs a copy of the translation matrix m.
| m | The translation matrix to copy. |
|
inline |
Sets the per-axis translation components.
| tx | The x-axis translation (default: 0). |
| ty | The y-axis translation (default: 0). |
| tz | The z-axis translation (default: 0). |
|
inline |
Returns the translation-matrix entry at (i, j).
| i | The zero-based row index. |
| j | The zero-based column index. |
| Base::IndexError | if either index is out of range. |
|
inline |
Tells whether the matrix is empty (size zero).
true if N is zero, and false otherwise.
|
inline |
Returns the dimension N (the row count).
|
inline |
Returns the dimension N (the column count).
|
inline |
Returns the maximum representable row count.
|
inline |
Returns the maximum representable column count.
|
inline |
Copy-assigns the dimension and the translation components from m.
| m | The source translation matrix. |
|
inline |
Swaps the dimension and the translation components with m.
| m | The translation matrix to swap with. |
|
inline |
Resizes the matrix dimension to n (the translation components are left unchanged).
| n | The new dimension. |
|
friend |
ADL-enabled free-function form of swap().
| m1 | The first translation matrix. |
| m2 | The second translation matrix. |