UT_Matrix4T< T > Class Template Reference

#include <UT_Matrix4.h>

List of all members.

Public Types

enum  applyType {
  BEFORE = 1, EQUAL = 2, AFTER = 4, BEFORE_EQUAL = 4,
  AFTER_EQUAL = 6
}

Public Member Functions

 UT_Matrix4T ()
 Construct uninitialized matrix.
 UT_Matrix4T (fpreal64 val)
 Construct identity matrix, multipled by scalar.
 UT_Matrix4T (T val00, T val01, T val02, T val03, T val10, T val11, T val12, T val13, T val20, T val21, T val22, T val23, T val30, T val31, T val32, T val33)
template<typename S >
 UT_Matrix4T (const UT_Matrix4T< S > &m)
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.
UT_Matrix4T< T > operator- () const
UT_Matrix4T< T > & operator+= (const UT_Matrix4T< T > &m)
UT_Matrix4T< T > & operator-= (const UT_Matrix4T< T > &m)
UT_Matrix4T< T > & operator*= (const UT_Matrix4T< T > &m)
unsigned operator== (const UT_Matrix4T< T > &m) const
unsigned operator!= (const UT_Matrix4T< T > &m) const
UT_Matrix4T< T > & operator= (fpreal64 v)
UT_Matrix4T< T > & operator*= (T scalar)
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)
void leftMult (const UT_Matrix4T< T > &m)
void preMultiply (const UT_Matrix4T< T > &m)
coFactor (int k, int l) const
determinant () const
determinant3 () const
 Compute determinant of the upper-left 3x3 sub-matrix.
trace () const
int invertKramer (void)
int invertKramer (UT_Matrix4T< T > &m) 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)
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)
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)
void transpose (void)
UT_Matrix4T< T > transpose (void) const
unsigned isEqual (const UT_Matrix4T< T > &m, T tolerance=UT_FTOLERANCE) const
template<typename S >
void rotate (UT_Vector3T< S > &axis, T theta, int norm=1)
template<typename S >
UT_Matrix4T< T > rotate (UT_Vector3T< S > &axis, T theta, int norm=1) const
void rotate (UT_Axis3::axis a, T theta)
UT_Matrix4T< T > rotate (UT_Axis3::axis a, T theta) const
template<typename S >
void prerotate (UT_Vector3T< S > &axis, T theta, int norm=1)
template<typename S >
UT_Matrix4T< T > prerotate (UT_Vector3T< S > &axis, T theta, int norm=1) const
void prerotate (UT_Axis3::axis a, T theta)
UT_Matrix4T< T > prerotate (UT_Axis3::axis a, T theta) const
void rotate (T rx, T ry, T rz, const UT_XformOrder &ord)
UT_Matrix4T< T > rotate (T rx, T ry, T rz, const UT_XformOrder &ord) const
void prerotate (T rx, T ry, T rz, const UT_XformOrder &ord)
UT_Matrix4T< T > prerotate (T rx, T ry, T rz, const UT_XformOrder &ord) const
void scale (T sx, T sy, T sz, T sw=1.0f)
UT_Matrix4T< T > scale (T sx, T sy, T sz, T sw=1.0f) const
void prescale (T sx, T sy, T sz, T sw=1.0f)
UT_Matrix4T< T > prescale (T sx, T sy, T sz, T sw=1.0f) const
void shear (T s_xy, T s_xz, T s_yz)
void translate (T dx, T dy, T dz=0.0f)
UT_Matrix4T< T > translate (T dx, T dy, T dz=0.0f) const
void pretranslate (T dx, T dy, T dz=0.0f)
UT_Matrix4T< T > pretranslate (T dx, T dy, T dz=0.0f) const
template<typename S >
void changeSpace (UT_Vector3T< S > &iSrc, UT_Vector3T< S > &jSrc, UT_Vector3T< S > &iDest, UT_Vector3T< S > &jDest, int norm=1)
template<typename S >
UT_Matrix4T< T > changeSpace (UT_Vector3T< S > &iSrc, UT_Vector3T< S > &jSrc, UT_Vector3T< S > &iDest, UT_Vector3T< S > &jDest, int norm=1) const
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)
UT_Matrix4T< T > 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) const
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, 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 explode2D (const UT_XformOrder &order, T &r, UT_Vector2T< S > &s, UT_Vector2T< S > &t, T *shears=0) const
template<typename S >
int explode2D (const UT_XformOrder &order, T &r, UT_Vector2T< S > &s, UT_Vector2T< S > &t, const UT_Vector2T< S > &p, T *shears=0) const
template<typename S >
void extractRotate (UT_Matrix3T< S > &dst) const
template<typename S >
void stretch (UT_Vector3T< S > &v, T amount, int norm=1)
template<typename S >
UT_Matrix4T< T > stretch (UT_Vector3T< S > &v, T amount, int norm=1) const
dot (unsigned i, unsigned j) const
template<typename S >
void outerproductUpdate (T b, const UT_Vector4T< S > &v1, const UT_Vector4T< S > &v2)
void identity ()
 Set the matrix to identity.
void zero ()
 Set the matrix to zero.
int isIdentity () const
unsigned hash () const
 Compute a hash.
getEuclideanNorm () const
getEuclideanNorm2 () const
 Euclidean norm squared.
int save (ostream &os, int binary) const
bool load (UT_IStream &is)
void outAsciiNoName (ostream &os) const
template<typename S >
 UT_Matrix4T (const S m[4][4])
 Construct a deep copy of the input row-major data.
UT_Matrix4T< T > & operator= (const UT_Matrix3T< fpreal32 > &m)
UT_Matrix4T< T > & operator= (const UT_Matrix3T< fpreal64 > &m)
int invert (T tol=0.0F)
 Invert this matrix and return 0 if OK, 1 if singular.
int invertDouble ()
 Invert this matrix and return 0 if OK, 1 if singular.
int invert (UT_Matrix4T< T > &m) const
int invertDouble (UT_Matrix4T< T > &m) const
const T * data (void) const
 Return the raw matrix data.
T * data (void)
 Return the raw matrix data.
T & operator() (unsigned row, unsigned col)
 Return a matrix entry. No bounds checking on subscripts.
operator() (unsigned row, unsigned col) const
 Return a matrix entry. No bounds checking on subscripts.
T * operator() (unsigned row)
 Return a matrix row. No bounds checking on subscript.
const T * operator() (unsigned row) const
 Return a matrix row. No bounds checking on subscript.
UT_Vector4T< T > operator[] (unsigned row) const
 Return a matrix row. No bounds checking on subscript.
bool save (UT_JSONWriter &w) const
bool save (UT_JSONValue &v) const
bool load (UT_JSONParser &p)

Static Public Member Functions

template<typename S >
static UT_Matrix4T< T > rotationMat (UT_Vector3T< S > &axis, T theta, int norm=1)
static UT_Matrix4T< T > rotationMat (UT_Axis3::axis a, T theta)
static const UT_Matrix4T< T > & getIdentityMatrix ()
static int entries ()
 Returns the vector size.

Public Attributes

union {
   T   matx [4][4]
   T   myFloats [16]
}; 

Friends

ostream & operator<< (ostream &os, const UT_Matrix4T< T > &v)


Detailed Description

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.

This convention, combined with row-major order, is directly compatible with OpenGL matrix requirements.

Examples:

SOP/SOP_IKSample.C, and SOP/SOP_IKSample.h.

Definition at line 74 of file UT_Matrix4.h.


Member Enumeration Documentation

template<typename T>
enum UT_Matrix4T::applyType

Enumerator:
BEFORE 
EQUAL 
AFTER 
BEFORE_EQUAL 
AFTER_EQUAL 

Definition at line 579 of file UT_Matrix4.h.


Constructor & Destructor Documentation

template<typename T>
UT_Matrix4T< T >::UT_Matrix4T (  )  [inline]

Construct uninitialized matrix.

Definition at line 78 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T< T >::UT_Matrix4T ( fpreal64  val  )  [inline, explicit]

Construct identity matrix, multipled by scalar.

Definition at line 82 of file UT_Matrix4.h.

template<typename T>
template<typename S >
UT_Matrix4T< T >::UT_Matrix4T ( const S  m[4][4]  )  [inline, explicit]

Construct a deep copy of the input row-major data.

Definition at line 92 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T< T >::UT_Matrix4T ( val00,
val01,
val02,
val03,
val10,
val11,
val12,
val13,
val20,
val21,
val22,
val23,
val30,
val31,
val32,
val33 
) [inline]

This constructor is for convenience; in many situations, it's less efficient than the array-based constructors.

Definition at line 110 of file UT_Matrix4.h.

template<typename T>
template<typename S >
UT_Matrix4T< T >::UT_Matrix4T ( const UT_Matrix4T< S > &  m  )  [inline, explicit]

Definition at line 128 of file UT_Matrix4.h.


Member Function Documentation

template<typename T>
template<typename S >
UT_Matrix4T<T> UT_Matrix4T< T >::changeSpace ( UT_Vector3T< S > &  iSrc,
UT_Vector3T< S > &  jSrc,
UT_Vector3T< S > &  iDest,
UT_Vector3T< S > &  jDest,
int  norm = 1 
) const [inline]

template<typename T>
template<typename S >
void UT_Matrix4T< T >::changeSpace ( UT_Vector3T< S > &  iSrc,
UT_Vector3T< S > &  jSrc,
UT_Vector3T< S > &  iDest,
UT_Vector3T< S > &  jDest,
int  norm = 1 
) [inline]

template<typename T>
T UT_Matrix4T< T >::coFactor ( int  k,
int  l 
) const [inline]

Definition at line 282 of file UT_Matrix4.h.

template<typename T>
T* UT_Matrix4T< T >::data ( void   )  [inline]

Return the raw matrix data.

Definition at line 694 of file UT_Matrix4.h.

template<typename T>
const T* UT_Matrix4T< T >::data ( void   )  const [inline]

Return the raw matrix data.

Definition at line 693 of file UT_Matrix4.h.

template<typename T>
T UT_Matrix4T< T >::determinant (  )  const [inline]

Definition at line 307 of file UT_Matrix4.h.

template<typename T>
T UT_Matrix4T< T >::determinant3 (  )  const [inline]

Compute determinant of the upper-left 3x3 sub-matrix.

Definition at line 315 of file UT_Matrix4.h.

template<typename T>
T UT_Matrix4T< T >::dot ( unsigned  i,
unsigned  j 
) const [inline]

Definition at line 658 of file UT_Matrix4.h.

template<typename T>
static int UT_Matrix4T< T >::entries ( void   )  [inline, static]

Returns the vector size.

Definition at line 763 of file UT_Matrix4.h.

template<typename T>
int UT_Matrix4T< T >::explode ( const UT_XformOrder order,
UT_Vector3D r,
UT_Vector3D s,
UT_Vector3D t,
const UT_Vector3D p,
UT_Vector3D shears = 0 
) const [inline]

Definition at line 627 of file UT_Matrix4.h.

template<typename T>
int UT_Matrix4T< T >::explode ( const UT_XformOrder order,
UT_Vector3F r,
UT_Vector3F s,
UT_Vector3F t,
const UT_Vector3F p,
UT_Vector3F shears = 0 
) const [inline]

Definition at line 622 of file UT_Matrix4.h.

template<typename T>
int UT_Matrix4T< T >::explode ( const UT_XformOrder order,
UT_Vector3D r,
UT_Vector3D s,
UT_Vector3D t,
UT_Vector3D shears = 0 
) const [inline]

Definition at line 611 of file UT_Matrix4.h.

template<typename T>
int UT_Matrix4T< T >::explode ( const UT_XformOrder order,
UT_Vector3F r,
UT_Vector3F s,
UT_Vector3F t,
UT_Vector3F shears = 0 
) const [inline]

Definition at line 607 of file UT_Matrix4.h.

template<typename T>
template<typename S >
int UT_Matrix4T< T >::explode2D ( const UT_XformOrder order,
T &  r,
UT_Vector2T< S > &  s,
UT_Vector2T< S > &  t,
const UT_Vector2T< S > &  p,
T *  shears = 0 
) const [inline]

template<typename T>
template<typename S >
int UT_Matrix4T< T >::explode2D ( const UT_XformOrder order,
T &  r,
UT_Vector2T< S > &  s,
UT_Vector2T< S > &  t,
T *  shears = 0 
) const [inline]

template<typename T>
template<typename S >
int UT_Matrix4T< T >::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 [inline]

template<typename T>
template<typename S >
int UT_Matrix4T< T >::explodeT ( const UT_XformOrder order,
UT_Vector3T< S > &  r,
UT_Vector3T< S > &  s,
UT_Vector3T< S > &  t,
UT_Vector3T< S > *  shears 
) const [inline]

template<typename T>
template<typename S >
void UT_Matrix4T< T >::extractRotate ( UT_Matrix3T< S > &  dst  )  const [inline]

template<typename T>
T UT_Matrix4T< T >::getEuclideanNorm (  )  const [inline]

Euclidean or Frobenius norm of a matrix. Does sqrt(sum(a_ij ^2))

Definition at line 732 of file UT_Matrix4.h.

template<typename T>
T UT_Matrix4T< T >::getEuclideanNorm2 (  )  const

Euclidean norm squared.

template<typename T>
static const UT_Matrix4T<T>& UT_Matrix4T< T >::getIdentityMatrix (  )  [static]

template<typename T >
template<typename S >
void UT_Matrix4T< T >::getTranslates ( UT_Vector3T< S > &  translates  )  const [inline]

Definition at line 835 of file UT_Matrix4.h.

template<typename T>
unsigned UT_Matrix4T< T >::hash (  )  const [inline]

Compute a hash.

Definition at line 698 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::identity (  )  [inline]

Set the matrix to identity.

Definition at line 671 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::instance ( const UT_Vector3D p,
const UT_Vector3D v,
s,
const UT_Vector3D s3,
const UT_Vector3D up,
const UT_QuaternionD q,
const UT_Vector3D tr,
const UT_QuaternionD orient 
) [inline]

Definition at line 368 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::instance ( const UT_Vector3F p,
const UT_Vector3F v,
s,
const UT_Vector3F s3,
const UT_Vector3F up,
const UT_QuaternionF q,
const UT_Vector3F tr,
const UT_QuaternionF orient 
) [inline]

Definition at line 363 of file UT_Matrix4.h.

template<typename T>
template<typename S >
void UT_Matrix4T< T >::instanceT ( const UT_Vector3T< S > &  p,
const UT_Vector3T< S > &  v,
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 
) [inline]

template<typename T>
int UT_Matrix4T< T >::invert ( UT_Matrix4T< T > &  m  )  const

Invert the matrix and return 0 if OK, 1 if singular. Puts the inverted matrix in m, and leaves this matrix unchanged.

template<typename T>
int UT_Matrix4T< T >::invert ( tol = 0.0F  ) 

Invert this matrix and return 0 if OK, 1 if singular.

template<typename T>
int UT_Matrix4T< T >::invertDouble ( UT_Matrix4T< T > &  m  )  const

Invert the matrix and return 0 if OK, 1 if singular. Puts the inverted matrix in m, and leaves this matrix unchanged.

template<typename T>
int UT_Matrix4T< T >::invertDouble (  ) 

Invert this matrix and return 0 if OK, 1 if singular.

template<typename T>
int UT_Matrix4T< T >::invertKramer ( UT_Matrix4T< T > &  m  )  const

template<typename T>
int UT_Matrix4T< T >::invertKramer ( void   ) 

template<typename T>
unsigned UT_Matrix4T< T >::isEqual ( const UT_Matrix4T< T > &  m,
tolerance = UT_FTOLERANCE 
) const [inline]

Definition at line 388 of file UT_Matrix4.h.

template<typename T>
int UT_Matrix4T< T >::isIdentity (  )  const [inline]

Definition at line 675 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::leftMult ( const UT_Matrix4T< T > &  m  ) 

template<typename T>
bool UT_Matrix4T< T >::load ( UT_JSONParser p  ) 

Methods to serialize to a JSON stream. The matrix is stored as an array of 16 reals.

template<typename T>
bool UT_Matrix4T< T >::load ( UT_IStream is  ) 

template<typename T>
unsigned UT_Matrix4T< T >::operator!= ( const UT_Matrix4T< T > &  m  )  const [inline]

Definition at line 231 of file UT_Matrix4.h.

template<typename T>
const T* UT_Matrix4T< T >::operator() ( unsigned  row  )  const [inline]

Return a matrix row. No bounds checking on subscript.

Definition at line 721 of file UT_Matrix4.h.

template<typename T>
T* UT_Matrix4T< T >::operator() ( unsigned  row  )  [inline]

Return a matrix row. No bounds checking on subscript.

Definition at line 716 of file UT_Matrix4.h.

template<typename T>
T UT_Matrix4T< T >::operator() ( unsigned  row,
unsigned  col 
) const [inline]

Return a matrix entry. No bounds checking on subscripts.

Definition at line 707 of file UT_Matrix4.h.

template<typename T>
T& UT_Matrix4T< T >::operator() ( unsigned  row,
unsigned  col 
) [inline]

Return a matrix entry. No bounds checking on subscripts.

Definition at line 702 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator*= ( scalar  )  [inline]

Definition at line 245 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator*= ( const UT_Matrix4T< T > &  m  ) 

template<typename T >
template<typename S >
UT_Matrix4T< T > & UT_Matrix4T< T >::operator+= ( const UT_Vector4T< S > &  vec  )  [inline]

Definition at line 807 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator+= ( const UT_Matrix4T< T > &  m  )  [inline]

Definition at line 181 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::operator- (  )  const [inline]

Definition at line 172 of file UT_Matrix4.h.

template<typename T >
template<typename S >
UT_Matrix4T< T > & UT_Matrix4T< T >::operator-= ( const UT_Vector4T< S > &  vec  )  [inline]

Definition at line 821 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator-= ( const UT_Matrix4T< T > &  m  )  [inline]

Definition at line 196 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator/= ( scalar  )  [inline]

Definition at line 260 of file UT_Matrix4.h.

template<typename T >
template<typename S >
UT_Matrix4T< T > & UT_Matrix4T< T >::operator= ( const UT_Vector4T< S > &  vec  )  [inline]

Definition at line 795 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator= ( fpreal64  v  )  [inline]

Definition at line 237 of file UT_Matrix4.h.

template<typename T>
template<typename S >
UT_Matrix4T<T>& UT_Matrix4T< T >::operator= ( const UT_SymMatrix4T< S > &  m  )  [inline]

Conversion from a symmetric to a non symmetric matrix.

Definition at line 161 of file UT_Matrix4.h.

template<typename T>
template<typename S >
UT_Matrix4T<T>& UT_Matrix4T< T >::operator= ( const UT_Matrix4T< S > &  m  )  [inline]

Definition at line 146 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator= ( const UT_Matrix3T< fpreal64 > &  m  ) 

Conversion operator that expands a 3x3 into a 4x4 matrix by adding a row and column of zeroes, except the diagonal element which is 1.

template<typename T>
UT_Matrix4T<T>& UT_Matrix4T< T >::operator= ( const UT_Matrix3T< fpreal32 > &  m  ) 

Conversion operator that expands a 3x3 into a 4x4 matrix by adding a row and column of zeroes, except the diagonal element which is 1.

template<typename T>
unsigned UT_Matrix4T< T >::operator== ( const UT_Matrix4T< T > &  m  )  const [inline]

Definition at line 215 of file UT_Matrix4.h.

template<typename T >
UT_Vector4T< T > UT_Matrix4T< T >::operator[] ( unsigned  row  )  const [inline]

Return a matrix row. No bounds checking on subscript.

Definition at line 854 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::outAsciiNoName ( ostream &  os  )  const

template<typename T>
template<typename S >
void UT_Matrix4T< T >::outerproductUpdate ( b,
const UT_Vector4T< S > &  v1,
const UT_Vector4T< S > &  v2 
) [inline]

template<typename T>
void UT_Matrix4T< T >::preMultiply ( const UT_Matrix4T< T > &  m  )  [inline]

Definition at line 277 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::prerotate ( rx,
ry,
rz,
const UT_XformOrder ord 
) const

template<typename T>
void UT_Matrix4T< T >::prerotate ( rx,
ry,
rz,
const UT_XformOrder ord 
)

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::prerotate ( UT_Axis3::axis  a,
theta 
) const

template<typename T>
void UT_Matrix4T< T >::prerotate ( UT_Axis3::axis  a,
theta 
)

template<typename T>
template<typename S >
UT_Matrix4T<T> UT_Matrix4T< T >::prerotate ( UT_Vector3T< S > &  axis,
theta,
int  norm = 1 
) const [inline]

template<typename T>
template<typename S >
void UT_Matrix4T< T >::prerotate ( UT_Vector3T< S > &  axis,
theta,
int  norm = 1 
) [inline]

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::prescale ( sx,
sy,
sz,
sw = 1.0f 
) const

template<typename T>
void UT_Matrix4T< T >::prescale ( sx,
sy,
sz,
sw = 1.0f 
) [inline]

Definition at line 466 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::pretranslate ( dx,
dy,
dz = 0.0f 
) const

template<typename T>
void UT_Matrix4T< T >::pretranslate ( dx,
dy,
dz = 0.0f 
) [inline]

Definition at line 514 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::rotate ( const UT_XformOrder order,
applyType  type,
char  limit,
rx,
ry,
rz 
)

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::rotate ( rx,
ry,
rz,
const UT_XformOrder ord 
) const

template<typename T>
void UT_Matrix4T< T >::rotate ( rx,
ry,
rz,
const UT_XformOrder ord 
)

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::rotate ( UT_Axis3::axis  a,
theta 
) const

template<typename T>
void UT_Matrix4T< T >::rotate ( UT_Axis3::axis  a,
theta 
)

template<typename T>
template<typename S >
UT_Matrix4T<T> UT_Matrix4T< T >::rotate ( UT_Vector3T< S > &  axis,
theta,
int  norm = 1 
) const [inline]

template<typename T>
template<typename S >
void UT_Matrix4T< T >::rotate ( UT_Vector3T< S > &  axis,
theta,
int  norm = 1 
) [inline]

template<typename T>
static UT_Matrix4T<T> UT_Matrix4T< T >::rotationMat ( UT_Axis3::axis  a,
theta 
) [static]

template<typename T>
template<typename S >
static UT_Matrix4T<T> UT_Matrix4T< T >::rotationMat ( UT_Vector3T< S > &  axis,
theta,
int  norm = 1 
) [inline, static]

template<typename T>
bool UT_Matrix4T< T >::save ( UT_JSONValue v  )  const

Methods to serialize to a JSON stream. The matrix is stored as an array of 16 reals.

template<typename T>
bool UT_Matrix4T< T >::save ( UT_JSONWriter w  )  const

Methods to serialize to a JSON stream. The matrix is stored as an array of 16 reals.

template<typename T>
int UT_Matrix4T< T >::save ( ostream &  os,
int  binary 
) const

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::scale ( sx,
sy,
sz,
sw = 1.0f 
) const

template<typename T>
void UT_Matrix4T< T >::scale ( sx,
sy,
sz,
sw = 1.0f 
) [inline]

Definition at line 449 of file UT_Matrix4.h.

template<typename T >
template<typename S >
void UT_Matrix4T< T >::setTranslates ( const UT_Vector3T< S > &  translates  )  [inline]

Definition at line 845 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::shear ( s_xy,
s_xz,
s_yz 
) [inline]

Definition at line 483 of file UT_Matrix4.h.

template<typename T>
template<typename S >
UT_Matrix4T<T> UT_Matrix4T< T >::stretch ( UT_Vector3T< S > &  v,
amount,
int  norm = 1 
) const [inline]

template<typename T>
template<typename S >
void UT_Matrix4T< T >::stretch ( UT_Vector3T< S > &  v,
amount,
int  norm = 1 
) [inline]

template<typename T>
T UT_Matrix4T< T >::trace (  )  const [inline]

Definition at line 325 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::translate ( dx,
dy,
dz = 0.0f 
) const

template<typename T>
void UT_Matrix4T< T >::translate ( dx,
dy,
dz = 0.0f 
) [inline]

Definition at line 499 of file UT_Matrix4.h.

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::transpose ( void   )  const

template<typename T>
void UT_Matrix4T< T >::transpose ( void   )  [inline]

Definition at line 375 of file UT_Matrix4.h.

template<typename T>
void UT_Matrix4T< T >::xform ( const UT_XformOrder order,
applyType  type,
char  limit,
tx,
ty,
tz,
rx,
ry,
rz,
sx,
sy,
sz,
px,
py,
pz 
)

template<typename T>
void UT_Matrix4T< T >::xform ( const UT_XformOrder order,
tx,
ty,
tz,
rx,
ry,
rz,
sx,
sy,
sz,
s_xy,
s_xz,
s_yz,
px,
py,
pz,
int  reverse = 0 
)

template<typename T>
UT_Matrix4T<T> UT_Matrix4T< T >::xform ( const UT_XformOrder order,
tx = 0.0f,
ty = 0.0f,
tz = 0.0f,
rx = 0.0f,
ry = 0.0f,
rz = 0.0f,
sx = 1.0f,
sy = 1.0f,
sz = 1.0f,
px = 0.0f,
py = 0.0f,
pz = 0.0f,
int  reverse = 0 
) const

template<typename T>
void UT_Matrix4T< T >::xform ( const UT_XformOrder order,
tx = 0.0f,
ty = 0.0f,
tz = 0.0f,
rx = 0.0f,
ry = 0.0f,
rz = 0.0f,
sx = 1.0f,
sy = 1.0f,
sz = 1.0f,
px = 0.0f,
py = 0.0f,
pz = 0.0f,
int  reverse = 0 
)

template<typename T>
void UT_Matrix4T< T >::zero (  )  [inline]

Set the matrix to zero.

Definition at line 673 of file UT_Matrix4.h.


Friends And Related Function Documentation

template<typename T>
ostream& operator<< ( ostream &  os,
const UT_Matrix4T< T > &  v 
) [friend]

Definition at line 755 of file UT_Matrix4.h.


Member Data Documentation

union { ... }

template<typename T>
T UT_Matrix4T< T >::matx[4][4]

Definition at line 768 of file UT_Matrix4.h.

template<typename T>
T UT_Matrix4T< T >::myFloats[16]

Definition at line 769 of file UT_Matrix4.h.


The documentation for this class was generated from the following file:

Generated on Mon Jan 28 00:49:08 2013 for HDK by  doxygen 1.5.9