Class for the 4x4 matrix. More...
Inherits QObject, and CGoeMatricePlan.
Public Member Functions | |
GO2SMatrix () | |
Create the identity matrix. | |
GO2SMatrix (GO2SXYZ vect) | |
see GO2SMatrix.DefineFromVector | |
GO2SMatrix (GO2SXYZ Vx, GO2SXYZ Vy, GO2SXYZ Vz, GO2SXYZ Vc) | |
Create a matrix from 4 vectors (x, y, z axis and position) | |
GO2SMatrix (Number destination, Number source) | |
Create a matrix defining the transformation from a plane to another. | |
GO2SEnum::GO2SError | DefineCenteredSymmetry2D (GO2SXYZ centre, GO2SXYZ NormalPlane=new GO2SXYZ(0, 0, 1)) |
GO2SEnum::GO2SError | DefineCenteredSymmetry3D (GO2SXYZ centre) |
GO2SEnum::GO2SError | DefineFromVector (GO2SXYZ thisVector) |
GO2SEnum::GO2SError | DefineFromVectorAndOrigin (GO2SXYZ thisVector, GO2SXYZ origin) |
void | DefineIdentity () |
Initialize to identity matrix. | |
GO2SEnum::GO2SError | DefineRotation (GO2SXYZ axe, Number ang) |
GO2SEnum::GO2SError | DefineRotation (GO2SXYZ centre, GO2SXYZ axe, Number ang) |
void | DefineRotationX (Number ang) |
Define a rotation around X axis. | |
void | DefineRotationY (Number ang) |
Define a rotation around Y axis. | |
void | DefineRotationZ (Number ang) |
Define a rotation around Z axis. | |
void | DefineRotationZYX (Number angZ, Number angY, Number angX) |
GO2SEnum::GO2SError | DefineSymmetry (GO2SXYZ centre, GO2SXYZ TransAxe, GO2SXYZ NormalAxe=new GO2SXYZ(0, 0, 1)) |
GO2SEnum::GO2SError | DefineSymmetryByPlane (GO2SXYZ centre, GO2SXYZ NormalPlane) |
GO2SEnum::GO2SError | DefineTransferVector (GO2SXYZ vecFrom, GO2SXYZ vecTo, GO2SXYZ oriFrom, GO2SXYZ oriTo, GO2SXYZ refFrom, GO2SXYZ refTo) |
GO2SEnum::GO2SError | DefineTranslation (GO2SXYZ tr) |
Number | Determinant () |
GO2SMatrix | GetComatrix () |
GO2SEnum::GO2SError | Invert () |
GO2SMatrix | Inverted () |
Boolean | IsIdentity () |
Boolean | IsInvertible () |
Boolean | IsSingular () |
GO2SMatrix | Multiply (GO2SMatrix other) |
Get the result of the multiplication of two matrix. | |
GO2SXYZ | MultiplyPoint (GO2SXYZ xyz) |
Apply the matrix to xyz, considering xyz is a point. | |
GO2SXYZ | MultiplyVector (GO2SXYZ xyz) |
Apply the matrix to xyz, considering xyz is a vector. | |
GO2SXYZ | Origin () |
GO2SEnum::GO2SError | SetOrigin (GO2SXYZ po) |
GO2SEnum::GO2SError | SetXaxis (GO2SXYZ ax) |
GO2SEnum::GO2SError | SetYaxis (GO2SXYZ ay) |
GO2SEnum::GO2SError | SetZaxis (GO2SXYZ az) |
GO2SEnum::GO2SError | Translate (GO2SXYZ vect) |
void | Transpose () |
Transpose the matrix. | |
GO2SMatrix | Transposed () |
GO2SXYZ | XAxis () |
GO2SXYZ | YAxis () |
GO2SXYZ | ZAxis () |
Class for the 4x4 matrix.
|
inline |
Create a matrix defining the transformation from a plane to another.
[in] | destination | destination plane |
[in] | source | source plane |
Create a matrix from 4 vectors (x, y, z axis and position)
[in] | Vx | 1st column (x axis) |
[in] | Vy | 2nd column (y axis) |
[in] | Vz | 3rd column (z axis) |
[in] | Vc | 4th column (position) |
GO2SEnum::GO2SError GO2SMatrix::DefineCenteredSymmetry2D | ( | GO2SXYZ | centre, |
GO2SXYZ | NormalPlane = new GO2SXYZ(0, 0, 1) ) |
Define a centered symetry in 2D
[in] | centre | Center of symmetry |
[in] | NormalPlane | visual direction ( would be Z) |
GO2SEnum::GO2SError GO2SMatrix::DefineCenteredSymmetry3D | ( | GO2SXYZ | centre | ) |
Define a centered symetry in 3D
[in] | centre | Center of symmetry |
GO2SEnum::GO2SError GO2SMatrix::DefineFromVector | ( | GO2SXYZ | thisVector | ) |
Define a matrix with Z vector equal to thisVector, X and Y vectors are created automatically
[in] | thisVector | z vector on which align Z of the plane |
GO2SEnum::GO2SError GO2SMatrix::DefineFromVectorAndOrigin | ( | GO2SXYZ | thisVector, |
GO2SXYZ | origin ) |
Define a matrix using origin with Z vector equal to thisVector, X and Y vectors are created automatically
[in] | thisVector | z vector on which align Z of the plane |
[in] | origin | new origin of the plane |
GO2SEnum::GO2SError GO2SMatrix::DefineRotation | ( | GO2SXYZ | axe, |
Number | ang ) |
Define a rotation around a given axis. The angle is given in radian
[in] | axe | Rotation axis |
[in] | ang | Rotation angle in radian |
GO2SEnum::GO2SError GO2SMatrix::DefineRotation | ( | GO2SXYZ | centre, |
GO2SXYZ | axe, | ||
Number | ang ) |
Define a rotation around given point and axis. The angle is given in radian
[in] | centre | Position of the rotation axis |
[in] | axe | Rotation axis |
[in] | ang | Rotation angle in radian |
|
inline |
Define a rotation around X axis.
[in] | ang | The angle in radian |
|
inline |
Define a rotation around Y axis.
[in] | ang | The angle in radian |
|
inline |
Define a rotation around Z axis.
[in] | ang | The angle in radian |
|
inline |
Define a rotation around the 3 axis. The rotation is done around X, then around Y, then around Z (R = RzRyRx). Angles are given in radian
[in] | angZ | angle around Z axis in radian |
[in] | angY | angle around y axis in radian |
[in] | angX | angle around X axis in radian |
GO2SEnum::GO2SError GO2SMatrix::DefineSymmetry | ( | GO2SXYZ | centre, |
GO2SXYZ | TransAxe, | ||
GO2SXYZ | NormalAxe = new GO2SXYZ(0, 0, 1) ) |
Define a symmetry according to the face plane given
[in] | centre | Position of the symmetry plane |
[in] | TransAxe | Axe of the plane (would be the ovious 2D) |
[in] | NormalAxe | Other axe of the plane, visual direction ( would be Z) |
GO2SEnum::GO2SError GO2SMatrix::DefineSymmetryByPlane | ( | GO2SXYZ | centre, |
GO2SXYZ | NormalPlane ) |
Define a symmetry according to the face plane given
[in] | centre | Position of the symmetry plane |
[in] | NormalPlane | Normal to the plane, visual direction ( would be Z) |
GO2SEnum::GO2SError GO2SMatrix::DefineTransferVector | ( | GO2SXYZ | vecFrom, |
GO2SXYZ | vecTo, | ||
GO2SXYZ | oriFrom, | ||
GO2SXYZ | oriTo, | ||
GO2SXYZ | refFrom, | ||
GO2SXYZ | refTo ) |
Define a transformation matrix that aligns a vectors and positions
[in] | vecFrom | destination vector for vecTo |
[in] | vecTo | vector that will be aligned on vecFrom |
[in] | oriFrom | destination position |
[in] | oriTo | original position |
[in] | refFrom | destination vector for refTo |
[in] | refTo | vector that will be aligned on refFrom |
GO2SEnum::GO2SError GO2SMatrix::DefineTranslation | ( | GO2SXYZ | tr | ) |
Define a translation matrix (the rotation part is set to identity)
[in] | tr | translation vector |
|
inline |
|
inline |
GO2SEnum::GO2SError GO2SMatrix::Invert | ( | ) |
Invert the matrix if invertible
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the result of the multiplication of two matrix.
[in] | other | the second matrix |
Apply the matrix to xyz, considering xyz is a point.
[in] | xyz | the point |
Apply the matrix to xyz, considering xyz is a vector.
[in] | xyz | the vector |
|
inline |
GO2SEnum::GO2SError GO2SMatrix::SetOrigin | ( | GO2SXYZ | po | ) |
Set the translation vector (last column) of the matrix. Other values are unchanged.
[in] | po | new origin |
GO2SEnum::GO2SError GO2SMatrix::SetXaxis | ( | GO2SXYZ | ax | ) |
Set the X vector (1st column) of the matrix. Other values are unchanged.
[in] | ax | new X axis |
GO2SEnum::GO2SError GO2SMatrix::SetYaxis | ( | GO2SXYZ | ay | ) |
Set the Y vector (2nd column) of the matrix. Other values are unchanged.
[in] | ay | new Y axis |
GO2SEnum::GO2SError GO2SMatrix::SetZaxis | ( | GO2SXYZ | az | ) |
Set the Z vector (3rd column) of the matrix. Other values are unchanged.
[in] | az | new Z axis |
GO2SEnum::GO2SError GO2SMatrix::Translate | ( | GO2SXYZ | vect | ) |
Apply a translation to the matrix
[in] | vect | translation vector |
|
inline |
|
inline |
|
inline |
|
inline |