|
FEDEM Solver
R8.0
Source code of the dynamics solver
|
Class for point transformations in 3D space. More...
#include <FFaMat33.H>

Public Member Functions | |
| FaMat33 () | |
| Default constructor creating an identity matrix. More... | |
| FaMat33 (const float *mat) | |
| Constructor creating a matrix from a float array. More... | |
| FaMat33 (const double *mat) | |
| Constructor creating a matrix from a double array. More... | |
| FaMat33 (const FaVec3 &v0, const FaVec3 &v1, const FaVec3 &v2) | |
| Constructor creating a matrix from 3 column vectors. More... | |
| FaMat33 & | operator+= (const FaMat33 &m) |
| Addition operator. More... | |
| FaMat33 & | operator-= (const FaMat33 &m) |
| Subtraction operator. More... | |
| FaMat33 & | operator*= (double d) |
| Scaling operator (multiplication by a scalar). More... | |
| FaMat33 & | operator/= (double d) |
| Scaling operator (division by a scalar). More... | |
| const FaVec3 & | operator[] (int i) const |
| Zero-based indexing operator accessing a matrix column (read only). More... | |
| FaVec3 & | operator[] (int i) |
| Zero-based indexing operator accessing a column (for update). More... | |
| const double & | operator() (int i, int j) const |
| One-based indexing operator accessing a matrix element (read only). More... | |
| double & | operator() (int i, int j) |
| One-based indexing operator accessing an element (for update). More... | |
| FaMat33 | inverse (double eps=1.0e-16) const |
| Returns the inverse of the matrix. More... | |
| FaMat33 & | setIdentity () |
| Initializes the matrix to the identity matrix. More... | |
| FaMat33 | transpose () const |
| Returns the transpose of matrix. More... | |
| FaMat33 & | shift (int delta) |
| Performs a cyclic permutation of the matrix columns. More... | |
| bool | isCoincident (const FaMat33 &m, double tolerance=1.0e-10) const |
| Returns true if the matrix m equals *this within the given tolerance. More... | |
| FaMat33 & | makeGlobalizedCS (const FaVec3 &v1) |
| Computes a globalized coordinate system from an X-axis vector. More... | |
| FaMat33 & | makeGlobalizedCS (const FaVec3 &v1, const FaVec3 &v2) |
| Computes a globalized coordinate system from two in-plane vectors. More... | |
| FaMat33 & | makeGlobalizedCS (const FaVec3 &v0, const FaVec3 &v1, const FaVec3 &v2) |
| Computes a globalized coordinate system from three vectors. More... | |
| FaMat33 & | makeGlobalizedCS (const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3, const FaVec3 &v4) |
| Computes a globalized coordinate system from four vectors. More... | |
| FaMat33 & | eulerRotateZYX (const FaVec3 &angles) |
| Compute an incremental rotation tensor from the given Euler angles. More... | |
| FaMat33 & | incRotate (const FaVec3 &angles) |
| Computes an incremental rotation tensor from the given angles. More... | |
| FaVec3 | getEulerZYX () const |
| Returns the Euler angles corresponding to an incremental rotation. More... | |
| FaVec3 | getRotation () const |
| Returns the angles corresponding to an incremental rotation. More... | |
Static Public Member Functions | |
| static FaMat33 | makeZrotation (double angle) |
| Returns the matrix representing a rotation about the Z-axis. More... | |
| static FaMat33 | makeYrotation (double angle) |
| Returns the matrix representing a rotation about the Y-axis. More... | |
| static FaMat33 | makeXrotation (double angle) |
| Returns the matrix representing a rotation about the X-axis. More... | |
Private Attributes | |
| FaVec3 | v [3] |
| Columns of the 3×3 matrix. More... | |
Friends | |
| FaMat33 | operator- (const FaMat33 &a) |
| Unary negation operator. More... | |
| FaMat33 | operator+ (const FaMat33 &a, const FaMat33 &b) |
| Global addition operator. More... | |
| FaMat33 | operator- (const FaMat33 &a, const FaMat33 &b) |
| Global subtraction operator. More... | |
| FaMat33 | operator* (const FaMat33 &a, const FaMat33 &b) |
| Multiplication of two matrices. More... | |
| FaMat33 | operator* (const FaMat33 &a, double d) |
| Scaling operator, multiplication of a matrix and a scalar. More... | |
| FaMat33 | operator* (double d, const FaMat33 &a) |
| Scaling operator, multiplication of a scalar and a matrix. More... | |
| FaVec3 | operator* (const FaMat33 &a, const FaVec3 &b) |
| Multiplication of a matrix and a point vector. More... | |
| FaVec3 | operator* (const FaVec3 &a, const FaMat33 &b) |
| Multiplication of a point vector and matrix. More... | |
| FaMat33 | operator/ (const FaMat33 &a, double d) |
| Scaling operator, division by a scalar. More... | |
| int | operator== (const FaMat33 &a, const FaMat33 &b) |
| Equality operator. More... | |
| int | operator!= (const FaMat33 &a, const FaMat33 &b) |
| Inequality operator. More... | |
| std::ostream & | operator<< (std::ostream &s, const FaMat33 &m) |
| Printing operator. More... | |
| std::istream & | operator>> (std::istream &s, FaMat33 &m) |
| Reading operator. More... | |
Class for point transformations in 3D space.
This class is a 3×3 matrix representing the coordinate system axes or a transformation of 3D point vectors. The class is equipped with many convenience methods for the most common operations on such objects.
Matrix layout:
|
inline |
Default constructor creating an identity matrix.
| FaMat33::FaMat33 | ( | const float * | mat | ) |
Constructor creating a matrix from a float array.
| FaMat33::FaMat33 | ( | const double * | mat | ) |
Constructor creating a matrix from a double array.
Constructor creating a matrix from 3 column vectors.
Compute an incremental rotation tensor from the given Euler angles.
| FaVec3 FaMat33::getEulerZYX | ( | ) | const |
Returns the Euler angles corresponding to an incremental rotation.
| FaVec3 FaMat33::getRotation | ( | ) | const |
Returns the angles corresponding to an incremental rotation.
This function is equivalent to the Fortran subroutine rotationmodule::mat_to_vec in the module rotationmodule (see the src/vpmUtilities directory).
Computes an incremental rotation tensor from the given angles.
The incremental rotation tensor is computed from the rotation angles using a quaternion representation of the rotation. This function is equivalent to the Fortran subroutine rotationmodule::vec_to_mat in the module rotationmodule (see the src/vpmUtilities directory). The angles provided are those related to a Rodrigues parameterization. Rotation axis, with length equal to the angle to rotate about that axis.
| FaMat33 FaMat33::inverse | ( | double | eps = 1.0e-16 | ) | const |
Returns the inverse of the matrix.
| [in] | eps | Zero tolerance for the matrix determinant |
| bool FaMat33::isCoincident | ( | const FaMat33 & | oMat, |
| double | tolerance = 1.0e-10 |
||
| ) | const |
Returns true if the matrix m equals *this within the given tolerance.
The two matrices are considered identical if their respecive column vectors are parallel and not in the opposite direction.
Computes a globalized coordinate system from three vectors.
Computes a globalized coordinate system from an X-axis vector.
Compute a globalized coordinate system where the X-axis is parallel to the given vector v1, and the two other axes are as close as possible to the corresponding global coordinate axes.
Computes a globalized coordinate system from two in-plane vectors.
Compute a globalized coordinate system in the plane defined by the two given vectors v1 and v2, such that the local Z-axis is parallell to the normal vector of the plane, and the two other axes are as close as possible to the corresponding global coordinate axes.
| FaMat33 & FaMat33::makeGlobalizedCS | ( | const FaVec3 & | v1, |
| const FaVec3 & | v2, | ||
| const FaVec3 & | v3, | ||
| const FaVec3 & | v4 | ||
| ) |
Computes a globalized coordinate system from four vectors.
|
static |
Returns the matrix representing a rotation about the X-axis.
|
static |
Returns the matrix representing a rotation about the Y-axis.
|
static |
Returns the matrix representing a rotation about the Z-axis.
|
inline |
One-based indexing operator accessing an element (for update).
|
inline |
One-based indexing operator accessing a matrix element (read only).
| FaMat33 & FaMat33::operator*= | ( | double | d | ) |
Scaling operator (multiplication by a scalar).
| FaMat33 & FaMat33::operator/= | ( | double | d | ) |
Scaling operator (division by a scalar).
|
inline |
Zero-based indexing operator accessing a column (for update).
|
inline |
Zero-based indexing operator accessing a matrix column (read only).
| FaMat33 & FaMat33::setIdentity | ( | ) |
Initializes the matrix to the identity matrix.
| FaMat33 & FaMat33::shift | ( | int | delta | ) |
Performs a cyclic permutation of the matrix columns.
| FaMat33 FaMat33::transpose | ( | ) | const |
Returns the transpose of matrix.
Multiplication of a matrix and a point vector.
Scaling operator, multiplication of a matrix and a scalar.
Multiplication of a point vector and matrix.
Scaling operator, multiplication of a scalar and a matrix.
|
friend |
Printing operator.
|
friend |
Reading operator.
|
private |
Columns of the 3×3 matrix.