|
ACF $AcfVersion:0$
|
2D matrix. More...
#include <CMatrix2d.h>
Public Types | |
| typedef imath::TMatrix< 2, 2 > | BaseClass |
Public Types inherited from imath::TMatrix< 2, 2 > | |
| enum | MatrixInitMode |
| typedef istd::CIndex2d | IndexType |
| typedef istd::CIndex2d | SizesType |
| typedef double | ElementType |
| typedef imath::TVector< Height, double > | ColumnVector |
| typedef imath::TVector< Width, double > | RowVector |
Public Member Functions | |
| CMatrix2d () | |
| Constructor with no member initialization. | |
| CMatrix2d (const CMatrix2d &transform) | |
| CMatrix2d (const CVector2d &axisX, const CVector2d &axisY) | |
| Constructor using 2 vectors to span the transformation space. | |
| CMatrix2d (double m11, double m12, double m21, double m22) | |
| Constructor using matrix members. | |
| void | Reset () |
| Default reset to identity. | |
| void | Reset (double angle, double scale=1.0) |
| Set the matrix using specified angle (in radians) and uniform scale. | |
| void | Reset (double angle, const CVector2d &scale) |
| Set the deformation matrix using specified angle (in radians) and scale determined for both axis separately. | |
| CVector2d | GetMultiplied (const CVector2d &position) const |
| CMatrix2d | GetMultiplied (const CMatrix2d &matrix) const |
| void | Multiply (const CMatrix2d &matrix) |
| void | MultiplyLeft (const CMatrix2d &matrix) |
| CVector2d | GetAxisX () const |
| Get axis X vector. | |
| CVector2d | GetAxisY () const |
| Get axis Y vector. | |
| CVector2d | GetAxesLengths () const |
| Get lengths of axes vectors. | |
| void | GetAxesLengths (CVector2d &result) const |
| Get lengths of axes vectors. | |
| double | GetApproxAngle () const |
| Get angle of axis X in radians. | |
| double | GetApproxScale () const |
| Get approximated scale. | |
| i2d::CVector2d | GetInvMultiplied (const i2d::CVector2d &position) const |
| Inverted operation to GetApply(). | |
| bool | GetInvMultiplied (const i2d::CVector2d &position, i2d::CVector2d &result) const |
| Inverted operation to GetApply(). | |
| CMatrix2d | GetInverted () const |
| Calculate inverted matrix. | |
| bool | GetInverted (CMatrix2d &result) const |
| Calculate inverted matrix. | |
| CMatrix2d | GetTransposed () const |
| Calculate transposed matrix. | |
| bool | GetEigenVectors (i2d::CVector2d &vector1, i2d::CVector2d &vector2, double &value1, double &value2) const |
| Calculate eigen vectors and eigen values. | |
| double | GetDet () const |
| Calculate determinant of deformation matrix. | |
| CMatrix2d & | operator= (const CMatrix2d &matrix) |
| Copy operator. | |
| CMatrix2d | operator+ (const BaseClass &matrix) const |
| CMatrix2d | operator- (const BaseClass &matrix) const |
| CMatrix2d | operator- () |
| CMatrix2d | operator* (double scale) const |
| Multiplication by scalar number. | |
| CMatrix2d | operator/ (double scale) const |
| Division by scalar number. | |
Public Member Functions inherited from imath::TMatrix< 2, 2 > | |
| TMatrix () | |
| Create matrix without initialization. | |
| TMatrix (MatrixInitMode mode) | |
| Create matrix with initialization to some specified one. | |
| TMatrix (const TMatrix &matrix) | |
| Copy constructor. | |
| void | Reset () |
| Set all matrix cells to zero. | |
| void | Clear () |
| Set all matrix cells to zero. | |
| bool | IsDimensionsCountFixed () const |
| Check, if number dimensions is fixed. | |
| int | GetDimensionsCount () const |
| Get number of dimensions of this array. | |
| bool | SetDimensionsCount (int count) |
| Set number of dimensions of this array. | |
| const SizesType & | GetSizes () const |
| Get list of all sizes. | |
| bool | SetSizes (const SizesType &sizes) |
| Set list of all sizes. | |
| int | GetSize (int dimension) const |
| Get size of array for specified dimension. | |
| bool | SetSize (int dimension, int size) |
| Set size of array for specified dimension. | |
| const ElementType & | GetAt (const IndexType &index) const |
| Get element stored at specified index. | |
| const ElementType & | GetAt (int x, int y) const |
| Get element stored at specified index. | |
| ElementType & | GetAtRef (const IndexType &index) |
| Get reference to element stored at specified index. | |
| ElementType & | GetAtRef (int x, int y) |
| Get reference to element stored at specified index. | |
| void | SetAt (const IndexType &index, const ElementType &value) |
| Set element at specified index. | |
| void | SetAt (int x, int y, const ElementType &value) |
| Set element at specified index. | |
| void | InitToIdentity () |
| Create identity matrix. | |
| double | GetMaxElement () const |
| double | GetMinElement () const |
| void | GetNegated (TMatrix< Width, Height, double > &result) |
| Get result matrix with negated all elements. | |
| void | GetAdded (const TMatrix< Width, Height, double > &matrix, TMatrix< Width, Height, double > &result) const |
| Get sum of two matrices. | |
| void | GetSubstracted (const TMatrix< Width, Height, double > &matrix, TMatrix< Width, Height, double > &result) const |
| Get result of substraction of two matrices. | |
| void | GetMultiplied (const TMatrix< SecondWidth, Width, double > &matrix, TMatrix< SecondWidth, Height, double > &result) const |
| Get result of multiplication of two matrices. | |
| TMatrix< SecondWidth, Height, double > | GetMultiplied (const TMatrix< SecondWidth, Width, double > &matrix) const |
| Get result of multiplication of two matrices. | |
| void | GetMultiplied (const TVector< Width, double > &vector, TVector< Height, double > &result) const |
| Get result of multiplication of this matrix and some vector. | |
| TVector< Height, double > | GetMultiplied (const TVector< Width, double > &vector) const |
| Get result of multiplication of this matrix and some vector. | |
| void | GetScaled (double value, TMatrix< Width, Height, double > &result) const |
| Get result of multiplication of this matrix with scalar value. | |
| void | GetTransposed (TMatrix< Height, Width, double > &result) const |
| Get transposed matrix. | |
| TMatrix< Height, Width, double > | GetTransposed () const |
| Get transposed matrix. | |
| void | Transpose () |
| Transpose matrix. | |
| double | GetTrace () const |
| Get trace of this matrix. | |
| double | GetFrobeniusNorm2 () const |
| double | GetFrobeniusNorm () const |
| bool | GetTriangleDecomposed (TMatrix< Width, Height, double > &result, TMatrix< Height, Height, double > *matrixQPtr=NULL, int maxColumns=-1, double minHhNorm=I_BIG_EPSILON) const |
| Transform matrix to upper triangle form using method of Householder reflexions. | |
| bool | GetDecompositionQDQ (TMatrix< Height, Height, double > &matrixQ, TVector< Height, double > &diagonalD, double tolerance=I_BIG_EPSILON, int maxIterations=100) const |
Calculate decomposition in form of QDQ where Q is orthogonal matrix and D is diagonal one. | |
| void | GetColumnVector (int columnIndex, TVector< Height, double > &result) const |
| Get single column as vector. | |
| void | SetColumnVector (int columnIndex, const TVector< Height, double > &columnVector) |
| Set a single column vector to matrix. | |
| void | GetRowVector (int rowIndex, TVector< Width, double > &result) |
| Get single row as vector. | |
| bool | Serialize (iser::IArchive &archive) |
| TMatrix< Width, Height, double > | operator+ (const TMatrix< Width, Height, double > &matrix) const |
| TMatrix< Width, Height, double > | operator- (const TMatrix< Width, Height, double > &matrix) const |
| TMatrix< Width, Height, double > | operator- () |
| TMatrix< SecondWidth, Height, double > | operator* (const TMatrix< SecondWidth, Width, double > &matrix) const |
| TMatrix< Width, Height, double > | operator* (double value) const |
| TMatrix< Width, Height, double > & | operator+= (const TMatrix< Width, Height, double > &matrix) |
| TMatrix< Width, Height, double > & | operator-= (const TMatrix< Width, Height, double > &matrix) |
| TMatrix< Width, Height, double > & | operator*= (double value) |
| bool | operator== (const TMatrix< Width, Height, double > &matrix) const |
| bool | operator!= (const TMatrix< Width, Height, double > &matrix) const |
| const ElementType & | operator[] (const IndexType &index) const |
| ElementType & | operator[] (const IndexType &index) |
| TMatrix< Width, Height, double > & | operator= (const TMatrix< Width, Height, double > &matrix)=default |
Static Public Member Functions | |
| static const CMatrix2d & | GetIdentity () |
2D matrix.
Definition at line 18 of file CMatrix2d.h.
| typedef imath::TMatrix<2, 2> i2d::CMatrix2d::BaseClass |
Definition at line 21 of file CMatrix2d.h.
|
inline |
Constructor with no member initialization.
Definition at line 148 of file CMatrix2d.h.
Referenced by GetTransposed(), and operator/().
|
inline |
Definition at line 153 of file CMatrix2d.h.
Constructor using 2 vectors to span the transformation space.
Definition at line 159 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::SetAt().
|
inline |
Constructor using matrix members.
Definition at line 168 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::SetAt().
| double i2d::CMatrix2d::GetApproxAngle | ( | ) | const |
Get angle of axis X in radians.
Please note that this angle is in radians
| double i2d::CMatrix2d::GetApproxScale | ( | ) | const |
Get approximated scale.
|
inline |
Get lengths of axes vectors.
Definition at line 209 of file CMatrix2d.h.
References GetAxesLengths().
Referenced by GetAxesLengths().
|
inline |
Get lengths of axes vectors.
Definition at line 219 of file CMatrix2d.h.
References GetAxisX(), GetAxisY(), i2d::CVector2d::SetX(), and i2d::CVector2d::SetY().
|
inline |
Get axis X vector.
Definition at line 197 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::GetAt().
Referenced by GetAxesLengths().
|
inline |
Get axis Y vector.
Definition at line 203 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::GetAt().
Referenced by GetAxesLengths().
|
inline |
Calculate determinant of deformation matrix.
Definition at line 242 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::GetAt().
| bool i2d::CMatrix2d::GetEigenVectors | ( | i2d::CVector2d & | vector1, |
| i2d::CVector2d & | vector2, | ||
| double & | value1, | ||
| double & | value2 | ||
| ) | const |
Calculate eigen vectors and eigen values.
The first eigen value is always bigger or equal than the second one.
|
inlinestatic |
Definition at line 306 of file CMatrix2d.h.
|
inline |
Calculate inverted matrix.
Definition at line 226 of file CMatrix2d.h.
References GetInverted().
Referenced by GetInverted().
| bool i2d::CMatrix2d::GetInverted | ( | CMatrix2d & | result | ) | const |
Calculate inverted matrix.
| i2d::CVector2d i2d::CMatrix2d::GetInvMultiplied | ( | const i2d::CVector2d & | position | ) | const |
Inverted operation to GetApply().
| bool i2d::CMatrix2d::GetInvMultiplied | ( | const i2d::CVector2d & | position, |
| i2d::CVector2d & | result | ||
| ) | const |
Inverted operation to GetApply().
Definition at line 187 of file CMatrix2d.h.
References GetMultiplied().
Definition at line 177 of file CMatrix2d.h.
References GetMultiplied().
Referenced by i2d::CAffine2d::GetApply(), i2d::CAffine2d::GetApply(), i2d::CAffine2d::GetApplyToDelta(), i2d::CAffine2d::GetApplyToDelta(), GetMultiplied(), and GetMultiplied().
|
inline |
Calculate transposed matrix.
Definition at line 236 of file CMatrix2d.h.
References CMatrix2d(), and imath::TMatrix< 2, 2 >::GetAt().
| void i2d::CMatrix2d::Multiply | ( | const CMatrix2d & | matrix | ) |
| void i2d::CMatrix2d::MultiplyLeft | ( | const CMatrix2d & | matrix | ) |
|
inline |
Multiplication by scalar number.
Definition at line 288 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::GetScaled().
Definition at line 250 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::GetAdded().
|
inline |
Definition at line 270 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::GetNegated().
Definition at line 260 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::GetSubstracted().
|
inline |
Division by scalar number.
Definition at line 298 of file CMatrix2d.h.
References CMatrix2d(), and imath::TMatrix< 2, 2 >::GetAt().
Copy operator.
Definition at line 280 of file CMatrix2d.h.
References imath::TMatrix< 2, 2 >::operator=().
| void i2d::CMatrix2d::Reset | ( | ) |
Default reset to identity.
| void i2d::CMatrix2d::Reset | ( | double | angle, |
| const CVector2d & | scale | ||
| ) |
Set the deformation matrix using specified angle (in radians) and scale determined for both axis separately.
| void i2d::CMatrix2d::Reset | ( | double | angle, |
| double | scale = 1.0 |
||
| ) |
Set the matrix using specified angle (in radians) and uniform scale.