#include <matrix44.h>

Public Member Functions |
|
|
Constructors and Destructors
|
|
| TMatrix4x4 () | |
| Default constructor. |
|
| TMatrix4x4 (const T *ptr) throw (Exception::NullPointer) | |
| Array constructor. |
|
| TMatrix4x4 (const T ptr[4][4]) throw (Exception::NullPointer) | |
| Array constructor. |
|
| TMatrix4x4 (const TMatrix4x4 &m) | |
| Copy constructor. |
|
| TMatrix4x4 (const TVector4< T > &col1, const TVector4< T > &col2, const TVector4< T > &col3, const TVector4< T > &col4) | |
| Detailed constructor. |
|
| TMatrix4x4 (const T &m11, const T &m12, const T &m13, const T &m14, const T &m21, const T &m22, const T &m23, const T &m24, const T &m31, const T &m32, const T &m33, const T &m34, const T &m41, const T &m42, const T &m43, const T &m44) | |
| Detailed constructor. |
|
| virtual | ~TMatrix4x4 () |
| Destructor. |
|
| virtual void | clear () |
| Clear method. |
|
|
Assignment
|
|
| void | set (const T *ptr) throw (Exception::NullPointer) |
| Assign from array-ptr. |
|
| void | set (const T ptr[4][4]) throw (Exception::NullPointer) |
| Assign from the first sixteen
elements. |
|
| void | set (const TMatrix4x4 &m) |
| Assign from another instance.
|
|
| void | set (const TVector4< T > &col1, const TVector4< T > &col2, const TVector4< T > &col3, const TVector4< T > &col4) |
| Assign from four TVector4. |
|
| void | set (const T &m11, const T &m12, const T &m13, const T &m14, const T &m21, const T &m22, const T &m23, const T &m24, const T &m31, const T &m32, const T &m33, const T &m34, const T &m41, const T &m42, const T &m43, const T &m44) |
| Assign from sixteen values of type
T. |
|
| TMatrix4x4 & | operator= (const T *ptr) throw (Exception::NullPointer) |
| Assignment operator. |
|
| TMatrix4x4 & | operator= (const T ptr[4][4]) throw (Exception::NullPointer) |
| Assignment operator. |
|
| TMatrix4x4 & | operator= (const TMatrix4x4 &m) |
| Assignment operator. |
|
| void | get (T *ptr) const throw (Exception::NullPointer) |
| Assign to an array. |
|
| void | get (T ptr[4][4]) const throw (Exception::NullPointer) |
| Assign to an array. |
|
| void | get (TMatrix4x4 &m) const |
| Assign to another instance. |
|
| void | get (TVector4< T > &col1, TVector4< T > &col2, TVector4< T > &col3, TVector4< T > &col4) const |
| Assign to four variables of type
TVector4 .
|
|
| void | get (T &m11, T &m12, T &m13, T &m14, T &m21, T &m22, T &m23, T &m24, T &m31, T &m32, T &m33, T &m34, T &m41, T &m42, T &m43, T &m44) const |
Assign to sixteen variables of type
T. |
|
| void | swap (TMatrix4x4 &m) |
| Swap the contents of two instances
of TMatrix4x4. |
|
|
Predicates
|
|
| bool | operator== (const TMatrix4x4 &m) const |
| Equality operator. |
|
| bool | operator!= (const TMatrix4x4 &m) const |
| Inequality operator. |
|
| bool | isIdentity () const |
| Test whether this matrix is an
identity matrix. |
|
| bool | isRegular () const |
| Test whether this matrix is regular.
|
|
| bool | isSingular () const |
| Test whether this matrix is
singular. |
|
| bool | isSymmetric () const |
| Test whether this matrix is
symmetric. |
|
| bool | isLowerTriangular () const |
| Test whether the lower triangular is
zero. |
|
| bool | isUpperTriangular () const |
| Test whether the upper triangular is
zero. |
|
| bool | isDiagonal () const |
| Test whether all cells but the
diagonal are zero. |
|
|
Debugging and Diagnostics
|
|
| bool | isValid () const |
| Test whether instance is valid.
|
|
| void | dump (std::ostream &s=std::cout, Size depth=0) const |
| Internal state dump. |
|
Public Attributes |
|
|
Attributes
|
|
| T | m11 |
| 1st cell in the 1st row |
|
| T | m12 |
| 2nd cell in the 1st row |
|
| T | m13 |
| 3rd cell in the 1st row |
|
| T | m14 |
| 4th cell in the 1st row |
|
| T | m21 |
| 1st cell in the 2nd row |
|
| T | m22 |
| 2nd cell in the 2nd row |
|
| T | m23 |
| 3rd cell in the 2nd row |
|
| T | m24 |
| 4th cell in the 2nd row |
|
| T | m31 |
| 1st cell in the 3rd row |
|
| T | m32 |
| 2nd cell in the 3rd row |
|
| T | m33 |
| 3rd cell in the 3rd row |
|
| T | m34 |
| 4th cell in the 3rd row |
|
| T | m41 |
| 1st cell in the 4th row |
|
| T | m42 |
| 2nd cell in the 4th row |
|
| T | m43 |
| 3rd cell in the 4th row |
|
| T | m44 |
| 4th cell in the 4th row |
|
Accessors |
|
| T | getTrace () const |
| Compute the trace. |
|
| void | setIdentity () |
| Set to an identity matrix. |
|
| void | set (const T &t=(T) 1) |
| Set the diagonal elements to the
given value. |
|
| void | transpose () |
| Mirror the Matrix at the diagonal.
|
|
| TVector4< T > | getRow (Position row) const throw (Exception::IndexOverflow) |
| Get a row of the matrix. |
|
| TVector4< T > | getColumn (Position col) const throw (Exception::IndexOverflow) |
| Get a column of the matrix. |
|
| void | setRow (Position row, const TVector4< T > &row_value) throw (Exception::IndexOverflow) |
| Set a row of the matrix. |
|
| void | setColumn (Position col, const TVector4< T > &col_value) throw (Exception::IndexOverflow) |
| Set a column of the matrix. |
|
| bool | isEqual (const TMatrix4x4 &m) const |
| Test whether two matrices are equal.
|
|
| TVector4< T > | getDiagonal () const |
| Get the diagonal of the matrix.
|
|
| T & | operator() (Position row, Position col) throw (Exception::IndexOverflow) |
| Access operator of a cell. |
|
| const T & | operator() (Position row, Position col) const throw (Exception::IndexOverflow) |
| Constant access
operator of a cell. |
|
| const T & | operator[] (Position position) const throw (Exception::IndexOverflow) |
| Constant random
access operator. |
|
| T & | operator[] (Position position) throw (Exception::IndexOverflow) |
| Mutable random access operator.
|
|
| TMatrix4x4 | operator+ () const |
| Positive sign. |
|
| TMatrix4x4 | operator- () const |
| Negative sign. |
|
| TMatrix4x4 | operator+ (const TMatrix4x4 &m) const |
| Addition operator. |
|
| TMatrix4x4 & | operator+= (const TMatrix4x4 &m) |
| Addition operator. |
|
| TMatrix4x4 | operator- (const TMatrix4x4 &m) const |
| Subtraction operator. |
|
| TMatrix4x4 & | operator-= (const TMatrix4x4 &m) |
| Subtraction operator. |
|
| TMatrix4x4 | operator* (const T &scalar) const |
| Multiply by a scalar. |
|
| TMatrix4x4 & | operator*= (const T &scalar) |
| Multiply by a scalar. |
|
| TMatrix4x4 | operator/ (const T &scalar) const throw (Exception::DivisionByZero) |
| Divide by a scalar. |
|
| TMatrix4x4 & | operator/= (const T &scalar) throw (Exception::DivisionByZero) |
| Divide by a scalar. |
|
| TMatrix4x4 | operator* (const TMatrix4x4 &m) const |
| Multiply two matrices. |
|
| TMatrix4x4 & | operator*= (const TMatrix4x4 &m) |
| Multiply two matrices. |
|
| TVector4< T > | operator* (const TVector4< T > &vector) const |
| Multiplication by an instance of
type TVector4 .
|
|
| bool | invert (TMatrix4x4 &inverse) const |
| Invert the matrix. |
|
| bool | invert () |
| Invert the matrix. |
|
| T | getDeterminant () const |
| Compute the determinant. |
|
| void | translate (const T &x, const T &y, const T &z) |
| Translate the matrix. |
|
| void | translate (const TVector3< T > &v) |
| Translate the matrix. |
|
| void | setTranslation (const T &x, const T &y, const T &z) |
| Set the matrix to a translation
matrix. |
|
| void | setTranslation (const TVector3< T > &v) |
| Set the matrix to a translation
matrix. |
|
| void | scale (const T &x_scale, const T &y_scale, const T &z_scale) |
| Scale the matrix. |
|
| void | scale (const T &scale) |
| Scale the matrix. |
|
| void | scale (const TVector3< T > &v) |
| Scale the matrix. |
|
| void | setScale (const T &x_scale, const T &y_scale, const T &z_scale) |
| Set the matrix to a scalation
matrix. |
|
| void | setScale (const T &scale) |
| Set the matrix to a scalation
matrix. |
|
| void | setScale (const TVector3< T > &v) |
| Set the matrix to a scalation
matrix. |
|
| void | rotateX (const TAngle< T > &phi) |
| Rotate the matrix around the x axis.
|
|
| void | setRotationX (const TAngle< T > &phi) |
| Set the matrix to a x rotation
matrix. |
|
| void | rotateY (const TAngle< T > &phi) |
| Rotate the matrix around the y axis.
|
|
| void | setRotationY (const TAngle< T > &phi) |
| Set the matrix to a y rotation
matrix. |
|
| void | rotateZ (const TAngle< T > &phi) |
| Rotate the matrix around the z axis.
|
|
| void | setRotationZ (const TAngle< T > &phi) |
| Set the matrix to a z rotation
matrix. |
|
| void | rotate (const TAngle< T > &phi, const T &axis_x, const T &axis_y, const T &axis_z) |
| Rotate the matrix around a given
axis. |
|
| void | rotate (const TAngle< T > &phi, const TVector3< T > &axis) |
| Rotate the matrix around a given
axis. |
|
| void | rotate (const TAngle< T > &phi, const TVector4< T > &axis) |
| Rotate the matrix around a given
axis. |
|
| void | setRotation (const TAngle< T > &phi, const T &axis_x, const T &axis_y, const T &axis_z) |
| Set the matrix to a rotation matrix.
|
|
| void | setRotation (const TAngle< T > &phi, const TVector3< T > &axis) |
| Set the matrix to a rotation matrix.
|
|
| void | setRotation (const TAngle< T > &phi, const TVector4< T > &axis) |
| Set the matrix to a rotation matrix.
|
|
| static const TMatrix4x4 & | getZero () |
| Create a zero matrix. |
|
| static const TMatrix4x4 & | getIdentity () |
| Create an identity matrix. |
|
| BALL::TMatrix4x4< T >::TMatrix4x4 | ( | ) |
Default constructor.
This method creates a new TMatrix4x4 object. The
components are initialized to 0.
| BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const T * | ptr | ) | throw (Exception::NullPointer) |
Array constructor.
This constructor creates a TMatrix4x4 object from the
first sixteen elements pointed to by ptr.
| ptr | the array to construct from |
| NullPointer | if ptr == 0 |
| BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const T | ptr[4][4] | ) | throw (Exception::NullPointer) |
Array constructor.
This constructor creates a TMatrix4x4 object from the
sixteen elements in the array assigned by
ptr.
| ptr | the array to construct from |
| NullPointer | if ptr == 0 |
| BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const TMatrix4x4< T > & | m | ) |
Copy constructor.
Create a new TMatrix4x4 object from another.
| TMatrix4x4 | the TMatrix4x4 object to be copied | |
| bool | ignored (just for interface consistency) |
| BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const TVector4< T > & | col1, | |
| const TVector4< T > & | col2, | |||
| const TVector4< T > & | col3, | |||
| const TVector4< T > & | col4 | |||
| ) |
Detailed constructor.
Create a new TMatrix4x4 object from four TVector4.
| col1 | assigned to the first column | |
| col2 | assigned to the second column | |
| col3 | assigned to the third column | |
| col4 | assigned to the fourth column |
| BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const T & | m11, | |
| const T & | m12, | |||
| const T & | m13, | |||
| const T & | m14, | |||
| const T & | m21, | |||
| const T & | m22, | |||
| const T & | m23, | |||
| const T & | m24, | |||
| const T & | m31, | |||
| const T & | m32, | |||
| const T & | m33, | |||
| const T & | m34, | |||
| const T & | m41, | |||
| const T & | m42, | |||
| const T & | m43, | |||
| const T & | m44 | |||
| ) |
Detailed constructor.
Create a new TMatrix4x4 object from
sixteen T values.
| m11 | - m44 assigned to the components |
| virtual BALL::TMatrix4x4< T >::~TMatrix4x4 | ( | ) | [virtual] |
Destructor.
Destructs the TMatrix4x4 object. As there are no dynamic data structures, nothing happens.
| void BALL::TMatrix4x4< T >::clear | ( | ) | [virtual] |
Clear method.
The values are set to 0.
| void BALL::TMatrix4x4< T >::dump | ( | std::ostream & | s =
std::cout, |
|
| Size | depth =
0 |
|||
| ) | const |
Internal state dump.
Dump the current internal state of {*this} to the output ostream s with dumping depth depth .
| s | - output stream where to output the internal state of {*this} | |
| depth | - the dumping depth |
| void BALL::TMatrix4x4< T >::get | ( | T & | m11, | |
| T & | m12, | |||
| T & | m13, | |||
| T & | m14, | |||
| T & | m21, | |||
| T & | m22, | |||
| T & | m23, | |||
| T & | m24, | |||
| T & | m31, | |||
| T & | m32, | |||
| T & | m33, | |||
| T & | m34, | |||
| T & | m41, | |||
| T & | m42, | |||
| T & | m43, | |||
| T & | m44 | |||
| ) | const |
Assign to sixteen variables of type T.
| m11 | - m44 the variables to assign to |
| void BALL::TMatrix4x4< T >::get | ( | TVector4< T > & | col1, | |
| TVector4< T > & | col2, | |||
| TVector4< T > & | col3, | |||
| TVector4< T > & | col4 | |||
| ) | const |
Assign to four variables of type TVector4 .
| col1 | the TVector4 to obtain the values of the first column | |
| col2 | the TVector4 to obtain the values of the second column | |
| col3 | the TVector4 to obtain the values of the third column | |
| col4 | the TVector4 to obtain the values of the fourth column |
References BALL::TVector4< T >::h, BALL::TVector4< T >::x, BALL::TVector4< T >::y, and BALL::TVector4< T >::z.
| void BALL::TMatrix4x4< T >::get | ( | TMatrix4x4< T > & | m | ) | const |
Assign to another instance.
Assigns the components to another TMatrix4x4.
| TMatrix4x4 | the TMatrix4x4 to be assigned to |
References BALL::TMatrix4x4< T >::set().
| void BALL::TMatrix4x4< T >::get | ( | T | ptr[4][4] | ) | const throw (Exception::NullPointer) |
Assign to an array.
Assigns the components to an array of sixteen values of
type T.
| NullPointer | if ptr == 0 |
| ptr | the array to assign to |
| void BALL::TMatrix4x4< T >::get | ( | T * | ptr | ) | const throw (Exception::NullPointer) |
Assign to an array.
Assigns the components to a pointer of an array of
sixteen values of type T.
| NullPointer | if ptr == 0 |
| ptr | the pointer to assign to |
| TVector4< T > BALL::TMatrix4x4< T >::getColumn | ( | Position | col | ) | const throw (Exception::IndexOverflow) |
Get a column of the matrix.
| col | the number of the column (0-3) |
| IndexOverflow | if col > 3 |
| T BALL::TMatrix4x4< T >::getDeterminant | ( | ) | const |
Compute the determinant.
Referenced by BALL::TMatrix4x4< T >::isRegular(), and BALL::TMatrix4x4< T >::isSingular().
| TVector4< T > BALL::TMatrix4x4< T >::getDiagonal | ( | ) | const |
Get the diagonal of the matrix.
| const TMatrix4x4< T > & BALL::TMatrix4x4< T >::getIdentity | ( | ) | [static] |
Create an identity matrix.
A new matrix object is created and all elements but the diagonal are set to zero. The diagonal elements are set to 1.
| TVector4< T > BALL::TMatrix4x4< T >::getRow | ( | Position | row | ) | const throw (Exception::IndexOverflow) |
Get a row of the matrix.
| row | the number of the row (0-3) |
| IndexOverflow | if row > 3 |
| T BALL::TMatrix4x4< T >::getTrace | ( | ) | const |
Compute the trace.
Get the sum of the diagonal elements (m11 + m22 + m33 + m44).
| const TMatrix4x4< T > & BALL::TMatrix4x4< T >::getZero | ( | ) | [static] |
Create a zero matrix.
A new matrix object is created and all elements set to 0.
| bool BALL::TMatrix4x4< T >::invert | ( | ) |
Invert the matrix.
Tests if the matrix can be inverted. If this is possible, the result is stored in the matrix.
| bool BALL::TMatrix4x4< T >::invert | ( | TMatrix4x4< T > & | inverse | ) | const |
Invert the matrix.
Tests if the matrix can be inverted. If possible, the result will be inverted and the result returned in inverse .
| inverse | is assigned the inverse matrix |
First, we compute a QR decomposition, then we use it to solve the system A*A^-1 = I <=> R * A^-1 = Q^t, where R is upper triangular.
This is based on the Householder transform algorithm given in the Numerical Recipes.
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, BALL::TMatrix4x4< T >::m44, BALL::Maths::max(), and BALL::TMatrix4x4< T >::scale().
| bool BALL::TMatrix4x4< T >::isDiagonal | ( | ) | const |
Test whether all cells but the diagonal are zero.
| bool BALL::TMatrix4x4< T >::isEqual | ( | const TMatrix4x4< T > & | m | ) | const |
Test whether two matrices are equal.
Two matrices are considered equal, if Maths::isEqual returns true for each pair of corresponding elements.
| m | the matrix to compare with |
References BALL::TMatrix4x4< T >::comp_ptr_, and BALL::Maths::isEqual().
| bool BALL::TMatrix4x4< T >::isIdentity | ( | ) | const |
Test whether this matrix is an identity matrix.
(I.e. m11, m22, m33, m44 = 1 and the other cells have the value 0)
| bool BALL::TMatrix4x4< T >::isLowerTriangular | ( | ) | const |
Test whether the lower triangular is zero.
| bool BALL::TMatrix4x4< T >::isRegular | ( | ) | const |
Test whether this matrix is regular.
References BALL::TMatrix4x4< T >::getDeterminant().
| bool BALL::TMatrix4x4< T >::isSingular | ( | ) | const |
Test whether this matrix is singular.
References BALL::TMatrix4x4< T >::getDeterminant().
| bool BALL::TMatrix4x4< T >::isSymmetric | ( | ) | const |
Test whether this matrix is symmetric.
(m12 = m21, m31 = m13, ...)
| bool BALL::TMatrix4x4< T >::isUpperTriangular | ( | ) | const |
Test whether the upper triangular is zero.
| bool BALL::TMatrix4x4< T >::isValid | ( | ) | const |
Test whether instance is valid.
Always returns true.
| bool BALL::TMatrix4x4< T >::operator!= | ( | const TMatrix4x4< T > & | m | ) | const |
Inequality operator.
Instead of this operator isEqual should be used. isEqual
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| const T & BALL::TMatrix4x4< T >::operator() | ( | Position | row, | |
| Position | col | |||
| ) | const throw (Exception::IndexOverflow) |
Constant access operator of a cell.
| row | the number of the row (0-3) | |
| col | the number of the column (0-3) |
| IndexOverflow | if col ||row > 3 |
| T & BALL::TMatrix4x4< T >::operator() | ( | Position | row, | |
| Position | col | |||
| ) | throw (Exception::IndexOverflow) |
Access operator of a cell.
| row | the number of the row (0-3) | |
| col | the number of the column (0-3) |
| IndexOverflow | if col >3 || row > 3 |
| TVector4< T > BALL::TMatrix4x4< T >::operator* | ( | const TVector4< T > & | vector | ) | const |
Multiplication by an instance of type TVector4 .
References BALL::TVector4< T >::h, BALL::TVector4< T >::x, BALL::TVector4< T >::y, and BALL::TVector4< T >::z.
| TMatrix4x4< T > BALL::TMatrix4x4< T >::operator* | ( | const TMatrix4x4< T > & | m | ) | const |
Multiply two matrices.
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| TMatrix4x4< T > BALL::TMatrix4x4< T >::operator* | ( | const T & | scalar | ) | const |
Multiply by a scalar.
Operator for multiplying every cell value with a scalar value.
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator*= | ( | const TMatrix4x4< T > & | m | ) |
Multiply two matrices.
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator*= | ( | const T & | scalar | ) |
Multiply by a scalar.
Operator for multiplying every cell value with a scalar value.
| TMatrix4x4< T > BALL::TMatrix4x4< T >::operator+ | ( | const TMatrix4x4< T > & | m | ) | const |
Addition operator.
Adds another matrix to this matrix and return the result.
| m | the matrix to add |
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator+= | ( | const TMatrix4x4< T > & | m | ) |
Addition operator.
Adds another matrix to this matrix.
| m | the matrix to add |
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| TMatrix4x4< T > BALL::TMatrix4x4< T >::operator- | ( | const TMatrix4x4< T > & | m | ) | const |
Subtraction operator.
Subtract another matrix from this matrix and return the result
| m | the matrix to subtract |
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator-= | ( | const TMatrix4x4< T > & | m | ) |
Subtraction operator.
Subtract another matrix from this matrix.
| m | the matrix to subtract |
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| TMatrix4x4< T > BALL::TMatrix4x4< T >::operator/ | ( | const T & | scalar | ) | const throw (Exception::DivisionByZero) |
Divide by a scalar.
Operator for dividing every cell value by a scalar value.
| DivisionByZero | if scalar == 0 |
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator/= | ( | const T & | scalar | ) | throw (Exception::DivisionByZero) |
Divide by a scalar.
Operator for dividing every cell value by a scalar value.
| DivisionByZero | if scalar == 0 |
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator= | ( | const TMatrix4x4< T > & | m | ) |
Assignment operator.
Assign the components from another instance of TMatrix4x4.
| TMatrix4x4 | the TMatrix4x4 to assign from |
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator= | ( | const T | ptr[4][4] | ) | throw (Exception::NullPointer) |
Assignment operator.
Assign the components from the first 16 values assigned
by ptr.
| ptr | the array to construct from |
| TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator= | ( | const T * | ptr | ) | throw (Exception::NullPointer) |
Assignment operator.
Assign the components from the first 16 values assigned
by ptr.
| ptr | the array to construct from |
| bool BALL::TMatrix4x4< T >::operator== | ( | const TMatrix4x4< T > & | m | ) | const |
Equality operator.
Instead of this operator isEqual should be used. isEqual
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| T & BALL::TMatrix4x4< T >::operator[] | ( | Position | position | ) | throw (Exception::IndexOverflow) |
Mutable random access operator.
| const T & BALL::TMatrix4x4< T >::operator[] | ( | Position | position | ) | const throw (Exception::IndexOverflow) |
Constant random access operator.
Access single elements of the matrix. index
may assume values in the range of 0 - 15. The elements of
the matrix are returned rows first, i.e., in the following
order: m11, m12,
m13...
| void BALL::TMatrix4x4< T >::rotate | ( | const TAngle< T > & | phi, | |
| const TVector4< T > & | axis | |||
| ) |
Rotate the matrix around a given axis.
| phi | the rotation angle | |
| axis | the axis vector, the fourth component of the vector is ignored |
References BALL::TMatrix4x4< T >::rotate(), BALL::TVector4< T >::x, BALL::TVector4< T >::y, and BALL::TVector4< T >::z.
| void BALL::TMatrix4x4< T >::rotate | ( | const TAngle< T > & | phi, | |
| const TVector3< T > & | axis | |||
| ) |
Rotate the matrix around a given axis.
| phi | the rotation angle | |
| axis | the axis vector |
References BALL::TMatrix4x4< T >::rotate(), BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
| void BALL::TMatrix4x4< T >::rotate | ( | const TAngle< T > & | phi, | |
| const T & | axis_x, | |||
| const T & | axis_y, | |||
| const T & | axis_z | |||
| ) |
Rotate the matrix around a given axis.
| phi | the rotation angle | |
| axis_x | the x component of the axis | |
| axis_y | the y component of the axis | |
| axis_z | the z component of the axis |
Referenced by BALL::TMatrix4x4< T >::rotate(), and BALL::TMatrix4x4< T >::setRotation().
| void BALL::TMatrix4x4< T >::rotateX | ( | const TAngle< T > & | phi | ) |
Rotate the matrix around the x axis.
| phi | the rotation angle |
References BALL::TMatrix4x4< T >::setRotationX().
| void BALL::TMatrix4x4< T >::rotateY | ( | const TAngle< T > & | phi | ) |
Rotate the matrix around the y axis.
| phi | the rotation angle |
References BALL::TMatrix4x4< T >::setRotationY().
| void BALL::TMatrix4x4< T >::rotateZ | ( | const TAngle< T > & | phi | ) |
Rotate the matrix around the z axis.
| phi | the rotation angle |
References BALL::TMatrix4x4< T >::setRotationZ().
| void BALL::TMatrix4x4< T >::scale | ( | const TVector3< T > & | v | ) |
Scale the matrix.
| v | the vector with the scale factor |
References BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
| void BALL::TMatrix4x4< T >::scale | ( | const T & | scale | ) |
Scale the matrix.
| scale | the scale factor |
| void BALL::TMatrix4x4< T >::scale | ( | const T & | x_scale, | |
| const T & | y_scale, | |||
| const T & | z_scale | |||
| ) |
Scale the matrix.
| x_scale | the x scale factor | |
| y_scale | the y scale factor | |
| z_scale | the z scale factor |
Referenced by BALL::TMatrix4x4< T >::invert().
| void BALL::TMatrix4x4< T >::set | ( | const T & | t =
(T)1 |
) |
Set the diagonal elements to the given value.
All other elements are set to 0.
| T | the value to fill with (default: 1) |
| void BALL::TMatrix4x4< T >::set | ( | const T & | m11, | |
| const T & | m12, | |||
| const T & | m13, | |||
| const T & | m14, | |||
| const T & | m21, | |||
| const T & | m22, | |||
| const T & | m23, | |||
| const T & | m24, | |||
| const T & | m31, | |||
| const T & | m32, | |||
| const T & | m33, | |||
| const T & | m34, | |||
| const T & | m41, | |||
| const T & | m42, | |||
| const T & | m43, | |||
| const T & | m44 | |||
| ) |
Assign from sixteen values of type T.
| m11 | - m44 assigned to the components |
| void BALL::TMatrix4x4< T >::set | ( | const TVector4< T > & | col1, | |
| const TVector4< T > & | col2, | |||
| const TVector4< T > & | col3, | |||
| const TVector4< T > & | col4 | |||
| ) |
Assign from four TVector4.
| col1 | assigned to the first column | |
| col2 | assigned to the second column | |
| col3 | assigned to the third column | |
| col4 | assigned to the fourth column |
References BALL::TVector4< T >::h, BALL::TVector4< T >::x, BALL::TVector4< T >::y, and BALL::TVector4< T >::z.
| void BALL::TMatrix4x4< T >::set | ( | const TMatrix4x4< T > & | m | ) |
Assign from another instance.
| TMatrix4x4 | the TMatrix4x4 object to assign from |
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| void BALL::TMatrix4x4< T >::set | ( | const T | ptr[4][4] | ) | throw (Exception::NullPointer) |
Assign from the first sixteen elements.
pointed to by the array assigned by
ptr.
| ptr | the array to construct from |
| NullPointer | if ptr == 0 |
| void BALL::TMatrix4x4< T >::set | ( | const T * | ptr | ) | throw (Exception::NullPointer) |
Assign from array-ptr.
Assign from the first sixteen elements pointed to by
ptr.
| ptr | the array to construct from |
| NullPointer | if ptr == 0 |
Referenced by BALL::TMatrix4x4< T >::get(), and BALL::TQuaternion< T >::getRotationMatrix().
| void BALL::TMatrix4x4< T >::setColumn | ( | Position | col, | |
| const TVector4< T > & | col_value | |||
| ) | throw (Exception::IndexOverflow) |
Set a column of the matrix.
| col | the number of the column (0-3) | |
| col_value | the new value of the col |
| IndexOverflow | if col > 3 |
| void BALL::TMatrix4x4< T >::setIdentity | ( | ) |
Set to an identity matrix.
m11, m22, m33, m44 = 1; the other cells have the value 0;
| void BALL::TMatrix4x4< T >::setRotation | ( | const TAngle< T > & | phi, | |
| const TVector4< T > & | axis | |||
| ) |
Set the matrix to a rotation matrix.
| phi | the rotation angle | |
| axis | the axis vector, the fourth component of the vector is ignored |
References BALL::TMatrix4x4< T >::rotate(), BALL::TVector4< T >::x, BALL::TVector4< T >::y, and BALL::TVector4< T >::z.
| void BALL::TMatrix4x4< T >::setRotation | ( | const TAngle< T > & | phi, | |
| const TVector3< T > & | axis | |||
| ) |
Set the matrix to a rotation matrix.
| phi | the rotation angle | |
| axis | the axis vector |
References BALL::TMatrix4x4< T >::rotate(), BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
| void BALL::TMatrix4x4< T >::setRotation | ( | const TAngle< T > & | phi, | |
| const T & | axis_x, | |||
| const T & | axis_y, | |||
| const T & | axis_z | |||
| ) |
Set the matrix to a rotation matrix.
| phi | the rotation angle | |
| axis_x | the x component of the axis | |
| axis_y | the y component of the axis | |
| axis_z | the z component of the axis |
References BALL::TMatrix4x4< T >::rotate().
| void BALL::TMatrix4x4< T >::setRotationX | ( | const TAngle< T > & | phi | ) |
Set the matrix to a x rotation matrix.
| phi | the rotation angle |
Referenced by BALL::TMatrix4x4< T >::rotateX().
| void BALL::TMatrix4x4< T >::setRotationY | ( | const TAngle< T > & | phi | ) |
Set the matrix to a y rotation matrix.
| phi | the rotation angle |
Referenced by BALL::TMatrix4x4< T >::rotateY().
| void BALL::TMatrix4x4< T >::setRotationZ | ( | const TAngle< T > & | phi | ) |
Set the matrix to a z rotation matrix.
| phi | the rotation angle |
Referenced by BALL::TMatrix4x4< T >::rotateZ().
| void BALL::TMatrix4x4< T >::setRow | ( | Position | row, | |
| const TVector4< T > & | row_value | |||
| ) | throw (Exception::IndexOverflow) |
Set a row of the matrix.
| row | the number of the row (0-3) | |
| row_value | the new value of the row |
| IndexOverflow | if row > 3 |
| void BALL::TMatrix4x4< T >::setScale | ( | const TVector3< T > & | v | ) |
Set the matrix to a scalation matrix.
| v | the vector with the scale factor |
References BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
| void BALL::TMatrix4x4< T >::setScale | ( | const T & | scale | ) |
Set the matrix to a scalation matrix.
| scale | the scale factor |
| void BALL::TMatrix4x4< T >::setScale | ( | const T & | x_scale, | |
| const T & | y_scale, | |||
| const T & | z_scale | |||
| ) |
Set the matrix to a scalation matrix.
| x_scale | the x scale factor | |
| y_scale | the y scale factor | |
| z_scale | the z scale factor |
| void BALL::TMatrix4x4< T >::setTranslation | ( | const TVector3< T > & | v | ) |
Set the matrix to a translation matrix.
| v | the vector to translate with |
References BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
| void BALL::TMatrix4x4< T >::setTranslation | ( | const T & | x, | |
| const T & | y, | |||
| const T & | z | |||
| ) |
Set the matrix to a translation matrix.
| x | the x-component of the translation | |
| y | the y-component of the translation | |
| z | the z-component of the translation |
| void BALL::TMatrix4x4< T >::swap | ( | TMatrix4x4< T > & | m | ) |
Swap the contents of two instances of TMatrix4x4.
| TMatrix4x4 | the TMatrix4x4 to swap contents with |
References BALL::TMatrix4x4< T >::m11, BALL::TMatrix4x4< T >::m12, BALL::TMatrix4x4< T >::m13, BALL::TMatrix4x4< T >::m14, BALL::TMatrix4x4< T >::m21, BALL::TMatrix4x4< T >::m22, BALL::TMatrix4x4< T >::m23, BALL::TMatrix4x4< T >::m24, BALL::TMatrix4x4< T >::m31, BALL::TMatrix4x4< T >::m32, BALL::TMatrix4x4< T >::m33, BALL::TMatrix4x4< T >::m34, BALL::TMatrix4x4< T >::m41, BALL::TMatrix4x4< T >::m42, BALL::TMatrix4x4< T >::m43, and BALL::TMatrix4x4< T >::m44.
| void BALL::TMatrix4x4< T >::translate | ( | const TVector3< T > & | v | ) |
Translate the matrix.
| v | the vector to translate with |
References BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
| void BALL::TMatrix4x4< T >::translate | ( | const T & | x, | |
| const T & | y, | |||
| const T & | z | |||
| ) |
Translate the matrix.
| x | the x-component of the translation | |
| y | the y-component of the translation | |
| z | the z-component of the translation |
| void BALL::TMatrix4x4< T >::transpose | ( | ) |
Mirror the Matrix at the diagonal.
All values are swaped by the mirrored value. (I.e. m12 <=> m21 , m13 <=> m31 , ...)
1.5.8