The 4x4 matrix class.
More...
#include <3d.h>
|
| static double | mat2x2Det (double a, double b, double c, double d) |
| | Compute a 2 x 2 matrix determinant. More...
|
| |
| static double | mat3x3Det (double a1, double a2, double a3, double b1, double b2, double b3, double c1, double c2, double c3) |
| | Compute a 3 x 3 matrix determinant. More...
|
| |
|
| double | _m [4][4] |
| | The 4x4 matrix array. More...
|
| |
The 4x4 matrix class.
Definition at line 624 of file 3d.h.
◆ OMatrix() [1/3]
Default constructor.
Definition at line 439 of file 3d.cpp.
◆ OMatrix() [2/3]
| OMatrix::OMatrix |
( |
const OMatrix & |
matrix | ) |
|
Copy constructor.
Definition at line 444 of file 3d.cpp.
◆ OMatrix() [3/3]
| OMatrix::OMatrix |
( |
double |
matrix[4][4] | ) |
|
◆ ~OMatrix()
Destructor.
Definition at line 461 of file 3d.cpp.
◆ adjoint()
| void OMatrix::adjoint |
( |
| ) |
|
Calculate the adjoint matrix from this matrix.
Remarque : Algorithm by Richard Carling, from Graphic Gems I.
Principe :
Calculate the adjoint of a 4x4 matrix:
Let a denotes the minor determinant of matrix A obtained by
ij
deleting the ith row and jth column from A.
i+j
Let b = (-1) a
ij ji
The matrix B = (b ) is the adjoint of A.
ij
Definition at line 824 of file 3d.cpp.
◆ aligneVecteurSurOx()
| int OMatrix::aligneVecteurSurOx |
( |
const OVector3D & |
vector | ) |
|
Mise a jour d'une matrice d'alignement d'un vecteur quelconque avec l'axe des x.
Remarque :
- En raison d'erreur d'arrondi, le fonctionnement de cette fonction peut etre perturbe dans le cas de vecteur enorme.
Principe :
Definition at line 700 of file 3d.cpp.
◆ aligneVecteurSurOy()
| int OMatrix::aligneVecteurSurOy |
( |
const OVector3D & |
vector | ) |
|
Mise a jour d'une matrice d'alignement d'un vecteur quelconque avec l'axe des y.
Remarque :
- En raison d'erreur d'arrondi, le fonctionnement de cette fonction peut etre perturbe dans le cas de vecteur enorme.
Principe :
Definition at line 743 of file 3d.cpp.
◆ determinant()
| double OMatrix::determinant |
( |
| ) |
|
Compute the matrix determinant.
Note : Algorithm from Richard Carling, extracted from Graphic Gems I.
Definition at line 873 of file 3d.cpp.
◆ dot()
Multiplication with a 3D coordinate.
- Parameters
-
| coord | The reference object with which this matrix is multiplied. |
Definition at line 545 of file 3d.cpp.
◆ getAdjoint()
◆ getInvert()
| OMatrix OMatrix::getInvert |
( |
int * |
ok = 0 | ) |
const |
Return the inverse matrix of this matrix.
- See also
- invert()
- Parameters
-
| ok | Flag to indicate if the inversion was a success (1) or not (0). |
Definition at line 813 of file 3d.cpp.
◆ invert()
Matrix inversion.
Note : Algorithm by Richard Carling, from Graphic Gems I.
Principle :
-1
A = ___1__ adjoint A
det A
- Returns
- Indicate if the inversion succeeds or not (0 or 1).
Definition at line 792 of file 3d.cpp.
◆ mat2x2Det()
| static double OMatrix::mat2x2Det |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c, |
|
|
double |
d |
|
) |
| |
|
static |
Compute a 2 x 2 matrix determinant.
Definition at line 901 of file 3d.cpp.
◆ mat3x3Det()
| static double OMatrix::mat3x3Det |
( |
double |
a1, |
|
|
double |
a2, |
|
|
double |
a3, |
|
|
double |
b1, |
|
|
double |
b2, |
|
|
double |
b3, |
|
|
double |
c1, |
|
|
double |
c2, |
|
|
double |
c3 |
|
) |
| |
|
static |
Compute a 3 x 3 matrix determinant.
Definition at line 906 of file 3d.cpp.
◆ multNormal()
Multiplication with a normal (the translation is removed).
- Parameters
-
| normal | The normal vector with which this object is multiplied. |
Definition at line 585 of file 3d.cpp.
◆ operator!=()
| bool OMatrix::operator!= |
( |
const OMatrix & |
matrix | ) |
const |
◆ operator*()
◆ operator+()
◆ operator-()
◆ operator=()
operators
Definition at line 463 of file 3d.cpp.
◆ operator==()
| bool OMatrix::operator== |
( |
const OMatrix & |
matrix | ) |
const |
◆ reset()
Set the matrix elements to zero.
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
Definition at line 622 of file 3d.cpp.
◆ scale()
◆ setRotationOx()
| int OMatrix::setRotationOx |
( |
double |
a | ) |
|
Update a rotation matrix (Ox axis).
1 0 0 0
0 cos -sin 0
0 sin cos 0
0 0 0 1
Definition at line 664 of file 3d.cpp.
◆ setRotationOy()
| int OMatrix::setRotationOy |
( |
double |
a | ) |
|
Update a rotation matrix (Oy axis).
cos 0 sin 0
0 1 0 0
-sin 0 cos 0
0 0 0 1
Definition at line 676 of file 3d.cpp.
◆ setRotationOz()
| int OMatrix::setRotationOz |
( |
double |
a | ) |
|
Update a rotation matrix (Oz axis).
cos -sin 0 0
sin cos 0 0
0 0 1 0
0 0 0 1
Definition at line 688 of file 3d.cpp.
◆ setScale()
| int OMatrix::setScale |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Update a zoom matrix.
Zoom Z(x, y, z) :
x 0 0 0
0 y 0 0
0 0 z 0
0 0 0 1
Definition at line 655 of file 3d.cpp.
◆ setTranslation()
| int OMatrix::setTranslation |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Update a translation matrix.
Translation T(x, y, z) :
1 0 0 x
0 1 0 y
0 0 1 z
0 0 0 1
Definition at line 646 of file 3d.cpp.
◆ show()
Print a matrix (debug).
Definition at line 609 of file 3d.cpp.
◆ unite()
Initialize the matrix to the identity matrix.
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Definition at line 634 of file 3d.cpp.
◆ _m
The 4x4 matrix array.
Definition at line 922 of file 3d.h.
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/code-tympan-fbessou/checkouts/latest/Tympan/models/common/3d.h
- /home/docs/checkouts/readthedocs.org/user_builds/code-tympan-fbessou/checkouts/latest/Tympan/models/common/3d.cpp