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

Public Member Functions | |
| FaMat34 () | |
| Default constructor creating an identity matrix at the origin. More... | |
| FaMat34 (const float *mat) | |
| Constructor creating a matrix from a float array. More... | |
| FaMat34 (const double *mat) | |
| Constructor creating a matrix from a double array. More... | |
| FaMat34 (const FaVec3 &pos) | |
| Constructor creating an identity matrix at the the point pos. More... | |
| FaMat34 (const FaVec3 &v0, const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3) | |
| Constructor creating a identity matrix from four column vectors. More... | |
| FaMat34 (const FaMat33 &m, const FaVec3 &v) | |
| Constructor creating a matrix from given rotation and position. More... | |
| FaMat34 & | operator+= (const FaMat34 &m) |
| Addition operator. More... | |
| FaMat34 & | operator+= (const FaVec3 &v) |
| Addition operator, position only. More... | |
| FaMat34 & | operator-= (const FaMat34 &m) |
| Subtraction operator. More... | |
| FaMat34 & | operator-= (const FaVec3 &v) |
| Subtraction operator, position only. More... | |
| FaMat34 & | operator*= (double d) |
| Scaling operator (multiplication by a scalar). More... | |
| FaMat34 & | 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... | |
| const FaMat33 & | direction () const |
| Returns a const reference to the orientation matrix r. More... | |
| const FaVec3 & | translation () const |
| Returns a const reference to the position vector p. More... | |
| FaMat34 | inverse () const |
| Returns the inverse of the matrix. More... | |
| FaMat34 & | setIdentity () |
| Initializes the matrix to the indentity rotation at the origin. More... | |
| bool | isCoincident (const FaMat34 &m, double tolerance=1.0e-10) const |
| Returns true if the matrix m equals *this within the given tolerance. More... | |
| FaMat34 & | eulerRotateZYX (const FaVec3 &anglesXYZ, const FaMat34 &fromMatrix) |
| Computes a relative rotation from the given Euler angles. More... | |
| FaMat34 & | eulerRotateZYX (const FaVec3 &anglesXYZ) |
| Computes an incremental rotation from the given Euler angles. More... | |
| FaMat34 & | eulerTransform (const FaVec3 &offsetXYZ, const FaVec3 &anglesXYZ, const FaMat34 &fromMatrix) |
| Computes a relative rotation from given Euler angles and offset. More... | |
| FaMat34 & | quatrTransform (const FaVec3 &offsetXYZ, const FaVec3 &anglesXYZ, const FaMat34 &fromMatrix) |
| Computes a relative rotation from given rotation angles and offset. More... | |
| FaMat34 & | makeGlobalizedCS (const FaVec3 &origin, const FaVec3 &p1) |
| Computes a globalized coordinate system from trwo vectors. More... | |
| FaMat34 & | makeGlobalizedCS (const FaVec3 &origin, const FaVec3 &p1, const FaVec3 &p2) |
| Computes a globalized coordinate system from three vectors. More... | |
| FaMat34 & | makeGlobalizedCS (const FaVec3 &origin, const FaVec3 &p1, const FaVec3 &p2, const FaVec3 &p3) |
| Computes a globalized coordinate system from four vectors. More... | |
| FaMat34 & | makeCS_X_XY (const FaVec3 &origin, const FaVec3 &xpt, const FaVec3 &xypl) |
| Computes a coordinate from points in the XY-plane and the X-axis. More... | |
| FaMat34 & | makeCS_X_XZ (const FaVec3 &origin, const FaVec3 &xpt, const FaVec3 &xzpl) |
| Computes a coordinate from points in the XZ-plane and the X-axis. More... | |
| FaMat34 & | makeCS_Z_XZ (const FaVec3 &origin, const FaVec3 &zpt, const FaVec3 &xzpl) |
| Computes a coordinate from points in the XZ-plane and the Z-axis. More... | |
| FaVec3 | projectOnXY (const FaVec3 &x) const |
| Calculates the projection of x onto the XY-plane of this matrix. More... | |
| FaVec3 | getEulerZYX () const |
| Returns the Euler angles corresponding to the orientation r. More... | |
| FaVec3 | getEulerZYX (const FaMat34 &from) const |
| Returns the Euler angles corresponding to a relative rotation. More... | |
| double | getEulerZYX (int i) const |
| Returns the i'th Euler angle corresponding to r. More... | |
| double | getEulerZYX (int i, const FaMat34 &from) const |
| Returns the i'th Euler angle of a relative rotation. More... | |
| double | getRotation (int i) const |
| Returns the angles corresponding to the orientation r. More... | |
| double | getRotation (int i, const FaMat34 &from) const |
| Returns the i'th angle corresponding to a relative rotation. More... | |
| std::ostream & | printStd (std::ostream &os) const |
| Writes the matrix to the provided output stream. More... | |
| std::ostream & | printRot (std::ostream &os) const |
| Writes the matrix to the provided output stream. More... | |
| bool | readStd (std::istream &s) |
| Reads the matrix from the provided input stream. More... | |
| bool | readRot (std::istream &s) |
| Reads the matrix from the provided input stream. More... | |
Private Attributes | |
| FaMat33 | r |
| Orientation matrix. More... | |
| FaVec3 | p |
| Position vector. More... | |
Friends | |
| FaMat34 | operator- (const FaMat34 &a) |
| Unary negation operator. More... | |
| FaMat34 | operator+ (const FaMat34 &a, const FaMat34 &b) |
| Global addition operator. More... | |
| FaMat34 | operator+ (const FaMat34 &a, const FaVec3 &b) |
| Global addition operator, positions only. More... | |
| FaMat34 | operator- (const FaMat34 &a, const FaMat34 &b) |
| Global subtraction operator. More... | |
| FaMat34 | operator- (const FaMat34 &a, const FaVec3 &b) |
| Global subtraction operator, positions only. More... | |
| FaMat34 | operator* (const FaMat34 &a, const FaMat34 &b) |
| Multiplication of two matrices. More... | |
| FaMat34 | operator* (const FaMat34 &a, const FaMat33 &b) |
| Multiplication of two matrices, rotations only. More... | |
| FaVec3 | operator* (const FaMat34 &a, const FaVec3 &b) |
| Multiplication of a matrix and a point vector. More... | |
| bool | operator== (const FaMat34 &a, const FaMat34 &b) |
| Equality operator. More... | |
| bool | operator!= (const FaMat34 &a, const FaMat34 &b) |
| Inequality operator. More... | |
| std::ostream & | operator<< (std::ostream &s, const FaMat34 &m) |
| Printing operator. More... | |
| std::istream & | operator>> (std::istream &s, FaMat34 &m) |
| Reading operator. More... | |
Class for positions in 3D space.
This class is a 3×4 matrix actually representing a 4×4 matrix defining the position and orientation of a point in 3D space, or a coordinate system with axis directions and origin offset. The class is equipped with many convenience methods for the most common operations on position objects. Many of the mathematical opertions are defined as is if the fourth row of the matrix equals 0 0 0 1. This row is however not stored.
Matrix layout:
|
inline |
Default constructor creating an identity matrix at the origin.
|
inline |
Constructor creating a matrix from a float array.
|
inline |
Constructor creating a matrix from a double array.
|
inlineexplicit |
Constructor creating an identity matrix at the the point pos.
|
inline |
Constructor creating a identity matrix from four column vectors.
Constructor creating a matrix from given rotation and position.
|
inline |
Returns a const reference to the orientation matrix r.
Computes an incremental rotation from the given Euler angles.
Computes a relative rotation from the given Euler angles.
| FaMat34 & FaMat34::eulerTransform | ( | const FaVec3 & | offsetXYZ, |
| const FaVec3 & | anglesXYZ, | ||
| const FaMat34 & | fromMatrix | ||
| ) |
Computes a relative rotation from given Euler angles and offset.
Returns the Euler angles corresponding to a relative rotation.
| double FaMat34::getEulerZYX | ( | int | i | ) | const |
Returns the i'th Euler angle corresponding to r.
| double FaMat34::getEulerZYX | ( | int | i, |
| const FaMat34 & | from | ||
| ) | const |
Returns the i'th Euler angle of a relative rotation.
| double FaMat34::getRotation | ( | int | i | ) | const |
Returns the angles corresponding to the orientation r.
| double FaMat34::getRotation | ( | int | i, |
| const FaMat34 & | from | ||
| ) | const |
Returns the i'th angle corresponding to a relative rotation.
| FaMat34 FaMat34::inverse | ( | ) | const |
Returns the inverse of the matrix.
| bool FaMat34::isCoincident | ( | const FaMat34 & | m, |
| double | tolerance = 1.0e-10 |
||
| ) | const |
Returns true if the matrix m equals *this within the given tolerance.
Computes a coordinate from points in the XY-plane and the X-axis.
Computes a coordinate from points in the XZ-plane and the X-axis.
Computes a coordinate from points in the XZ-plane and the Z-axis.
Computes a globalized coordinate system from trwo vectors.
Computes a globalized coordinate system from three vectors.
| FaMat34 & FaMat34::makeGlobalizedCS | ( | const FaVec3 & | origin, |
| const FaVec3 & | p1, | ||
| const FaVec3 & | p2, | ||
| const FaVec3 & | p3 | ||
| ) |
Computes a globalized coordinate system from four vectors.
|
inline |
One-based indexing operator accessing an element (for update).
|
inline |
One-based indexing operator accessing a matrix element (read only).
| FaMat34 & FaMat34::operator*= | ( | double | d | ) |
Scaling operator (multiplication by a scalar).
| FaMat34 & FaMat34::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).
| std::ostream & FaMat34::printRot | ( | std::ostream & | os | ) | const |
Writes the matrix to the provided output stream.
This method writes a reduced homogenous transformation matrix. Format:
| std::ostream & FaMat34::printStd | ( | std::ostream & | os | ) | const |
Writes the matrix to the provided output stream.
This method writes a reduced homogenous transformation matrix. Format:
Calculates the projection of x onto the XY-plane of this matrix.
| FaMat34 & FaMat34::quatrTransform | ( | const FaVec3 & | offsetXYZ, |
| const FaVec3 & | anglesXYZ, | ||
| const FaMat34 & | fromMatrix | ||
| ) |
Computes a relative rotation from given rotation angles and offset.
| bool FaMat34::readRot | ( | std::istream & | s | ) |
Reads the matrix from the provided input stream.
This method reads a reduced homogenous transformation matrix. Format:
| bool FaMat34::readStd | ( | std::istream & | s | ) |
Reads the matrix from the provided input stream.
This method reads a reduced homogenous transformation matrix. Format:
| FaMat34 & FaMat34::setIdentity | ( | ) |
Initializes the matrix to the indentity rotation at the origin.
|
inline |
Returns a const reference to the position vector p.
Multiplication of two matrices, rotations only.
Multiplication of a matrix and a point vector.
Global addition operator, positions only.
Global subtraction operator, positions only.
|
friend |
Printing operator.
|
friend |
Reading operator.
|
private |
Position vector.
|
private |
Orientation matrix.