Public Types | Public Member Functions | Static Public Member Functions | List of all members
i3d::CMatrix3d Class Reference

3D-matrix definition. More...

#include <CMatrix3d.h>

Inheritance diagram for i3d::CMatrix3d:
imath::TMatrix< 3, 3 >

Public Types

typedef imath::TMatrix< 3, 3 > BaseClass
 
- Public Types inherited from imath::TMatrix< 3, 3 >
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

 CMatrix3d ()
 Constructor with no member initialization. More...
 
 CMatrix3d (const CMatrix3d &transform)
 
 CMatrix3d (const CVector3d &axisX, const CVector3d &axisY, const CVector3d &axisZ)
 Constructor using 3 vectors to span the transformation space. More...
 
 CMatrix3d (double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
 Constructor using matrix members. More...
 
void Reset ()
 Default reset to identity. More...
 
CVector3d GetMultiplied (const CVector3d &position) const
 
CMatrix3d GetMultiplied (const CMatrix3d &matrix) const
 
void Multiply (const CMatrix3d &matrix)
 
void MultiplyLeft (const CMatrix3d &matrix)
 
CVector3d GetAxisX () const
 Get axis X vector. More...
 
CVector3d GetAxisY () const
 Get axis Y vector. More...
 
CVector3d GetAxisZ () const
 Get axis Z vector. More...
 
CVector3d GetAxesLengths () const
 Get lengths of axes vectors. More...
 
void GetAxesLengths (CVector3d &result) const
 Get lengths of axes vectors. More...
 
i3d::CVector3d GetInvMultiplied (const i3d::CVector3d &position) const
 Inverted operation to GetApply(). More...
 
bool GetInvMultiplied (const i3d::CVector3d &position, i3d::CVector3d &result) const
 Inverted operation to GetApply(). More...
 
CMatrix3d GetInverted () const
 Calculate inverted matrix. More...
 
bool GetInverted (CMatrix3d &result) const
 Calculate inverted matrix. More...
 
CMatrix3d GetTransposed () const
 Calculate transposed matrix. More...
 
double GetDet () const
 Calculate determinant of deformation matrix. More...
 
CMatrix3doperator= (const CMatrix3d &matrix)
 Copy operator. More...
 
CMatrix3d operator* (double scale) const
 Multiplication by scalar number. More...
 
CMatrix3d operator/ (double scale) const
 Division by scalar number. More...
 
- Public Member Functions inherited from imath::TMatrix< 3, 3 >
 TMatrix ()
 Create matrix without initialization. More...
 
 TMatrix (MatrixInitMode mode)
 Create matrix with initialization to some specified one. More...
 
 TMatrix (const TMatrix &matrix)
 Copy constructor. More...
 
void Reset ()
 Set all matrix cells to zero. More...
 
void Clear ()
 Set all matrix cells to zero. More...
 
bool IsDimensionsCountFixed () const
 Check, if number dimensions is fixed. More...
 
int GetDimensionsCount () const
 Get number of dimensions of this array. More...
 
bool SetDimensionsCount (int count)
 Set number of dimensions of this array. More...
 
const SizesTypeGetSizes () const
 Get list of all sizes. More...
 
bool SetSizes (const SizesType &sizes)
 Set list of all sizes. More...
 
int GetSize (int dimension) const
 Get size of array for specified dimension. More...
 
bool SetSize (int dimension, int size)
 Set size of array for specified dimension. More...
 
const ElementTypeGetAt (const IndexType &index) const
 Get element stored at specified index. More...
 
const ElementTypeGetAt (int x, int y) const
 Get element stored at specified index. More...
 
ElementTypeGetAtRef (const IndexType &index)
 Get reference to element stored at specified index. More...
 
ElementTypeGetAtRef (int x, int y)
 Get reference to element stored at specified index. More...
 
void SetAt (const IndexType &index, const ElementType &value)
 Set element at specified index. More...
 
void SetAt (int x, int y, const ElementType &value)
 Set element at specified index. More...
 
void InitToIdentity ()
 Create identity matrix. More...
 
double GetMaxElement () const
 
double GetMinElement () const
 
void GetNegated (TMatrix< Width, Height, double > &result)
 Get result matrix with negated all elements. More...
 
void GetAdded (const TMatrix< Width, Height, double > &matrix, TMatrix< Width, Height, double > &result) const
 Get sum of two matrices. More...
 
void GetSubstracted (const TMatrix< Width, Height, double > &matrix, TMatrix< Width, Height, double > &result) const
 Get result of substraction of two matrices. More...
 
void GetMultiplied (const TMatrix< SecondWidth, Width, double > &matrix, TMatrix< SecondWidth, Height, double > &result) const
 Get result of multiplication of two matrices. More...
 
TMatrix< SecondWidth, Height,
double > 
GetMultiplied (const TMatrix< SecondWidth, Width, double > &matrix) const
 Get result of multiplication of two matrices. More...
 
void GetMultiplied (const TVector< Width, double > &vector, TVector< Height, double > &result) const
 Get result of multiplication of this matrix and some vector. More...
 
TVector< Height, double > GetMultiplied (const TVector< Width, double > &vector) const
 Get result of multiplication of this matrix and some vector. More...
 
void GetScaled (double value, TMatrix< Width, Height, double > &result) const
 Get result of multiplication of this matrix with scalar value. More...
 
void GetTransposed (TMatrix< Height, Width, double > &result) const
 Get transposed matrix. More...
 
TMatrix< Height, Width, double > GetTransposed () const
 Get transposed matrix. More...
 
void Transpose ()
 Transpose matrix. More...
 
double GetTrace () const
 Get trace of this matrix. More...
 
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. More...
 
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. More...
 
void GetColumnVector (int columnIndex, TVector< Height, double > &result)
 Get single column as vector. More...
 
void SetColumnVector (int columnIndex, const TVector< Height, double > &columnVector)
 Set a single column vector to matrix. More...
 
void GetRowVector (int rowIndex, TVector< Width, double > &result)
 Get single row as vector. More...
 
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 ElementTypeoperator[] (const IndexType &index) const
 
ElementTypeoperator[] (const IndexType &index)
 

Static Public Member Functions

static const CMatrix3dGetIdentity ()
 

Detailed Description

3D-matrix definition.

Definition at line 17 of file CMatrix3d.h.

Member Typedef Documentation

Definition at line 20 of file CMatrix3d.h.

Constructor & Destructor Documentation

i3d::CMatrix3d::CMatrix3d ( )
inline

Constructor with no member initialization.

Definition at line 134 of file CMatrix3d.h.

Referenced by GetTransposed(), and operator/().

i3d::CMatrix3d::CMatrix3d ( const CMatrix3d transform)
inline

Definition at line 139 of file CMatrix3d.h.

i3d::CMatrix3d::CMatrix3d ( const CVector3d axisX,
const CVector3d axisY,
const CVector3d axisZ 
)
inline

Constructor using 3 vectors to span the transformation space.

Definition at line 145 of file CMatrix3d.h.

References imath::TMatrix< 3, 3 >::SetAt().

i3d::CMatrix3d::CMatrix3d ( double  m11,
double  m12,
double  m13,
double  m21,
double  m22,
double  m23,
double  m31,
double  m32,
double  m33 
)
inline

Constructor using matrix members.

Definition at line 162 of file CMatrix3d.h.

References imath::TMatrix< 3, 3 >::SetAt().

Member Function Documentation

CVector3d i3d::CMatrix3d::GetAxesLengths ( ) const
inline

Get lengths of axes vectors.

Definition at line 216 of file CMatrix3d.h.

void i3d::CMatrix3d::GetAxesLengths ( CVector3d result) const
inline

Get lengths of axes vectors.

Definition at line 226 of file CMatrix3d.h.

References GetAxisX(), GetAxisY(), GetAxisZ(), i3d::CVector3d::SetX(), i3d::CVector3d::SetY(), and i3d::CVector3d::SetZ().

CVector3d i3d::CMatrix3d::GetAxisX ( ) const
inline

Get axis X vector.

Definition at line 199 of file CMatrix3d.h.

References imath::TMatrix< 3, 3 >::GetAt().

Referenced by GetAxesLengths().

CVector3d i3d::CMatrix3d::GetAxisY ( ) const
inline

Get axis Y vector.

Definition at line 205 of file CMatrix3d.h.

References imath::TMatrix< 3, 3 >::GetAt().

Referenced by GetAxesLengths().

CVector3d i3d::CMatrix3d::GetAxisZ ( ) const
inline

Get axis Z vector.

Definition at line 210 of file CMatrix3d.h.

References imath::TMatrix< 3, 3 >::GetAt().

Referenced by GetAxesLengths().

double i3d::CMatrix3d::GetDet ( ) const
inline

Calculate determinant of deformation matrix.

Definition at line 252 of file CMatrix3d.h.

References imath::TMatrix< 3, 3 >::GetAt().

const CMatrix3d & i3d::CMatrix3d::GetIdentity ( )
inlinestatic

Definition at line 299 of file CMatrix3d.h.

CMatrix3d i3d::CMatrix3d::GetInverted ( ) const
inline

Calculate inverted matrix.

Definition at line 234 of file CMatrix3d.h.

bool i3d::CMatrix3d::GetInverted ( CMatrix3d result) const

Calculate inverted matrix.

i3d::CVector3d i3d::CMatrix3d::GetInvMultiplied ( const i3d::CVector3d position) const

Inverted operation to GetApply().

bool i3d::CMatrix3d::GetInvMultiplied ( const i3d::CVector3d position,
i3d::CVector3d result 
) const

Inverted operation to GetApply().

CVector3d i3d::CMatrix3d::GetMultiplied ( const CVector3d position) const
inline

Definition at line 179 of file CMatrix3d.h.

Referenced by GetMultiplied().

CMatrix3d i3d::CMatrix3d::GetMultiplied ( const CMatrix3d matrix) const
inline

Definition at line 189 of file CMatrix3d.h.

References GetMultiplied().

CMatrix3d i3d::CMatrix3d::GetTransposed ( ) const
inline

Calculate transposed matrix.

Definition at line 244 of file CMatrix3d.h.

References CMatrix3d(), and imath::TMatrix< 3, 3 >::GetAt().

void i3d::CMatrix3d::Multiply ( const CMatrix3d matrix)
void i3d::CMatrix3d::MultiplyLeft ( const CMatrix3d matrix)
CMatrix3d i3d::CMatrix3d::operator* ( double  scale) const
inline

Multiplication by scalar number.

Definition at line 273 of file CMatrix3d.h.

References imath::TMatrix< 3, 3 >::GetScaled().

CMatrix3d i3d::CMatrix3d::operator/ ( double  scale) const
inline

Division by scalar number.

Definition at line 283 of file CMatrix3d.h.

References CMatrix3d(), and imath::TMatrix< 3, 3 >::GetAt().

CMatrix3d & i3d::CMatrix3d::operator= ( const CMatrix3d matrix)
inline

Copy operator.

Definition at line 265 of file CMatrix3d.h.

void i3d::CMatrix3d::Reset ( )

Default reset to identity.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy