138 std::ostream&
printStd(std::ostream& os)
const;
140 std::ostream&
printRot(std::ostream& os)
const;
187 #ifdef FFA_INDEXCHECK
189 std::cerr <<
"FaMat34::operator[]: index i="<< i <<
" is out of range [0,3]"
192 return i == 3 ?
p :
r[i];
197 #ifdef FFA_INDEXCHECK
199 std::cerr <<
"FaMat34::operator[]: index i="<< i <<
" is out of range [0,3]"
202 return i == 3 ?
p :
r[i];
210 return j == 4 ?
p[i-1] :
r[j-1][i-1];
215 return j == 4 ?
p[i-1] :
r[j-1][i-1];
Point transformations in 3D space.
Point vectors in 3D space.
Class for point transformations in 3D space.
Definition: FFaMat33.H:27
Class for positions in 3D space.
Definition: FFaMat34.H:32
friend FaMat34 operator+(const FaMat34 &a, const FaMat34 &b)
Global addition operator.
FaMat34 & quatrTransform(const FaVec3 &offsetXYZ, const FaVec3 &anglesXYZ, const FaMat34 &fromMatrix)
Computes a relative rotation from given rotation angles and offset.
Definition: FFaMat34.C:134
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.
Definition: FFaMat34.C:210
friend std::ostream & operator<<(std::ostream &s, const FaMat34 &m)
Printing operator.
friend bool operator!=(const FaMat34 &a, const FaMat34 &b)
Inequality operator.
FaMat34 & operator+=(const FaMat34 &m)
Addition operator.
Definition: FFaMat34.C:37
FaMat34()
Default constructor creating an identity matrix at the origin.
Definition: FFaMat34.H:35
FaMat34(const double *mat)
Constructor creating a matrix from a double array.
Definition: FFaMat34.H:39
FaMat34(const FaVec3 &v0, const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3)
Constructor creating a identity matrix from four column vectors.
Definition: FFaMat34.H:43
friend FaMat34 operator-(const FaMat34 &a)
Unary negation operator.
FaMat34 & operator-=(const FaMat34 &m)
Subtraction operator.
Definition: FFaMat34.C:51
const FaMat33 & direction() const
Returns a const reference to the orientation matrix r.
Definition: FFaMat34.H:74
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.
Definition: FFaMat34.C:236
FaMat34 & makeGlobalizedCS(const FaVec3 &origin, const FaVec3 &p1)
Computes a globalized coordinate system from trwo vectors.
Definition: FFaMat34.C:144
double getRotation(int i) const
Returns the angles corresponding to the orientation r.
Definition: FFaMat34.C:199
FaMat34 & operator/=(double d)
Scaling operator (division by a scalar).
Definition: FFaMat34.C:73
friend FaMat34 operator*(const FaMat34 &a, const FaMat34 &b)
Multiplication of two matrices.
bool readStd(std::istream &s)
Reads the matrix from the provided input stream.
Definition: FFaMat34.C:304
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.
Definition: FFaMat34.C:223
FaMat34 & eulerTransform(const FaVec3 &offsetXYZ, const FaVec3 &anglesXYZ, const FaMat34 &fromMatrix)
Computes a relative rotation from given Euler angles and offset.
Definition: FFaMat34.C:124
friend std::istream & operator>>(std::istream &s, FaMat34 &m)
Reading operator.
FaMat34 & eulerRotateZYX(const FaVec3 &anglesXYZ, const FaMat34 &fromMatrix)
Computes a relative rotation from the given Euler angles.
Definition: FFaMat34.C:116
FaMat34(const FaVec3 &pos)
Constructor creating an identity matrix at the the point pos.
Definition: FFaMat34.H:41
FaMat33 r
Orientation matrix.
Definition: FFaMat34.H:178
const FaVec3 & operator[](int i) const
Zero-based indexing operator accessing a matrix column (read only).
Definition: FFaMat34.H:185
const FaVec3 & translation() const
Returns a const reference to the position vector p.
Definition: FFaMat34.H:76
FaMat34 inverse() const
Returns the inverse of the matrix.
Definition: FFaMat34.C:87
FaMat34 & setIdentity()
Initializes the matrix to the indentity rotation at the origin.
Definition: FFaMat34.C:93
FaVec3 p
Position vector.
Definition: FFaMat34.H:179
std::ostream & printRot(std::ostream &os) const
Writes the matrix to the provided output stream.
Definition: FFaMat34.C:289
FaVec3 projectOnXY(const FaVec3 &x) const
Calculates the projection of x onto the XY-plane of this matrix.
Definition: FFaMat34.C:170
FaVec3 getEulerZYX() const
Returns the Euler angles corresponding to the orientation r.
Definition: FFaMat34.C:177
friend bool operator==(const FaMat34 &a, const FaMat34 &b)
Equality operator.
FaMat34 & operator*=(double d)
Scaling operator (multiplication by a scalar).
Definition: FFaMat34.C:65
std::ostream & printStd(std::ostream &os) const
Writes the matrix to the provided output stream.
Definition: FFaMat34.C:264
const double & operator()(int i, int j) const
One-based indexing operator accessing a matrix element (read only).
Definition: FFaMat34.H:208
bool isCoincident(const FaMat34 &m, double tolerance=1.0e-10) const
Returns true if the matrix m equals *this within the given tolerance.
Definition: FFaMat34.C:101
FaMat34(const float *mat)
Constructor creating a matrix from a float array.
Definition: FFaMat34.H:37
FaMat34(const FaMat33 &m, const FaVec3 &v)
Constructor creating a matrix from given rotation and position.
Definition: FFaMat34.H:46
bool readRot(std::istream &s)
Reads the matrix from the provided input stream.
Definition: FFaMat34.C:323
Class for point vectors in 3D space.
Definition: FFaVec3.H:40
real(sp), dimension(:,:,:), pointer b
Definition: diffractionModule.f90:22
real(sp), dimension(:,:,:), pointer a
Definition: diffractionModule.f90:21
real(dp), dimension(:,:), allocatable m
Definition: inverseModule.f90:38
real(dp), dimension(:), allocatable v0
Definition: inverseModule.f90:26
real(dp), dimension(:), allocatable v1
Definition: inverseModule.f90:27
real(dp), dimension(:), allocatable v2
Definition: inverseModule.f90:28