HDK
|
#include "ImathEuler.h"
#include "ImathExport.h"
#include "ImathMatrix.h"
#include "ImathNamespace.h"
#include "ImathQuat.h"
#include "ImathVec.h"
#include <math.h>
Go to the source code of this file.
Functions | |
template<class T > | |
bool | extractScaling (const Matrix44< T > &mat, Vec3< T > &scl, bool exc=true) |
template<class T > | |
Matrix44< T > | sansScaling (const Matrix44< T > &mat, bool exc=true) |
template<class T > | |
bool | removeScaling (Matrix44< T > &mat, bool exc=true) |
template<class T > | |
bool | extractScalingAndShear (const Matrix44< T > &mat, Vec3< T > &scl, Vec3< T > &shr, bool exc=true) |
template<class T > | |
Matrix44< T > | sansScalingAndShear (const Matrix44< T > &mat, bool exc=true) |
template<class T > | |
void | sansScalingAndShear (Matrix44< T > &result, const Matrix44< T > &mat, bool exc=true) |
template<class T > | |
bool | removeScalingAndShear (Matrix44< T > &mat, bool exc=true) |
Remove scaling and shear from the given 4x4 matrix in place. More... | |
template<class T > | |
bool | extractAndRemoveScalingAndShear (Matrix44< T > &mat, Vec3< T > &scl, Vec3< T > &shr, bool exc=true) |
template<class T > | |
void | extractEulerXYZ (const Matrix44< T > &mat, Vec3< T > &rot) |
template<class T > | |
void | extractEulerZYX (const Matrix44< T > &mat, Vec3< T > &rot) |
template<class T > | |
Quat< T > | extractQuat (const Matrix44< T > &mat) |
template<class T > | |
bool | extractSHRT (const Matrix44< T > &mat, Vec3< T > &s, Vec3< T > &h, Vec3< T > &r, Vec3< T > &t, bool exc, typename Euler< T >::Order rOrder) |
template<class T > | |
bool | extractSHRT (const Matrix44< T > &mat, Vec3< T > &s, Vec3< T > &h, Vec3< T > &r, Vec3< T > &t, bool exc=true) |
template<class T > | |
bool | extractSHRT (const Matrix44< T > &mat, Vec3< T > &s, Vec3< T > &h, Euler< T > &r, Vec3< T > &t, bool exc=true) |
template<class T > | |
bool | checkForZeroScaleInRow (const T &scl, const Vec3< T > &row, bool exc=true) |
template<class T > | |
Matrix44< T > | outerProduct (const Vec4< T > &a, const Vec4< T > &b) |
Return the 4x4 outer product two 4-vectors. More... | |
template<class T > | |
Matrix44< T > | rotationMatrix (const Vec3< T > &fromDirection, const Vec3< T > &toDirection) |
template<class T > | |
Matrix44< T > | rotationMatrixWithUpDir (const Vec3< T > &fromDir, const Vec3< T > &toDir, const Vec3< T > &upDir) |
template<class T > | |
void | alignZAxisWithTargetDir (Matrix44< T > &result, Vec3< T > targetDir, Vec3< T > upDir) |
template<class T > | |
Matrix44< T > | computeLocalFrame (const Vec3< T > &p, const Vec3< T > &xDir, const Vec3< T > &normal) |
template<class T > | |
Matrix44< T > | addOffset (const Matrix44< T > &inMat, const Vec3< T > &tOffset, const Vec3< T > &rOffset, const Vec3< T > &sOffset, const Vec3< T > &ref) |
template<class T > | |
Matrix44< T > | computeRSMatrix (bool keepRotateA, bool keepScaleA, const Matrix44< T > &A, const Matrix44< T > &B) |
template<class T > | |
bool | extractScaling (const Matrix33< T > &mat, Vec2< T > &scl, bool exc=true) |
template<class T > | |
Matrix33< T > | sansScaling (const Matrix33< T > &mat, bool exc=true) |
template<class T > | |
bool | removeScaling (Matrix33< T > &mat, bool exc=true) |
template<class T > | |
bool | extractScalingAndShear (const Matrix33< T > &mat, Vec2< T > &scl, T &shr, bool exc=true) |
template<class T > | |
Matrix33< T > | sansScalingAndShear (const Matrix33< T > &mat, bool exc=true) |
template<class T > | |
bool | removeScalingAndShear (Matrix33< T > &mat, bool exc=true) |
Remove scaling and shear from the given 3x3e matrix in place. More... | |
template<class T > | |
bool | extractAndRemoveScalingAndShear (Matrix33< T > &mat, Vec2< T > &scl, T &shr, bool exc=true) |
template<class T > | |
void | extractEuler (const Matrix22< T > &mat, T &rot) |
template<class T > | |
void | extractEuler (const Matrix33< T > &mat, T &rot) |
template<class T > | |
bool | extractSHRT (const Matrix33< T > &mat, Vec2< T > &s, T &h, T &r, Vec2< T > &t, bool exc=true) |
template<class T > | |
bool | checkForZeroScaleInRow (const T &scl, const Vec2< T > &row, bool exc=true) |
template<class T > | |
Matrix33< T > | outerProduct (const Vec3< T > &a, const Vec3< T > &b) |
Return the 3xe outer product two 3-vectors. More... | |
template<class T > | |
Matrix44< T > | addOffset (const Matrix44< T > &inMat, const Vec3< T > &tOffset, const Vec3< T > &rOffset, const Vec3< T > &sOffset, const Matrix44< T > &ref) |
template<typename T > | |
M44d | procrustesRotationAndTranslation (const Vec3< T > *A, const Vec3< T > *B, const T *weights, const size_t numPoints, const bool doScaling=false) |
template<typename T > | |
M44d | procrustesRotationAndTranslation (const Vec3< T > *A, const Vec3< T > *B, const size_t numPoints, const bool doScaling=false) |
template<typename T > | |
void | jacobiSVD (const Matrix33< T > &A, Matrix33< T > &U, Vec3< T > &S, Matrix33< T > &V, const T tol=std::numeric_limits< T >::epsilon(), const bool forcePositiveDeterminant=false) |
template<typename T > | |
void | jacobiSVD (const Matrix44< T > &A, Matrix44< T > &U, Vec4< T > &S, Matrix44< T > &V, const T tol=std::numeric_limits< T >::epsilon(), const bool forcePositiveDeterminant=false) |
template<typename T > | |
void | jacobiEigenSolver (Matrix33< T > &A, Vec3< T > &S, Matrix33< T > &V, const T tol) |
template<typename T > | |
void | jacobiEigenSolver (Matrix33< T > &A, Vec3< T > &S, Matrix33< T > &V) |
template<typename T > | |
void | jacobiEigenSolver (Matrix44< T > &A, Vec4< T > &S, Matrix44< T > &V, const T tol) |
template<typename T > | |
void | jacobiEigenSolver (Matrix44< T > &A, Vec4< T > &S, Matrix44< T > &V) |
template<typename TM , typename TV > | |
void | maxEigenVector (TM &A, TV &S) |
template<typename TM , typename TV > | |
void | minEigenVector (TM &A, TV &S) |
Variables | |
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_EXPORT_CONST M22f | identity22f |
M22f identity matrix. More... | |
IMATH_EXPORT_CONST M33f | identity33f |
M33f identity matrix. More... | |
IMATH_EXPORT_CONST M44f | identity44f |
M44f identity matrix. More... | |
IMATH_EXPORT_CONST M22d | identity22d |
M22d identity matrix. More... | |
IMATH_EXPORT_CONST M33d | identity33d |
M33d identity matrix. More... | |
IMATH_EXPORT_CONST M44d | identity44d |
M44d identity matrix. More... | |
Matrix44<T> addOffset | ( | const Matrix44< T > & | inMat, |
const Vec3< T > & | tOffset, | ||
const Vec3< T > & | rOffset, | ||
const Vec3< T > & | sOffset, | ||
const Vec3< T > & | ref | ||
) |
Add a translate/rotate/scale offset to a 4x4 input frame and put it in another frame of reference
[in] | inMat | Input frame |
[in] | tOffset | Translation offset |
[in] | rOffset | Rotation offset in degrees |
[in] | sOffset | Scale offset |
[in] | ref | Frame of reference |
Matrix44<T> addOffset | ( | const Matrix44< T > & | inMat, |
const Vec3< T > & | tOffset, | ||
const Vec3< T > & | rOffset, | ||
const Vec3< T > & | sOffset, | ||
const Matrix44< T > & | ref | ||
) |
Add a translate/rotate/scale offset to an input frame and put it in another frame of reference.
inMat | input frame |
tOffset | translate offset |
rOffset | rotate offset in degrees |
sOffset | scale offset |
ref | Frame of reference |
Definition at line 1027 of file ImathMatrixAlgo.h.
void alignZAxisWithTargetDir | ( | Matrix44< T > & | result, |
Vec3< T > | targetDir, | ||
Vec3< T > | upDir | ||
) |
Construct a 4x4 matrix that rotates the z-axis so that it points towards targetDir
. You must also specify that you want the up vector to be pointing in a certain direction upDir
.
Notes: The following degenerate cases are handled: (a) when the directions given by toDir
and upDir
are parallel or opposite (the direction vectors must have a non-zero cross product); (b) when any of the given direction vectors have zero length
[out] | result | The output matrix |
[in] | targetDir | The target direction vector |
[in] | upDir | The up direction vector |
Definition at line 908 of file ImathMatrixAlgo.h.
bool checkForZeroScaleInRow | ( | const T & | scl, |
const Vec3< T > & | row, | ||
bool | exc = true |
||
) |
Return true if the given scale can be removed from the given row matrix, false if scl
is small enough that the operation would overflow. If exc
is true, throw an exception on overflow.
Definition at line 828 of file ImathMatrixAlgo.h.
bool checkForZeroScaleInRow | ( | const T & | scl, |
const Vec2< T > & | row, | ||
bool | exc = true |
||
) |
Return true if the given scale can be removed from the given row matrix, false if scl
is small enough that the operation would overflow. If exc
is true, throw an exception on overflow.
Matrix44< T > computeLocalFrame | ( | const Vec3< T > & | p, |
const Vec3< T > & | xDir, | ||
const Vec3< T > & | normal | ||
) |
Compute an orthonormal direct 4x4 frame from a position, an x axis direction and a normal to the y axis. If the x axis and normal are perpendicular, then the normal will have the same direction as the z axis.
[in] | p | The position of the frame |
[in] | xDir | The x axis direction of the frame |
[in] | normal | A normal to the y axis of the frame |
Definition at line 985 of file ImathMatrixAlgo.h.
Matrix44< T > computeRSMatrix | ( | bool | keepRotateA, |
bool | keepScaleA, | ||
const Matrix44< T > & | A, | ||
const Matrix44< T > & | B | ||
) |
Compute 4x4 translate/rotate/scale matrix from A
with the rotate/scale of B
.
[in] | keepRotateA | If true, keep rotate from matrix A , use B otherwise |
[in] | keepScaleA | If true, keep scale from matrix A , use B otherwise |
[in] | A | Matrix A |
[in] | B | Matrix B |
A
with tweaked rotation/scale Definition at line 1060 of file ImathMatrixAlgo.h.
bool extractAndRemoveScalingAndShear | ( | Matrix44< T > & | mat, |
Vec3< T > & | scl, | ||
Vec3< T > & | shr, | ||
bool | exc = true |
||
) |
Remove scaling and shear from the given 4x4 matrix in place, returning the extracted values.
[in,out] | mat | The matrix to operate on |
[out] | scl | The extracted scale |
[out] | shr | The extracted shear |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 523 of file ImathMatrixAlgo.h.
bool extractAndRemoveScalingAndShear | ( | Matrix33< T > & | mat, |
Vec2< T > & | scl, | ||
T & | shr, | ||
bool | exc = true |
||
) |
Remove scaling and shear from the given 3x3 matrix in place, returning the extracted values.
[in,out] | mat | The matrix to operate on |
[out] | scl | The extracted scale |
[out] | shr | The extracted shear |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 1182 of file ImathMatrixAlgo.h.
Extract the rotation from the given 2x2 matrix
[in] | mat | The input matrix |
[out] | rot | The extracted rotation value |
Definition at line 1269 of file ImathMatrixAlgo.h.
Extract the rotation from the given 3x3 matrix
[in] | mat | The input matrix |
[out] | rot | The extracted rotation value |
Definition at line 1290 of file ImathMatrixAlgo.h.
Extract the rotation from the given 4x4 matrix in the form of XYZ euler angles.
[in] | mat | The input matrix |
[out] | rot | The extracted XYZ euler angle vector |
Definition at line 636 of file ImathMatrixAlgo.h.
Extract the rotation from the given 4x4 matrix in the form of ZYX euler angles.
[in] | mat | The input matrix |
[out] | rot | The extracted ZYX euler angle vector |
Definition at line 679 of file ImathMatrixAlgo.h.
Extract the rotation from the given 4x4 matrix in the form of a quaternion.
[in] | mat | The input matrix |
Definition at line 722 of file ImathMatrixAlgo.h.
bool extractScaling | ( | const Matrix44< T > & | mat, |
Vec3< T > & | scl, | ||
bool | exc = true |
||
) |
Extract the scaling component of the given 4x4 matrix.
[in] | mat | The input matrix |
[out] | scl | The extracted scale, i.e. the output value |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 419 of file ImathMatrixAlgo.h.
bool extractScaling | ( | const Matrix33< T > & | mat, |
Vec2< T > & | scl, | ||
bool | exc = true |
||
) |
Extract the scaling component of the given 3x3 matrix.
[in] | mat | The input matrix |
[out] | scl | The extracted scale, i.e. the output value |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 1089 of file ImathMatrixAlgo.h.
bool extractScalingAndShear | ( | const Matrix44< T > & | mat, |
Vec3< T > & | scl, | ||
Vec3< T > & | shr, | ||
bool | exc = true |
||
) |
Extract the scaling and shear components of the given 4x4 matrix. Return true if the scale could be successfully extracted, false if the matrix is degenerate.
[in] | mat | The input matrix |
[out] | scl | The extracted scale |
[out] | shr | The extracted shear |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 473 of file ImathMatrixAlgo.h.
bool extractScalingAndShear | ( | const Matrix33< T > & | mat, |
Vec2< T > & | scl, | ||
T & | shr, | ||
bool | exc = true |
||
) |
Extract the scaling and shear components of the given 3x3 matrix. Return true if the scale could be successfully extracted, false if the matrix is degenerate.
[in] | mat | The input matrix |
[out] | scl | The extracted scale |
[out] | shr | The extracted shear |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 1143 of file ImathMatrixAlgo.h.
bool extractSHRT | ( | const Matrix44< T > & | mat, |
Vec3< T > & | s, | ||
Vec3< T > & | h, | ||
Vec3< T > & | r, | ||
Vec3< T > & | t, | ||
bool | exc, | ||
typename Euler< T >::Order | rOrder | ||
) |
Extract the scaling, shear, rotation, and translation components of the given 4x4 matrix. The values are such that:
M = S * H * R * T
[in] | mat | The input matrix |
[out] | s | The extracted scale |
[out] | h | The extracted shear |
[out] | r | The extracted rotation |
[out] | t | The extracted translation |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
[in] | rOrder | The order with which to extract the rotation |
Definition at line 777 of file ImathMatrixAlgo.h.
bool extractSHRT | ( | const Matrix44< T > & | mat, |
Vec3< T > & | s, | ||
Vec3< T > & | h, | ||
Vec3< T > & | r, | ||
Vec3< T > & | t, | ||
bool | exc = true |
||
) |
Extract the scaling, shear, rotation, and translation components of the given 4x4 matrix.
[in] | mat | The input matrix |
[out] | s | The extracted scale |
[out] | h | The extracted shear |
[out] | r | The extracted rotation, in XYZ euler angles |
[out] | t | The extracted translation |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 809 of file ImathMatrixAlgo.h.
bool extractSHRT | ( | const Matrix44< T > & | mat, |
Vec3< T > & | s, | ||
Vec3< T > & | h, | ||
Euler< T > & | r, | ||
Vec3< T > & | t, | ||
bool | exc = true |
||
) |
Extract the scaling, shear, rotation, and translation components of the given 4x4 matrix.
[in] | mat | The input matrix |
[out] | s | The extracted scale |
[out] | h | The extracted shear |
[out] | r | The extracted rotation, in Euler angles |
[out] | t | The extracted translation |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 816 of file ImathMatrixAlgo.h.
bool extractSHRT | ( | const Matrix33< T > & | mat, |
Vec2< T > & | s, | ||
T & | h, | ||
T & | r, | ||
Vec2< T > & | t, | ||
bool | exc = true |
||
) |
Extract the scaling, shear, rotation, and translation components of the given 3x3 matrix. The values are such that:
M = S * H * R * T
[in] | mat | The input matrix |
[out] | s | The extracted scale |
[out] | h | The extracted shear |
[out] | r | The extracted rotation |
[out] | t | The extracted translation |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 1311 of file ImathMatrixAlgo.h.
void jacobiEigenSolver | ( | Matrix33< T > & | A, |
Vec3< T > & | S, | ||
Matrix33< T > & | V, | ||
const T | tol | ||
) |
Compute the eigenvalues (S) and the eigenvectors (V) of a real symmetric matrix using Jacobi transformation, using a given tolerance tol
.
Jacobi transformation of a 3x3/4x4 matrix A outputs S and V: A = V * S * V^T where V is orthonormal and S is the diagonal matrix of eigenvalues. Input matrix A must be symmetric. A is also modified during the computation so that upper diagonal entries of A become zero.
|
inline |
Compute the eigenvalues (S) and the eigenvectors (V) of a real symmetric matrix using Jacobi transformation.
Jacobi transformation of a 3x3/4x4 matrix A outputs S and V: A = V * S * V^T where V is orthonormal and S is the diagonal matrix of eigenvalues. Input matrix A must be symmetric. A is also modified during the computation so that upper diagonal entries of A become zero.
Definition at line 1474 of file ImathMatrixAlgo.h.
void jacobiEigenSolver | ( | Matrix44< T > & | A, |
Vec4< T > & | S, | ||
Matrix44< T > & | V, | ||
const T | tol | ||
) |
Compute the eigenvalues (S) and the eigenvectors (V) of a real symmetric matrix using Jacobi transformation, using a given tolerance tol
.
Jacobi transformation of a 3x3/4x4 matrix A outputs S and V: A = V * S * V^T where V is orthonormal and S is the diagonal matrix of eigenvalues. Input matrix A must be symmetric. A is also modified during the computation so that upper diagonal entries of A become zero.
|
inline |
Compute the eigenvalues (S) and the eigenvectors (V) of a real symmetric matrix using Jacobi transformation.
Jacobi transformation of a 3x3/4x4 matrix A outputs S and V: A = V * S * V^T where V is orthonormal and S is the diagonal matrix of eigenvalues. Input matrix A must be symmetric. A is also modified during the computation so that upper diagonal entries of A become zero.
Definition at line 1501 of file ImathMatrixAlgo.h.
void jacobiSVD | ( | const Matrix33< T > & | A, |
Matrix33< T > & | U, | ||
Vec3< T > & | S, | ||
Matrix33< T > & | V, | ||
const T | tol = std::numeric_limits< T >::epsilon() , |
||
const bool | forcePositiveDeterminant = false |
||
) |
Compute the SVD of a 3x3 matrix using Jacobi transformations. This method should be quite accurate (competitive with LAPACK) even for poorly conditioned matrices, and because it has been written specifically for the 3x3/4x4 case it is much faster than calling out to LAPACK.
The SVD of a 3x3/4x4 matrix A is defined as follows: A = U * S * V^T where S is the diagonal matrix of singular values and both U and V are orthonormal. By convention, the entries S are all positive and sorted from the largest to the smallest. However, some uses of this function may require that the matrix U*V^T have positive determinant; in this case, we may make the smallest singular value negative to ensure that this is satisfied.
Currently only available for single- and double-precision matrices.
void jacobiSVD | ( | const Matrix44< T > & | A, |
Matrix44< T > & | U, | ||
Vec4< T > & | S, | ||
Matrix44< T > & | V, | ||
const T | tol = std::numeric_limits< T >::epsilon() , |
||
const bool | forcePositiveDeterminant = false |
||
) |
Compute the SVD of a 3x3 matrix using Jacobi transformations. This method should be quite accurate (competitive with LAPACK) even for poorly conditioned matrices, and because it has been written specifically for the 3x3/4x4 case it is much faster than calling out to LAPACK.
The SVD of a 3x3/4x4 matrix A is defined as follows: A = U * S * V^T where S is the diagonal matrix of singular values and both U and V are orthonormal. By convention, the entries S are all positive and sorted from the largest to the smallest. However, some uses of this function may require that the matrix U*V^T have positive determinant; in this case, we may make the smallest singular value negative to ensure that this is satisfied.
Currently only available for single- and double-precision matrices.
void maxEigenVector | ( | TM & | A, |
TV & | S | ||
) |
Compute a eigenvector corresponding to the abs max eigenvalue of a real symmetric matrix using Jacobi transformation.
void minEigenVector | ( | TM & | A, |
TV & | S | ||
) |
Compute a eigenvector corresponding to the abs min eigenvalue of a real symmetric matrix using Jacobi transformation.
Return the 4x4 outer product two 4-vectors.
Definition at line 847 of file ImathMatrixAlgo.h.
Return the 3xe outer product two 3-vectors.
Definition at line 1349 of file ImathMatrixAlgo.h.
M44d procrustesRotationAndTranslation | ( | const Vec3< T > * | A, |
const Vec3< T > * | B, | ||
const T * | weights, | ||
const size_t | numPoints, | ||
const bool | doScaling = false |
||
) |
Computes the translation and rotation that brings the 'from' points as close as possible to the 'to' points under the Frobenius norm. To be more specific, let x be the matrix of 'from' points and y be the matrix of 'to' points, we want to find the matrix A of the form [ R t ] [ 0 1 ] that minimizes || (A*x - y)^T * W * (A*x - y) ||_F If doScaling is true, then a uniform scale is allowed also.
A | From points |
B | To points |
weights | Per-point weights |
numPoints | The number of points in A , B , and weights (must be equal) |
doScaling | If true, include a scaling transformation |
M44d procrustesRotationAndTranslation | ( | const Vec3< T > * | A, |
const Vec3< T > * | B, | ||
const size_t | numPoints, | ||
const bool | doScaling = false |
||
) |
Computes the translation and rotation that brings the 'from' points as close as possible to the 'to' points under the Frobenius norm. To be more specific, let x be the matrix of 'from' points and y be the matrix of 'to' points, we want to find the matrix A of the form [ R t ] [ 0 1 ] that minimizes || (A*x - y)^T * W * (A*x - y) ||_F If doScaling is true, then a uniform scale is allowed also.
A | From points |
B | To points |
numPoints | The number of points in A and B (must be equal) |
doScaling | If true, include a scaling transformation |
bool removeScaling | ( | Matrix44< T > & | mat, |
bool | exc = true |
||
) |
Remove scaling from the given 4x4 matrix in place. Return true if the scale could be successfully extracted, false if the matrix is degenerate.
[in] | mat | The matrix to operate on |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 453 of file ImathMatrixAlgo.h.
bool removeScaling | ( | Matrix33< T > & | mat, |
bool | exc = true |
||
) |
Remove scaling from the given 3x3 matrix in place. Return true if the scale could be successfully extracted, false if the matrix is degenerate.
[in] | mat | The matrix to operate on |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 1123 of file ImathMatrixAlgo.h.
bool removeScalingAndShear | ( | Matrix44< T > & | mat, |
bool | exc = true |
||
) |
Remove scaling and shear from the given 4x4 matrix in place.
[in,out] | mat | The matrix to operate on |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 510 of file ImathMatrixAlgo.h.
bool removeScalingAndShear | ( | Matrix33< T > & | mat, |
bool | exc = true |
||
) |
Remove scaling and shear from the given 3x3e matrix in place.
[in,out] | mat | The matrix to operate on |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 1169 of file ImathMatrixAlgo.h.
Matrix44< T > rotationMatrix | ( | const Vec3< T > & | fromDirection, |
const Vec3< T > & | toDirection | ||
) |
Return a 4x4 matrix that rotates the vector fromDirection
to toDirection
Definition at line 869 of file ImathMatrixAlgo.h.
Matrix44< T > rotationMatrixWithUpDir | ( | const Vec3< T > & | fromDir, |
const Vec3< T > & | toDir, | ||
const Vec3< T > & | upDir | ||
) |
Return a 4x4 matrix that rotates the fromDir
vector so that it points towards `toDir1. You may also specify that you want the up vector to be pointing in a certain direction 1upDir`.
Definition at line 878 of file ImathMatrixAlgo.h.
Return the given 4x4 matrix with scaling removed.
[in] | mat | The input matrix |
[in] | exc | If true, throw an exception if the scaling in mat |
Definition at line 432 of file ImathMatrixAlgo.h.
Return the given 3x3 matrix with scaling removed.
[in] | mat | The input matrix |
[in] | exc | If true, throw an exception if the scaling in mat |
Definition at line 1102 of file ImathMatrixAlgo.h.
Return the given 4x4 matrix with scaling and shear removed.
[in] | mat | The input matrix |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 485 of file ImathMatrixAlgo.h.
void sansScalingAndShear | ( | Matrix44< T > & | result, |
const Matrix44< T > & | mat, | ||
bool | exc = true |
||
) |
Extract scaling and shear from the given 4x4 matrix in-place.
[in,out] | result | The output matrix |
[in] | mat | The return value if result is degenerate |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 499 of file ImathMatrixAlgo.h.
Return the given 3x3 matrix with scaling and shear removed.
[in] | mat | The input matrix |
[in] | exc | If true, throw an exception if the scaling in mat is very close to zero. |
Definition at line 1155 of file ImathMatrixAlgo.h.
IMATH_EXPORT_CONST M22d identity22d |
M22d identity matrix.
Definition at line 37 of file ImathMatrixAlgo.h.
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_EXPORT_CONST M22f identity22f |
M22f identity matrix.
Definition at line 31 of file ImathMatrixAlgo.h.
IMATH_EXPORT_CONST M33d identity33d |
M33d identity matrix.
Definition at line 39 of file ImathMatrixAlgo.h.
IMATH_EXPORT_CONST M33f identity33f |
M33f identity matrix.
Definition at line 33 of file ImathMatrixAlgo.h.
IMATH_EXPORT_CONST M44d identity44d |
M44d identity matrix.
Definition at line 41 of file ImathMatrixAlgo.h.
IMATH_EXPORT_CONST M44f identity44f |
M44f identity matrix.
Definition at line 35 of file ImathMatrixAlgo.h.