|
SYS_FORCE_INLINE | UT_Matrix4T ()=default |
| Construct uninitialized matrix. More...
|
|
constexpr | UT_Matrix4T (const UT_Matrix4T &)=default |
| Default copy constructor. More...
|
|
constexpr | UT_Matrix4T (UT_Matrix4T &&)=default |
| Default move constructor. More...
|
|
constexpr | UT_Matrix4T (fpreal64 val) noexcept |
| Construct identity matrix, multipled by scalar. More...
|
|
UT_Matrix4T< T > & | operator= (UT_Matrix4T< T > &&m)=default |
| Default move assignment operator. More...
|
|
template<typename S > |
UT_Matrix4T< T > & | operator= (const UT_Matrix4T< S > &m) |
|
template<typename S > |
UT_Matrix4T< T > & | operator= (const UT_SymMatrix4T< S > &m) |
| Conversion from a symmetric to a non symmetric matrix. More...
|
|
UT_Matrix4T< T > | operator- () const |
|
SYS_FORCE_INLINE UT_Matrix4T< T > & | operator+= (const UT_Matrix4T< T > &m) |
|
SYS_FORCE_INLINE UT_Matrix4T< T > & | operator-= (const UT_Matrix4T< T > &m) |
|
template<typename S > |
UT_Matrix4T< T > & | operator*= (const UT_Matrix4T< S > &m) |
|
template<typename S > |
UT_Matrix4T< T > & | operator*= (const UT_Matrix3T< S > &m) |
|
bool | operator== (const UT_Matrix4T< T > &m) const |
|
bool | operator!= (const UT_Matrix4T< T > &m) const |
|
UT_Matrix4T< T > & | operator= (fpreal64 v) |
|
SYS_FORCE_INLINE UT_Matrix4T< T > & | operator*= (T scalar) |
|
SYS_FORCE_INLINE UT_Matrix4T< T > & | operator/= (T scalar) |
|
template<typename S > |
UT_Matrix4T< T > & | operator= (const UT_Vector4T< S > &vec) |
|
template<typename S > |
UT_Matrix4T< T > & | operator+= (const UT_Vector4T< S > &vec) |
|
template<typename S > |
UT_Matrix4T< T > & | operator-= (const UT_Vector4T< S > &vec) |
|
SYS_FORCE_INLINE T | coFactor (int k, int l) const |
|
T | determinant () const |
|
T | determinant3 () const |
| Compute determinant of the upper-left 3x3 sub-matrix. More...
|
|
T | trace () const |
|
int | invertKramer () |
|
int | invertKramer (UT_Matrix4T< T > &m) const |
|
template<typename S > |
int | solve (const UT_Vector4T< S > &b, UT_Vector4T< S > &x) const |
|
template<typename S > |
int | solveTranspose (const UT_Vector4T< S > &b, UT_Vector4T< S > &x) const |
|
template<typename S > |
void | instanceT (const UT_Vector3T< S > &p, const UT_Vector3T< S > &v, T s, const UT_Vector3T< S > *s3, const UT_Vector3T< S > *up, const UT_QuaternionT< S > *q, const UT_Vector3T< S > *tr, const UT_QuaternionT< S > *orient, const UT_Vector3T< S > *pivot) |
|
void | instance (const UT_Vector3F &p, const UT_Vector3F &v, T s, const UT_Vector3F *s3, const UT_Vector3F *up, const UT_QuaternionF *q, const UT_Vector3F *tr, const UT_QuaternionF *orient, const UT_Vector3F *pivot=NULL) |
|
void | instance (const UT_Vector3D &p, const UT_Vector3D &v, T s, const UT_Vector3D *s3, const UT_Vector3D *up, const UT_QuaternionD *q, const UT_Vector3D *tr, const UT_QuaternionD *orient, const UT_Vector3D *pivot=NULL) |
|
template<typename S > |
void | instanceInverseT (const UT_Vector3T< S > &p, const UT_Vector3T< S > &v, T s, const UT_Vector3T< S > *s3, const UT_Vector3T< S > *up, const UT_QuaternionT< S > *q, const UT_Vector3T< S > *tr, const UT_QuaternionT< S > *orient, const UT_Vector3T< S > *pivot) |
|
void | instanceInverse (const UT_Vector3F &p, const UT_Vector3F &v, T s, const UT_Vector3F *s3, const UT_Vector3F *up, const UT_QuaternionF *q, const UT_Vector3F *tr, const UT_QuaternionF *orient, const UT_Vector3F *pivot=NULL) |
|
void | instanceInverse (const UT_Vector3D &p, const UT_Vector3D &v, T s, const UT_Vector3D *s3, const UT_Vector3D *up, const UT_QuaternionD *q, const UT_Vector3D *tr, const UT_QuaternionD *orient, const UT_Vector3D *pivot=NULL) |
|
void | transpose () |
|
bool | isEqual (const UT_Matrix4T< T > &m, T tolerance=T(SYS_FTOLERANCE)) const |
|
template<UT_Axis3::axis A, bool reverse = false> |
SYS_FORCE_INLINE void | rotateQuarter () |
|
template<UT_Axis3::axis A> |
SYS_FORCE_INLINE void | rotateHalf () |
|
template<UT_Axis3::axis A> |
SYS_FORCE_INLINE void | rotateWithQTurns (T theta, uint qturns) |
|
template<UT_Axis3::axis A, bool reverse = false> |
SYS_FORCE_INLINE void | prerotateQuarter () |
|
template<UT_Axis3::axis A> |
SYS_FORCE_INLINE void | prerotateHalf () |
|
template<typename S > |
void | changeSpace (UT_Vector3T< S > &iSrc, UT_Vector3T< S > &jSrc, UT_Vector3T< S > &iDest, UT_Vector3T< S > &jDest, int norm=1) |
|
void | xform (const UT_XformOrder &order, T tx=0.0f, T ty=0.0f, T tz=0.0f, T rx=0.0f, T ry=0.0f, T rz=0.0f, T sx=1.0f, T sy=1.0f, T sz=1.0f, T px=0.0f, T py=0.0f, T pz=0.0f, int reverse=0) |
|
void | xform (const UT_XformOrder &order, T tx, T ty, T tz, T rx, T ry, T rz, T sx, T sy, T sz, T s_xy, T s_xz, T s_yz, T px, T py, T pz, int reverse=0) |
|
void | xform (const UT_XformOrder &order, T tx, T ty, T tz, T rx, T ry, T rz, T sx, T sy, T sz, const PivotSpace &pivot, int reverse=0) |
|
void | xform (const UT_XformOrder &order, T tx, T ty, T tz, T rx, T ry, T rz, T sx, T sy, T sz, T s_xy, T s_xz, T s_yz, const PivotSpace &pivot, int reverse=0) |
|
void | xform (const FullTransformModel &parms, T min_abs_scale=T(0)) |
|
void | xform (const UT_XformOrder &order, applyType type, char limit, T tx, T ty, T tz, T rx, T ry, T rz, T sx, T sy, T sz, T px, T py, T pz) |
|
void | rotate (const UT_XformOrder &order, applyType type, char limit, T rx, T ry, T rz) |
|
template<typename S > |
void | getTranslates (UT_Vector3T< S > &translates) const |
|
template<typename S > |
void | setTranslates (const UT_Vector3T< S > &translates) |
|
template<typename S > |
int | explodeT (const UT_XformOrder &order, UT_Vector3T< S > &r, UT_Vector3T< S > &s, UT_Vector3T< S > &t, UT_Vector3T< S > *shears) const |
|
int | explode (const UT_XformOrder &order, UT_Vector3F &r, UT_Vector3F &s, UT_Vector3F &t, UT_Vector3F *shears=0) const |
|
int | explode (const UT_XformOrder &order, UT_Vector3D &r, UT_Vector3D &s, UT_Vector3D &t, UT_Vector3D *shears=0) const |
|
template<typename S > |
int | explodeT (const UT_XformOrder &order, UT_Vector3T< S > &r, UT_Vector3T< S > &s, UT_Vector3T< S > &t, const UT_Vector3T< S > &p, UT_Vector3T< S > *shears) const |
|
int | explode (const UT_XformOrder &order, UT_Vector3F &r, UT_Vector3F &s, UT_Vector3F &t, const UT_Vector3F &p, UT_Vector3F *shears=0) const |
|
int | explode (const UT_XformOrder &order, UT_Vector3D &r, UT_Vector3D &s, UT_Vector3D &t, const UT_Vector3D &p, UT_Vector3D *shears=0) const |
|
template<typename S > |
int | explodeT (const UT_XformOrder &order, UT_Vector3T< S > &r, UT_Vector3T< S > &s, UT_Vector3T< S > &t, const PivotSpaceT< S > &p, UT_Vector3T< S > *shears) const |
|
int | explode (const UT_XformOrder &order, UT_Vector3F &r, UT_Vector3F &s, UT_Vector3F &t, const PivotSpaceT< fpreal32 > &p, UT_Vector3F *shears=0) const |
|
int | explode (const UT_XformOrder &order, UT_Vector3D &r, UT_Vector3D &s, UT_Vector3D &t, const PivotSpaceT< fpreal64 > &p, UT_Vector3D *shears=0) const |
|
template<typename S > |
int | explode2D (const UT_XformOrder &order, S &r, UT_Vector2T< S > &s, UT_Vector2T< S > &t, S *shears=0) const |
|
template<typename S > |
int | explode2D (const UT_XformOrder &order, S &r, UT_Vector2T< S > &s, UT_Vector2T< S > &t, const UT_Vector2T< S > &p, S *shears=0) const |
|
template<typename S > |
void | extractRotate (UT_Matrix3T< S > &dst) const |
|
bool | polarDecompose (UT_Matrix3T< T > *stretch=nullptr, bool reverse=true, const int max_iter=64, const T rel_tol=FLT_EPSILON) |
|
bool | makeRigidMatrix (UT_Matrix3T< T > *stretch=nullptr, bool reverse=true, const int max_iter=64, const T rel_tol=FLT_EPSILON) |
|
template<typename S > |
void | stretch (UT_Vector3T< S > &v, T amount, int norm=1) |
|
T | dot (unsigned i, unsigned j) const |
|
template<typename S > |
void | outerproductUpdate (T b, const UT_Vector4T< S > &v1, const UT_Vector4T< S > &v2) |
|
void | lerp (const UT_Matrix4T< T > &a, const UT_Matrix4T< T > &b, T t) |
|
void | identity () |
| Set the matrix to identity. More...
|
|
void | zero () |
| Set the matrix to zero. More...
|
|
int | isIdentity () const |
|
int | isZero () const |
|
unsigned | hash () const |
| Compute a hash. More...
|
|
T | dot (const UT_Matrix4T< T > &m) const |
|
T | getEuclideanNorm () const |
|
T | getEuclideanNorm2 () const |
| Euclidean norm squared. More...
|
|
T | getNorm1 () const |
|
T | getNormInf () const |
|
T | getNormMax () const |
|
T | getInfinityNorm () const |
| L-Infinity Norm, but using col vector convention. More...
|
|
UT_Matrix4T< T > & | exp (int q) |
| Compute the exponential of A using Pade approximants with scaling and squaring by q. More...
|
|
UT_Matrix4T< T > & | log (T tolerance=T(SYS_FTOLERANCE), int max_iterations=10) |
| Compute the log of A using Taylor approximation. More...
|
|
UT_Matrix4T< T > & | sqrt (T tolerance=T(SYS_FTOLERANCE), int max_iterations=10) |
| Compute the square root of A. More...
|
|
int | save (std::ostream &os, int binary) const |
|
bool | load (UT_IStream &is) |
|
void | dump (const char *msg="") const |
|
void | outAsciiNoName (std::ostream &os) const |
|
void | perspective (fpreal zoom, fpreal image_aspect, fpreal pixel_aspect=1, fpreal clip_near=0, fpreal clip_far=1, fpreal window_xmin=0, fpreal window_xmax=1, fpreal window_ymin=0, fpreal window_ymax=1) |
|
void | orthographic (fpreal zoom, fpreal orthowidth, fpreal image_aspect, fpreal pixel_aspect=1, fpreal clip_near=0, fpreal clip_far=1, fpreal window_xmin=0, fpreal window_xmax=1, fpreal window_ymin=0, fpreal window_ymax=1) |
|
template<int ORDER> |
void | rotate (T rx, T ry, T rz) |
|
|
template<typename S > |
UT_Matrix4T< T > & | operator= (const UT_Matrix3T< S > &m) |
|
|
void | leftMult (const UT_Matrix4T< T > &m) |
|
void | preMultiply (const UT_Matrix4T< T > &m) |
|
|
int | invert (T tol=0.0F) |
| Invert this matrix and return 0 if OK, 1 if singular. More...
|
|
int | invertDouble () |
| Invert this matrix and return 0 if OK, 1 if singular. More...
|
|
|
int | invert (UT_Matrix4T< T > &m) const |
|
int | invertDouble (UT_Matrix4T< T > &m) const |
|
|
template<typename S > |
void | rotate (UT_Vector3T< S > &axis, T theta, int norm=1) |
|
void | rotate (UT_Axis3::axis a, T theta) |
|
template<UT_Axis3::axis A> |
void | rotate (T theta) |
|
|
template<typename S > |
void | prerotate (UT_Vector3T< S > &axis, T theta, int norm=1) |
|
void | prerotate (UT_Axis3::axis a, T theta) |
|
template<UT_Axis3::axis A> |
void | prerotate (T theta) |
|
|
void | rotate (T rx, T ry, T rz, const UT_XformOrder &ord) |
|
SYS_FORCE_INLINE void | rotate (const UT_Vector3T< T > &rad, const UT_XformOrder &ord) |
|
|
void | prerotate (T rx, T ry, T rz, const UT_XformOrder &ord) |
|
SYS_FORCE_INLINE void | prerotate (const UT_Vector3T< T > &rad, const UT_XformOrder &ord) |
|
|
void | scale (T sx, T sy, T sz, T sw=1.0f) |
|
SYS_FORCE_INLINE void | scale (const UT_Vector3T< T > &s) |
|
SYS_FORCE_INLINE void | scale (T s) |
|
|
void | prescale (T sx, T sy, T sz, T sw=1.0f) |
|
SYS_FORCE_INLINE void | prescale (const UT_Vector3T< T > &s) |
|
SYS_FORCE_INLINE void | prescale (T s) |
|
|
void | shear (T s_xy, T s_xz, T s_yz) |
|
SYS_FORCE_INLINE void | shear (const UT_Vector3T< T > &sh) |
|
|
void | translate (T dx, T dy, T dz=0.0f) |
|
SYS_FORCE_INLINE void | translate (const UT_Vector3T< T > &delta) |
|
|
void | pretranslate (T dx, T dy, T dz=0.0f) |
|
SYS_FORCE_INLINE void | pretranslate (const UT_Vector3T< T > &delta) |
|
|
const T * | data () const |
| Return the raw matrix data. More...
|
|
T * | data () |
| Return the raw matrix data. More...
|
|
|
SYS_FORCE_INLINE T & | operator() (unsigned row, unsigned col) |
| Return a matrix entry. No bounds checking on subscripts. More...
|
|
SYS_FORCE_INLINE T | operator() (unsigned row, unsigned col) const |
| Return a matrix entry. No bounds checking on subscripts. More...
|
|
|
SYS_FORCE_INLINE T * | operator() (unsigned row) |
| Return a matrix row. No bounds checking on subscript. More...
|
|
SYS_FORCE_INLINE const T * | operator() (unsigned row) const |
| Return a matrix row. No bounds checking on subscript. More...
|
|
const UT_Vector4T< T > & | operator[] (unsigned row) const |
| Return a matrix row. No bounds checking on subscript. More...
|
|
UT_Vector4T< T > & | operator[] (unsigned row) |
| Return a matrix row. No bounds checking on subscript. More...
|
|
|
bool | save (UT_JSONWriter &w) const |
|
bool | save (UT_JSONValue &v) const |
|
bool | load (UT_JSONParser &p) |
|
template<typename T>
class UT_Matrix4T< T >
This class implements a 4x4 fpreal matrix in row-major order.
Most of Houdini operates with row vectors that are left-multiplied with matrices. e.g., z = v * M As a result, translation data is in row 3 of the matrix, rather than column 3.
Definition at line 96 of file UT_Matrix4.h.