#include <BALL/MATHS/matrix44.h>
Public Member Functions | |
Constructors and Destructors | |
TMatrix4x4 () | |
TMatrix4x4 (const T *ptr) throw (Exception::NullPointer) | |
TMatrix4x4 (const T ptr[4][4]) throw (Exception::NullPointer) | |
TMatrix4x4 (const TMatrix4x4 &m) | |
TMatrix4x4 (const TVector4< T > &col1, const TVector4< T > &col2, const TVector4< T > &col3, const TVector4< T > &col4) | |
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) | |
virtual | ~TMatrix4x4 () |
virtual void | clear () |
Assignment | |
void | set (const T *ptr) throw (Exception::NullPointer) |
void | set (const T ptr[4][4]) throw (Exception::NullPointer) |
void | set (const TMatrix4x4 &m) |
void | set (const TVector4< T > &col1, const TVector4< T > &col2, const TVector4< T > &col3, const TVector4< T > &col4) |
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) |
TMatrix4x4 & | operator= (const T *ptr) throw (Exception::NullPointer) |
TMatrix4x4 & | operator= (const T ptr[4][4]) throw (Exception::NullPointer) |
TMatrix4x4 & | operator= (const TMatrix4x4 &m) |
void | get (T *ptr) const throw (Exception::NullPointer) |
void | get (T ptr[4][4]) const throw (Exception::NullPointer) |
void | get (TMatrix4x4 &m) const |
void | get (TVector4< T > &col1, TVector4< T > &col2, TVector4< T > &col3, TVector4< T > &col4) const |
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 |
void | swap (TMatrix4x4 &m) |
Predicates | |
bool | operator== (const TMatrix4x4 &m) const |
bool | operator!= (const TMatrix4x4 &m) const |
bool | isIdentity () const |
bool | isRegular () const |
bool | isSingular () const |
bool | isSymmetric () const |
bool | isLowerTriangular () const |
bool | isUpperTriangular () const |
bool | isDiagonal () const |
Debugging and Diagnostics | |
bool | isValid () const |
void | dump (std::ostream &s=std::cout, Size depth=0) const |
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 | |
Private Member Functions | |
void | initializeComponentPointers_ () |
Private Attributes | |
T * | comp_ptr_ [16] |
Accessors | |
| |
T | getTrace () const |
void | setIdentity () |
void | set (const T &t=(T) 1) |
void | transpose () |
TVector4< T > | getRow (Position row) const throw (Exception::IndexOverflow) |
TVector4< T > | getColumn (Position col) const throw (Exception::IndexOverflow) |
void | setRow (Position row, const TVector4< T > &row_value) throw (Exception::IndexOverflow) |
void | setColumn (Position col, const TVector4< T > &col_value) throw (Exception::IndexOverflow) |
bool | isEqual (const TMatrix4x4 &m) const |
TVector4< T > | getDiagonal () const |
T & | operator() (Position row, Position col) throw (Exception::IndexOverflow) |
const T & | operator() (Position row, Position col) const throw (Exception::IndexOverflow) |
const T & | operator[] (Position position) const throw (Exception::IndexOverflow) |
T & | operator[] (Position position) throw (Exception::IndexOverflow) |
TMatrix4x4 | operator+ () const |
TMatrix4x4 | operator- () const |
TMatrix4x4 | operator+ (const TMatrix4x4 &m) const |
TMatrix4x4 & | operator+= (const TMatrix4x4 &m) |
TMatrix4x4 | operator- (const TMatrix4x4 &m) const |
TMatrix4x4 & | operator-= (const TMatrix4x4 &m) |
TMatrix4x4 | operator* (const T &scalar) const |
TMatrix4x4 & | operator*= (const T &scalar) |
TMatrix4x4 | operator/ (const T &scalar) const throw (Exception::DivisionByZero) |
TMatrix4x4 & | operator/= (const T &scalar) throw (Exception::DivisionByZero) |
TMatrix4x4 | operator* (const TMatrix4x4 &m) const |
TMatrix4x4 & | operator*= (const TMatrix4x4 &m) |
TVector4< T > | operator* (const TVector4< T > &vector) const |
bool | invert (TMatrix4x4 &inverse) const |
bool | invert () |
T | getDeterminant () const |
void | translate (const T &x, const T &y, const T &z) |
void | translate (const TVector3< T > &v) |
void | setTranslation (const T &x, const T &y, const T &z) |
void | setTranslation (const TVector3< T > &v) |
void | scale (const T &x_scale, const T &y_scale, const T &z_scale) |
void | scale (const T &scale) |
void | scale (const TVector3< T > &v) |
void | setScale (const T &x_scale, const T &y_scale, const T &z_scale) |
void | setScale (const T &scale) |
void | setScale (const TVector3< T > &v) |
void | rotateX (const TAngle< T > &phi) |
void | setRotationX (const TAngle< T > &phi) |
void | rotateY (const TAngle< T > &phi) |
void | setRotationY (const TAngle< T > &phi) |
void | rotateZ (const TAngle< T > &phi) |
void | setRotationZ (const TAngle< T > &phi) |
void | rotate (const TAngle< T > &phi, const T &axis_x, const T &axis_y, const T &axis_z) |
void | rotate (const TAngle< T > &phi, const TVector3< T > &axis) |
void | rotate (const TAngle< T > &phi, const TVector4< T > &axis) |
void | setRotation (const TAngle< T > &phi, const T &axis_x, const T &axis_y, const T &axis_z) |
void | setRotation (const TAngle< T > &phi, const TVector3< T > &axis) |
void | setRotation (const TAngle< T > &phi, const TVector4< T > &axis) |
static const TMatrix4x4 & | getZero () |
static const TMatrix4x4 & | getIdentity () |
Generic 4x4 Matrix Class.
Definition at line 67 of file matrix44.h.
BALL::TMatrix4x4< T >::TMatrix4x4 | ( | ) | [inline] |
Default constructor. This method creates a new TMatrix4x4 object. The components are initialized to 0
.
Definition at line 761 of file matrix44.h.
BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const T * | ptr | ) | throw (Exception::NullPointer) [inline] |
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 |
Definition at line 772 of file matrix44.h.
BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const T | ptr[4][4] | ) | throw (Exception::NullPointer) [inline] |
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 |
Definition at line 789 of file matrix44.h.
BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const TMatrix4x4< T > & | m | ) | [inline] |
Copy constructor. Create a new TMatrix4x4 object from another.
TMatrix4x4 | the TMatrix4x4 object to be copied | |
bool | ignored (just for interface consistency) |
Definition at line 808 of file matrix44.h.
BALL::TMatrix4x4< T >::TMatrix4x4 | ( | const TVector4< T > & | col1, | |
const TVector4< T > & | col2, | |||
const TVector4< T > & | col3, | |||
const TVector4< T > & | col4 | |||
) | [inline] |
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 |
Definition at line 821 of file matrix44.h.
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 | |||
) | [inline] |
Detailed constructor. Create a new TMatrix4x4 object from sixteen T
values.
m11 | - m44 assigned to the components |
Definition at line 834 of file matrix44.h.
virtual BALL::TMatrix4x4< T >::~TMatrix4x4 | ( | ) | [inline, virtual] |
Destructor. Destructs the TMatrix4x4 object. As there are no dynamic data structures, nothing happens.
Definition at line 138 of file matrix44.h.
void BALL::TMatrix4x4< T >::clear | ( | ) | [inline, virtual] |
Clear method. The values are set to 0.
Definition at line 848 of file matrix44.h.
void BALL::TMatrix4x4< T >::dump | ( | std::ostream & | s = std::cout , |
|
Size | depth = 0 | |||
) | const [inline] |
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 |
Definition at line 2263 of file matrix44.h.
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 [inline] |
Assign to sixteen variables of type T
.
m11 | - m44 the variables to assign to |
Definition at line 1002 of file matrix44.h.
void BALL::TMatrix4x4< T >::get | ( | TVector4< T > & | col1, | |
TVector4< T > & | col2, | |||
TVector4< T > & | col3, | |||
TVector4< T > & | col4 | |||
) | const [inline] |
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 |
Definition at line 990 of file matrix44.h.
void BALL::TMatrix4x4< T >::get | ( | TMatrix4x4< T > & | m | ) | const [inline] |
Assign to another instance. Assigns the components to another TMatrix4x4.
TMatrix4x4 | the TMatrix4x4 to be assigned to |
Definition at line 982 of file matrix44.h.
void BALL::TMatrix4x4< T >::get | ( | T | ptr[4][4] | ) | const throw (Exception::NullPointer) [inline] |
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 |
Definition at line 965 of file matrix44.h.
void BALL::TMatrix4x4< T >::get | ( | T * | ptr | ) | const throw (Exception::NullPointer) [inline] |
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 |
Definition at line 950 of file matrix44.h.
TVector4< T > BALL::TMatrix4x4< T >::getColumn | ( | Position | col | ) | const throw (Exception::IndexOverflow) [inline] |
Get a column of the matrix.
col | the number of the column (0-3) |
IndexOverflow | if col > 3 |
Definition at line 1136 of file matrix44.h.
T BALL::TMatrix4x4< T >::getDeterminant | ( | ) | const [inline] |
TVector4< T > BALL::TMatrix4x4< T >::getDiagonal | ( | ) | const [inline] |
Get the diagonal of the matrix.
Definition at line 1204 of file matrix44.h.
BALL_INLINE const TMatrix4x4< T > & BALL::TMatrix4x4< T >::getIdentity | ( | ) | [inline, 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.
Definition at line 1047 of file matrix44.h.
TVector4< T > BALL::TMatrix4x4< T >::getRow | ( | Position | row | ) | const throw (Exception::IndexOverflow) [inline] |
Get a row of the matrix.
row | the number of the row (0-3) |
IndexOverflow | if row > 3 |
Definition at line 1122 of file matrix44.h.
BALL_INLINE T BALL::TMatrix4x4< T >::getTrace | ( | ) | const [inline] |
Compute the trace. Get the sum of the diagonal elements (m11 + m22 + m33 + m44).
Definition at line 1016 of file matrix44.h.
BALL_INLINE const TMatrix4x4< T > & BALL::TMatrix4x4< T >::getZero | ( | ) | [inline, static] |
Create a zero matrix. A new matrix object is created and all elements set to 0.
Definition at line 1024 of file matrix44.h.
void BALL::TMatrix4x4< T >::initializeComponentPointers_ | ( | ) | [inline, private] |
Definition at line 744 of file matrix44.h.
BALL_INLINE bool BALL::TMatrix4x4< T >::invert | ( | ) | [inline] |
Invert the matrix. Tests if the matrix can be inverted. If this is possible, the result is stored in the matrix.
Definition at line 1629 of file matrix44.h.
bool BALL::TMatrix4x4< T >::invert | ( | TMatrix4x4< T > & | inverse | ) | const [inline] |
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.
Definition at line 1497 of file matrix44.h.
BALL_INLINE bool BALL::TMatrix4x4< T >::isDiagonal | ( | ) | const [inline] |
Test whether all cells but the diagonal are zero.
Definition at line 2195 of file matrix44.h.
bool BALL::TMatrix4x4< T >::isEqual | ( | const TMatrix4x4< T > & | m | ) | const [inline] |
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 |
Definition at line 1187 of file matrix44.h.
bool BALL::TMatrix4x4< T >::isIdentity | ( | ) | const [inline] |
Test whether this matrix is an identity matrix. (I.e. m11, m22, m33, m44 = 1 and the other cells have the value 0)
Definition at line 2122 of file matrix44.h.
bool BALL::TMatrix4x4< T >::isLowerTriangular | ( | ) | const [inline] |
Test whether the lower triangular is zero.
Definition at line 2170 of file matrix44.h.
BALL_INLINE bool BALL::TMatrix4x4< T >::isRegular | ( | ) | const [inline] |
Test whether this matrix is regular.
Definition at line 2146 of file matrix44.h.
BALL_INLINE bool BALL::TMatrix4x4< T >::isSingular | ( | ) | const [inline] |
Test whether this matrix is singular.
Definition at line 2154 of file matrix44.h.
bool BALL::TMatrix4x4< T >::isSymmetric | ( | ) | const [inline] |
Test whether this matrix is symmetric. (m12 = m21, m31 = m13, ...)
Definition at line 2161 of file matrix44.h.
bool BALL::TMatrix4x4< T >::isUpperTriangular | ( | ) | const [inline] |
Test whether the upper triangular is zero.
Definition at line 2182 of file matrix44.h.
bool BALL::TMatrix4x4< T >::isValid | ( | ) | const [inline] |
Test whether instance is valid. Always returns true.
Definition at line 2213 of file matrix44.h.
bool BALL::TMatrix4x4< T >::operator!= | ( | const TMatrix4x4< T > & | m | ) | const [inline] |
Inequality operator. Instead of this operator isEqual should be used. isEqual
Definition at line 2099 of file matrix44.h.
BALL_INLINE const T & BALL::TMatrix4x4< T >::operator() | ( | Position | row, | |
Position | col | |||
) | const throw (Exception::IndexOverflow) [inline] |
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 |
Definition at line 1225 of file matrix44.h.
BALL_INLINE T & BALL::TMatrix4x4< T >::operator() | ( | Position | row, | |
Position | col | |||
) | throw (Exception::IndexOverflow) [inline] |
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 |
Definition at line 1212 of file matrix44.h.
TVector4< T > BALL::TMatrix4x4< T >::operator* | ( | const TVector4< T > & | vector | ) | const [inline] |
Multiplication by an instance of type TVector4 .
Definition at line 1486 of file matrix44.h.
TMatrix4x4< T > BALL::TMatrix4x4< T >::operator* | ( | const TMatrix4x4< T > & | m | ) | const [inline] |
TMatrix4x4< T > BALL::TMatrix4x4< T >::operator* | ( | const T & | scalar | ) | const [inline] |
Multiply by a scalar. Operator for multiplying every cell value with a scalar value.
Definition at line 1351 of file matrix44.h.
TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator*= | ( | const TMatrix4x4< T > & | m | ) | [inline] |
TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator*= | ( | const T & | scalar | ) | [inline] |
Multiply by a scalar. Operator for multiplying every cell value with a scalar value.
Definition at line 1373 of file matrix44.h.
TMatrix4x4< T > BALL::TMatrix4x4< T >::operator+ | ( | const TMatrix4x4< T > & | m | ) | const [inline] |
Addition operator. Adds another matrix to this matrix and return the result.
m | the matrix to add |
Definition at line 1281 of file matrix44.h.
BALL_INLINE TMatrix4x4< T > BALL::TMatrix4x4< T >::operator+ | ( | ) | const [inline] |
Positive sign.
Definition at line 1262 of file matrix44.h.
TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator+= | ( | const TMatrix4x4< T > & | m | ) | [inline] |
Addition operator. Adds another matrix to this matrix.
m | the matrix to add |
Definition at line 1292 of file matrix44.h.
TMatrix4x4< T > BALL::TMatrix4x4< T >::operator- | ( | const TMatrix4x4< T > & | m | ) | const [inline] |
Subtraction operator. Subtract another matrix from this matrix and return the result
m | the matrix to subtract |
Definition at line 1316 of file matrix44.h.
BALL_INLINE TMatrix4x4< T > BALL::TMatrix4x4< T >::operator- | ( | ) | const [inline] |
Negative sign.
Definition at line 1270 of file matrix44.h.
TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator-= | ( | const TMatrix4x4< T > & | m | ) | [inline] |
Subtraction operator. Subtract another matrix from this matrix.
m | the matrix to subtract |
Definition at line 1327 of file matrix44.h.
BALL_INLINE TMatrix4x4< T > BALL::TMatrix4x4< T >::operator/ | ( | const T & | scalar | ) | const throw (Exception::DivisionByZero) [inline] |
Divide by a scalar. Operator for dividing every cell value by a scalar value.
DivisionByZero | if scalar == 0 |
Definition at line 1408 of file matrix44.h.
BALL_INLINE TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator/= | ( | const T & | scalar | ) | throw (Exception::DivisionByZero) [inline] |
Divide by a scalar. Operator for dividing every cell value by a scalar value.
DivisionByZero | if scalar == 0 |
Definition at line 1421 of file matrix44.h.
BALL_INLINE TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator= | ( | const TMatrix4x4< T > & | m | ) | [inline] |
Assignment operator. Assign the components from another instance of TMatrix4x4.
TMatrix4x4 | the TMatrix4x4 to assign from |
Definition at line 942 of file matrix44.h.
BALL_INLINE TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator= | ( | const T | ptr[4][4] | ) | throw (Exception::NullPointer) [inline] |
Assignment operator. Assign the components from the first 16 values assigned by ptr
.
ptr | the array to construct from |
Definition at line 933 of file matrix44.h.
BALL_INLINE TMatrix4x4< T > & BALL::TMatrix4x4< T >::operator= | ( | const T * | ptr | ) | throw (Exception::NullPointer) [inline] |
Assignment operator. Assign the components from the first 16 values assigned by ptr
.
ptr | the array to construct from |
Definition at line 924 of file matrix44.h.
bool BALL::TMatrix4x4< T >::operator== | ( | const TMatrix4x4< T > & | m | ) | const [inline] |
Equality operator. Instead of this operator isEqual should be used. isEqual
Definition at line 2076 of file matrix44.h.
BALL_INLINE T & BALL::TMatrix4x4< T >::operator[] | ( | Position | position | ) | throw (Exception::IndexOverflow) [inline] |
BALL_INLINE const T & BALL::TMatrix4x4< T >::operator[] | ( | Position | position | ) | const throw (Exception::IndexOverflow) [inline] |
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
...
Definition at line 1238 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::rotate | ( | const TAngle< T > & | phi, | |
const TVector4< T > & | axis | |||
) | [inline] |
Rotate the matrix around a given axis.
phi | the rotation angle | |
axis | the axis vector, the fourth component of the vector is ignored |
Definition at line 1920 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::rotate | ( | const TAngle< T > & | phi, | |
const TVector3< T > & | axis | |||
) | [inline] |
Rotate the matrix around a given axis.
phi | the rotation angle | |
axis | the axis vector |
Definition at line 1912 of file matrix44.h.
void BALL::TMatrix4x4< T >::rotate | ( | const TAngle< T > & | phi, | |
const T & | axis_x, | |||
const T & | axis_y, | |||
const T & | axis_z | |||
) | [inline] |
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 |
Definition at line 1983 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::rotateX | ( | const TAngle< T > & | phi | ) | [inline] |
Rotate the matrix around the x axis.
phi | the rotation angle |
Definition at line 1834 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::rotateY | ( | const TAngle< T > & | phi | ) | [inline] |
Rotate the matrix around the y axis.
phi | the rotation angle |
Definition at line 1861 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::rotateZ | ( | const TAngle< T > & | phi | ) | [inline] |
Rotate the matrix around the z axis.
phi | the rotation angle |
Definition at line 1888 of file matrix44.h.
void BALL::TMatrix4x4< T >::scale | ( | const TVector3< T > & | v | ) | [inline] |
Scale the matrix.
v | the vector with the scale factor |
Definition at line 1768 of file matrix44.h.
void BALL::TMatrix4x4< T >::scale | ( | const T & | scale | ) | [inline] |
void BALL::TMatrix4x4< T >::scale | ( | const T & | x_scale, | |
const T & | y_scale, | |||
const T & | z_scale | |||
) | [inline] |
Scale the matrix.
x_scale | the x scale factor | |
y_scale | the y scale factor | |
z_scale | the z scale factor |
Definition at line 1728 of file matrix44.h.
void BALL::TMatrix4x4< T >::set | ( | const T & | t = (T)1 |
) | [inline] |
Set the diagonal elements to the given value. All other elements are set to 0.
T | the value to fill with (default: 1) |
Definition at line 1060 of file matrix44.h.
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 | |||
) | [inline] |
Assign from sixteen values of type T.
m11 | - m44 assigned to the components |
Definition at line 910 of file matrix44.h.
void BALL::TMatrix4x4< T >::set | ( | const TVector4< T > & | col1, | |
const TVector4< T > & | col2, | |||
const TVector4< T > & | col3, | |||
const TVector4< T > & | col4 | |||
) | [inline] |
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 |
Definition at line 898 of file matrix44.h.
void BALL::TMatrix4x4< T >::set | ( | const TMatrix4x4< T > & | m | ) | [inline] |
Assign from another instance.
TMatrix4x4 | the TMatrix4x4 object to assign from |
Definition at line 887 of file matrix44.h.
void BALL::TMatrix4x4< T >::set | ( | const T | ptr[4][4] | ) | throw (Exception::NullPointer) [inline] |
Assign from the first sixteen elements. pointed to by the array assigned by ptr
.
ptr | the array to construct from |
NullPointer | if ptr == 0 |
Definition at line 870 of file matrix44.h.
void BALL::TMatrix4x4< T >::set | ( | const T * | ptr | ) | throw (Exception::NullPointer) [inline] |
Assign from array-ptr. Assign from the first sixteen elements pointed to by ptr
.
ptr | the array to construct from |
NullPointer | if ptr == 0 |
Definition at line 855 of file matrix44.h.
void BALL::TMatrix4x4< T >::setColumn | ( | Position | col, | |
const TVector4< T > & | col_value | |||
) | throw (Exception::IndexOverflow) [inline] |
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 |
Definition at line 1169 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::setIdentity | ( | ) | [inline] |
Set to an identity matrix. m11, m22, m33, m44 = 1; the other cells have the value 0;
Definition at line 1039 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::setRotation | ( | const TAngle< T > & | phi, | |
const TVector4< T > & | axis | |||
) | [inline] |
Set the matrix to a rotation matrix.
phi | the rotation angle | |
axis | the axis vector, the fourth component of the vector is ignored |
Definition at line 2067 of file matrix44.h.
BALL_INLINE void BALL::TMatrix4x4< T >::setRotation | ( | const TAngle< T > & | phi, | |
const TVector3< T > & | axis | |||
) | [inline] |
Set the matrix to a rotation matrix.
phi | the rotation angle | |
axis | the axis vector |
Definition at line 2057 of file matrix44.h.
void BALL::TMatrix4x4< T >::setRotation | ( | const TAngle< T > & | phi, | |
const T & | axis_x, | |||
const T & | axis_y, | |||
const T & | axis_z | |||
) | [inline] |
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 |
Definition at line 2047 of file matrix44.h.
void BALL::TMatrix4x4< T >::setRotationX | ( | const TAngle< T > & | phi | ) | [inline] |
Set the matrix to a x rotation matrix.
phi | the rotation angle |
Definition at line 1844 of file matrix44.h.
void BALL::TMatrix4x4< T >::setRotationY | ( | const TAngle< T > & | phi | ) | [inline] |
Set the matrix to a y rotation matrix.
phi | the rotation angle |
Definition at line 1871 of file matrix44.h.
void BALL::TMatrix4x4< T >::setRotationZ | ( | const TAngle< T > & | phi | ) | [inline] |
Set the matrix to a z rotation matrix.
phi | the rotation angle |
Definition at line 1898 of file matrix44.h.
void BALL::TMatrix4x4< T >::setRow | ( | Position | row, | |
const TVector4< T > & | row_value | |||
) | throw (Exception::IndexOverflow) [inline] |
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 |
Definition at line 1151 of file matrix44.h.
void BALL::TMatrix4x4< T >::setScale | ( | const TVector3< T > & | v | ) | [inline] |
Set the matrix to a scalation matrix.
v | the vector with the scale factor |
Definition at line 1818 of file matrix44.h.
void BALL::TMatrix4x4< T >::setScale | ( | const T & | scale | ) | [inline] |
Set the matrix to a scalation matrix.
scale | the scale factor |
Definition at line 1803 of file matrix44.h.
void BALL::TMatrix4x4< T >::setScale | ( | const T & | x_scale, | |
const T & | y_scale, | |||
const T & | z_scale | |||
) | [inline] |
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 |
Definition at line 1788 of file matrix44.h.
void BALL::TMatrix4x4< T >::setTranslation | ( | const TVector3< T > & | v | ) | [inline] |
Set the matrix to a translation matrix.
v | the vector to translate with |
Definition at line 1712 of file matrix44.h.
void BALL::TMatrix4x4< T >::setTranslation | ( | const T & | x, | |
const T & | y, | |||
const T & | z | |||
) | [inline] |
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 |
Definition at line 1696 of file matrix44.h.
void BALL::TMatrix4x4< T >::swap | ( | TMatrix4x4< T > & | m | ) | [inline] |
Swap the contents of two instances of TMatrix4x4.
TMatrix4x4 | the TMatrix4x4 to swap contents with |
Definition at line 1071 of file matrix44.h.
void BALL::TMatrix4x4< T >::translate | ( | const TVector3< T > & | v | ) | [inline] |
Translate the matrix.
v | the vector to translate with |
Definition at line 1686 of file matrix44.h.
void BALL::TMatrix4x4< T >::translate | ( | const T & | x, | |
const T & | y, | |||
const T & | z | |||
) | [inline] |
Translate the matrix.
x | the x-component of the translation | |
y | the y-component of the translation | |
z | the z-component of the translation |
Definition at line 1676 of file matrix44.h.
void BALL::TMatrix4x4< T >::transpose | ( | ) | [inline] |
Mirror the Matrix at the diagonal. All values are swaped by the mirrored value. (I.e. m12 <=> m21 , m13 <=> m31 , ...)
Definition at line 1093 of file matrix44.h.
T* BALL::TMatrix4x4< T >::comp_ptr_[16] [private] |
Definition at line 756 of file matrix44.h.
T BALL::TMatrix4x4< T >::m11 |
1st cell in the 1st row
Definition at line 694 of file matrix44.h.
T BALL::TMatrix4x4< T >::m12 |
2nd cell in the 1st row
Definition at line 697 of file matrix44.h.
T BALL::TMatrix4x4< T >::m13 |
3rd cell in the 1st row
Definition at line 700 of file matrix44.h.
T BALL::TMatrix4x4< T >::m14 |
4th cell in the 1st row
Definition at line 703 of file matrix44.h.
T BALL::TMatrix4x4< T >::m21 |
1st cell in the 2nd row
Definition at line 706 of file matrix44.h.
T BALL::TMatrix4x4< T >::m22 |
2nd cell in the 2nd row
Definition at line 709 of file matrix44.h.
T BALL::TMatrix4x4< T >::m23 |
3rd cell in the 2nd row
Definition at line 712 of file matrix44.h.
T BALL::TMatrix4x4< T >::m24 |
4th cell in the 2nd row
Definition at line 715 of file matrix44.h.
T BALL::TMatrix4x4< T >::m31 |
1st cell in the 3rd row
Definition at line 718 of file matrix44.h.
T BALL::TMatrix4x4< T >::m32 |
2nd cell in the 3rd row
Definition at line 721 of file matrix44.h.
T BALL::TMatrix4x4< T >::m33 |
3rd cell in the 3rd row
Definition at line 724 of file matrix44.h.
T BALL::TMatrix4x4< T >::m34 |
4th cell in the 3rd row
Definition at line 727 of file matrix44.h.
T BALL::TMatrix4x4< T >::m41 |
1st cell in the 4th row
Definition at line 730 of file matrix44.h.
T BALL::TMatrix4x4< T >::m42 |
2nd cell in the 4th row
Definition at line 733 of file matrix44.h.
T BALL::TMatrix4x4< T >::m43 |
3rd cell in the 4th row
Definition at line 736 of file matrix44.h.
T BALL::TMatrix4x4< T >::m44 |
4th cell in the 4th row
Definition at line 739 of file matrix44.h.