HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Matrix44< T > Class Template Reference

#include <ImathMatrix.h>

+ Inheritance diagram for Matrix44< T >:

Public Types

typedef T BaseType
 The base type: In templates that accept a parameter V (could be a Color4), you can refer to T as V::BaseType More...
 
typedef Vec4< TBaseVecType
 The base vector type. More...
 
- Public Types inherited from MatrixN< Matrix44, float, 4 >
using RowArray = typename std::array< float, N >
 
using Iterator = typename std::array< RowArray, N >::iterator
 
using ConstIterator = typename std::array< RowArray, N >::const_iterator
 

Public Member Functions

IMATH_HOSTDEVICE Toperator[] (int i) IMATH_NOEXCEPT
 Row access. More...
 
IMATH_HOSTDEVICE const Toperator[] (int i) const IMATH_NOEXCEPT
 Row access. More...
 
 Matrix44 ()=default
 
 Matrix44 (float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33)
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix44< T > & 
setValue (const Matrix44< S > &v) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix44< T > & 
setTheMatrix (const Matrix44< S > &v) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE const
Matrix44< T > & 
setEulerAngles (const Vec3< S > &r) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
setAxisAngle (const Vec3< S > &axis, S angle) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE const
Matrix44< T > & 
rotate (const Vec3< S > &r) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
setScale (const Vec3< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
scale (const Vec3< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
setTranslation (const Vec3< S > &t) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
translate (const Vec3< S > &t) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
setShear (const Vec3< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
setShear (const Shear6< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
shear (const Vec3< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44< T > & 
shear (const Shear6< S > &h) IMATH_NOEXCEPT
 
Constructors and Assignment
IMATH_HOSTDEVICE constexpr Matrix44 (Uninitialized) IMATH_NOEXCEPT
 Uninitialized. More...
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44 () IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44 (T a) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44 (const T a[4][4]) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44 (T a, T b, T c, T d, T e, T f, T g, T h, T i, T j, T k, T l, T m, T n, T o, T p) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44 (Matrix33< T > r, Vec3< T > t) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44 (const Matrix44 &v) IMATH_NOEXCEPT
 Copy constructor. More...
 
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44 (const Matrix44< S > &v) IMATH_NOEXCEPT
 Construct from Matrix44 of another base type. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator= (const Matrix44 &v) IMATH_NOEXCEPT
 Assignment operator. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator= (T a) IMATH_NOEXCEPT
 Assignment from scalar. More...
 
 ~Matrix44 () IMATH_NOEXCEPT=default
 Destructor. More...
 
Interoperability with other matrix types

Construction and assignment are allowed from other classes that appear to be equivalent matrix types, provided that they support double-subscript (i.e., m[j][i]) giving the same type as the elements of this matrix, and their total size appears to be the right number of matrix elements.

This functionality is disabled for gcc 4.x, which seems to have a compiler bug that results in spurious errors. It can also be disabled by defining IMATH_FOREIGN_VECTOR_INTEROP to be 0 prior to including any Imath header files.

template<typename M , IMATH_ENABLE_IF(has_double_subscript< M, T, 4, 4 >::value) >
IMATH_HOSTDEVICE Matrix44 (const M &m)
 
template<typename M , IMATH_ENABLE_IF(has_double_subscript< M, T, 4, 4 >::value) >
IMATH_HOSTDEVICE const Matrix44operator= (const M &m)
 
Compatibility with Sb
IMATH_HOSTDEVICE TgetValue () IMATH_NOEXCEPT
 Return a raw pointer to the array of values. More...
 
IMATH_HOSTDEVICE const TgetValue () const IMATH_NOEXCEPT
 Return a raw pointer to the array of values. More...
 
template<class S >
IMATH_HOSTDEVICE void getValue (Matrix44< S > &v) const IMATH_NOEXCEPT
 Return the value in v More...
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix44
setValue (const Matrix44< S > &v) IMATH_NOEXCEPT
 Set the value. More...
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix44
setTheMatrix (const Matrix44< S > &v) IMATH_NOEXCEPT
 Set the value. More...
 
Maniplation
IMATH_HOSTDEVICE void makeIdentity () IMATH_NOEXCEPT
 Set to the identity matrix. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
transpose () IMATH_NOEXCEPT
 Transpose. More...
 
IMATH_HOSTDEVICE constexpr Matrix44 transposed () const IMATH_NOEXCEPT
 Return the transpose. More...
 
IMATH_CONSTEXPR14 const Matrix44invert (bool singExc)
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
invert () IMATH_NOEXCEPT
 
IMATH_CONSTEXPR14 Matrix44< Tinverse (bool singExc) const
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix44< T
inverse () const IMATH_NOEXCEPT
 Return the inverse using the determinant, leaving this unmodified. More...
 
IMATH_CONSTEXPR14 const Matrix44gjInvert (bool singExc)
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
gjInvert () IMATH_NOEXCEPT
 
Matrix44< TgjInverse (bool singExc) const
 
IMATH_HOSTDEVICE Matrix44< TgjInverse () const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 T 
minorOf (const int r, const int c) const IMATH_NOEXCEPT
 Calculate the matrix minor of the (r,c) element. More...
 
IMATH_HOSTDEVICE constexpr T fastMinor (const int r0, const int r1, const int r2, const int c0, const int c1, const int c2) const IMATH_NOEXCEPT
 Build a minor using the specified rows and columns. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 T 
determinant () const IMATH_NOEXCEPT
 Determinant. More...
 
template<class S >
IMATH_HOSTDEVICE const Matrix44setEulerAngles (const Vec3< S > &r) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
setAxisAngle (const Vec3< S > &ax, S ang) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE const Matrix44rotate (const Vec3< S > &r) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
setScale (T s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
setScale (const Vec3< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
scale (const Vec3< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
setTranslation (const Vec3< S > &t) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE constexpr
const Vec3< T
translation () const IMATH_NOEXCEPT
 Return translation component. More...
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
translate (const Vec3< S > &t) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
setShear (const Vec3< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
setShear (const Shear6< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
shear (const Vec3< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
shear (const Shear6< S > &h) IMATH_NOEXCEPT
 
Matrix Operations
Matrix44 getTranspose () const
 Return the transpose of the matrix. More...
 
float getDeterminant () const
 Return the determinant of the matrix. More...
 
Matrix44 getAdjugate () const
 Return the adjugate of the matrix. More...
 
Matrix44 getInverse () const
 Return the inverse of the matrix. More...
 
- Public Member Functions inherited from MatrixN< Matrix44, float, 4 >
 MatrixN ()
 
 MatrixN (Uninit)
 
 MatrixN (floats)
 
 MatrixN (const float *begin, const float *end)
 
bool operator== (const Matrix44 &rhs) const
 Return true if the given matrix is identical to this one. More...
 
bool operator!= (const Matrix44 &rhs) const
 Return true if the given matrix differs from this one. More...
 
bool isEquivalent (const Matrix44 &rhs, floattolerance) const
 
RowArrayoperator[] (size_t i)
 Return the row array at the given index. More...
 
const RowArrayoperator[] (size_t i) const
 Return the const row array at the given index. More...
 
Matrix44 operator+ (const Matrix44 &rhs) const
 Component-wise addition of two matrices. More...
 
MatrixNoperator+= (const Matrix44 &rhs)
 Component-wise addition of two matrices. More...
 
Matrix44 operator- (const Matrix44 &rhs) const
 Component-wise subtraction of two matrices. More...
 
MatrixNoperator-= (const Matrix44 &rhs)
 Component-wise subtraction of two matrices. More...
 
Matrix44 operator* (floats) const
 Component-wise multiplication of a matrix and a scalar. More...
 
MatrixNoperator*= (floats)
 Component-wise multiplication of a matrix and a scalar. More...
 
Matrix44 operator/ (floats) const
 Component-wise division of a matrix by a scalar. More...
 
MatrixNoperator/= (floats)
 Component-wise division of a matrix by a scalar. More...
 
Matrix44 operator* (const Matrix44 &rhs) const
 Compute the matrix product. More...
 
MatrixNoperator*= (const Matrix44 &rhs)
 Compute the matrix product. More...
 
Matrix44 operator/ (const Matrix44 &rhs) const
 
MatrixNoperator/= (const Matrix44 &rhs)
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
floatdata ()
 Return a pointer to the underlying data array. More...
 
const floatdata () const
 Return a const pointer to the underlying data array. More...
 

Static Public Member Functions

IMATH_HOSTDEVICE static
constexpr unsigned int 
dimensions () IMATH_NOEXCEPT
 Return the number of the row and column dimensions, i.e. 4. More...
 
Numeric Limits
IMATH_HOSTDEVICE static constexpr T baseTypeLowest () IMATH_NOEXCEPT
 Largest possible negative value. More...
 
IMATH_HOSTDEVICE static constexpr T baseTypeMax () IMATH_NOEXCEPT
 Largest possible positive value. More...
 
IMATH_HOSTDEVICE static constexpr T baseTypeSmallest () IMATH_NOEXCEPT
 Smallest possible positive value. More...
 
IMATH_HOSTDEVICE static constexpr T baseTypeEpsilon () IMATH_NOEXCEPT
 Smallest possible e for which 1+e != 1. More...
 
- Static Public Member Functions inherited from MatrixN< Matrix44, float, 4 >
static constexpr size_t numRows ()
 Return the number of rows in this matrix. More...
 
static constexpr size_t numColumns ()
 Return the number of columns in this matrix. More...
 

Public Attributes

Direct access to elements
T x [4][4]
 Matrix elements. More...
 

Static Public Attributes

static const Matrix44 IDENTITY
 

Arithmetic and Comparison

IMATH_HOSTDEVICE constexpr bool operator== (const Matrix44 &v) const IMATH_NOEXCEPT
 Equality. More...
 
IMATH_HOSTDEVICE constexpr bool operator!= (const Matrix44 &v) const IMATH_NOEXCEPT
 Inequality. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 bool 
equalWithAbsError (const Matrix44< T > &v, T e) const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 bool 
equalWithRelError (const Matrix44< T > &v, T e) const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator+= (const Matrix44 &v) IMATH_NOEXCEPT
 Component-wise addition. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator+= (T a) IMATH_NOEXCEPT
 Component-wise addition. More...
 
IMATH_HOSTDEVICE constexpr Matrix44 operator+ (const Matrix44 &v) const IMATH_NOEXCEPT
 Component-wise addition. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator-= (const Matrix44 &v) IMATH_NOEXCEPT
 Component-wise subtraction. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator-= (T a) IMATH_NOEXCEPT
 Component-wise subtraction. More...
 
IMATH_HOSTDEVICE constexpr Matrix44 operator- (const Matrix44 &v) const IMATH_NOEXCEPT
 Component-wise subtraction. More...
 
IMATH_HOSTDEVICE constexpr Matrix44 operator- () const IMATH_NOEXCEPT
 Component-wise multiplication by -1. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
negate () IMATH_NOEXCEPT
 Component-wise multiplication by -1. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator*= (T a) IMATH_NOEXCEPT
 Component-wise multiplication. More...
 
IMATH_HOSTDEVICE constexpr Matrix44 operator* (T a) const IMATH_NOEXCEPT
 Component-wise multiplication. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator/= (T a) IMATH_NOEXCEPT
 Component-wise division. More...
 
IMATH_HOSTDEVICE constexpr Matrix44 operator/ (T a) const IMATH_NOEXCEPT
 Component-wise division. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix44
operator*= (const Matrix44 &v) IMATH_NOEXCEPT
 Matrix-matrix multiplication. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix44 
operator* (const Matrix44 &v) const IMATH_NOEXCEPT
 Matrix-matrix multiplication. More...
 
template<class S >
IMATH_HOSTDEVICE void multVecMatrix (const Vec3< S > &src, Vec3< S > &dst) const IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE void multDirMatrix (const Vec3< S > &src, Vec3< S > &dst) const IMATH_NOEXCEPT
 
static IMATH_HOSTDEVICE void multiply (const Matrix44 &a, const Matrix44 &b, Matrix44 &c) IMATH_NOEXCEPT
 Matrix-matrix multiplication: compute c = a * b. More...
 
static IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix44 
multiply (const Matrix44 &a, const Matrix44 &b) IMATH_NOEXCEPT
 Matrix-matrix multiplication returning a result. More...
 

Vector Transformations

Vector4 multiply (const Vector4 &v) const
 Return the product of this matrix and a 4D vector. More...
 
Vector3 transformPoint (const Vector3 &v) const
 Transform the given 3D point. More...
 
Vector3 transformVector (const Vector3 &v) const
 Transform the given 3D direction vector. More...
 
Vector3 transformNormal (const Vector3 &v) const
 Transform the given 3D normal vector. More...
 
static Matrix44 createTranslation (const Vector3 &v)
 Create a translation matrix. More...
 
static Matrix44 createScale (const Vector3 &v)
 Create a scale matrix. More...
 
static Matrix44 createRotationX (float angle)
 
static Matrix44 createRotationY (float angle)
 
static Matrix44 createRotationZ (float angle)
 

Additional Inherited Members

- Protected Attributes inherited from MatrixN< Matrix44, float, 4 >
std::array< RowArray, N > _arr
 

Detailed Description

template<class T>
class Matrix44< T >

4x4 transformation matrix

A 4x4 matrix of floating-point values.

Vector transformation methods follow the row-vector convention, with matrix-vector multiplication computed as v' = vM.

Definition at line 662 of file ImathMatrix.h.

Member Typedef Documentation

template<class T>
typedef T Matrix44< T >::BaseType

The base type: In templates that accept a parameter V (could be a Color4), you can refer to T as V::BaseType

Definition at line 1051 of file ImathMatrix.h.

template<class T>
typedef Vec4<T> Matrix44< T >::BaseVecType

The base vector type.

Definition at line 1054 of file ImathMatrix.h.

Constructor & Destructor Documentation

template<class T>
IMATH_HOSTDEVICE constexpr Matrix44< T >::Matrix44 ( Uninitialized  )
inline

Uninitialized.

Definition at line 684 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T >::Matrix44 ( )
inline

Default constructor: initialize to identity 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

Definition at line 2997 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T >::Matrix44 ( T  a)
inline

Initialize to scalar constant a a a a a a a a a a a a a a a a

Definition at line 3017 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T >::Matrix44 ( const T  a[4][4])
inline

Construct from 4x4 array a[0][0] a[0][1] a[0][2] a[0][3] a[1][0] a[1][1] a[1][2] a[1][3] a[2][0] a[2][1] a[2][2] a[2][3] a[3][0] a[3][1] a[3][2] a[3][3]

Definition at line 3037 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T >::Matrix44 ( T  a,
T  b,
T  c,
T  d,
T  e,
T  f,
T  g,
T  h,
T  i,
T  j,
T  k,
T  l,
T  m,
T  n,
T  o,
T  p 
)
inline

Construct from given scalar values a b c d e f g h i j k l m n o p

Definition at line 3059 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T >::Matrix44 ( Matrix33< T r,
Vec3< T t 
)
inline

Construct from a 3x3 rotation matrix and a translation vector r r r 0 r r r 0 r r r 0 t t t 1

Definition at line 3079 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T >::Matrix44 ( const Matrix44< T > &  v)
inline

Copy constructor.

Definition at line 3099 of file ImathMatrix.h.

template<class T >
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T >::Matrix44 ( const Matrix44< S > &  v)
inlineexplicit

Construct from Matrix44 of another base type.

Definition at line 3121 of file ImathMatrix.h.

template<class T>
Matrix44< T >::~Matrix44 ( )
default

Destructor.

template<class T>
template<typename M , IMATH_ENABLE_IF(has_double_subscript< M, T, 4, 4 >::value) >
IMATH_HOSTDEVICE Matrix44< T >::Matrix44 ( const M &  m)
inlineexplicit

Interoperability assignment from another type that behaves as if it were an equivalent matrix.

Definition at line 756 of file ImathMatrix.h.

template<class T>
Matrix44< T >::Matrix44 ( )
default
template<class T>
Matrix44< T >::Matrix44 ( float  m00,
float  m01,
float  m02,
float  m03,
float  m10,
float  m11,
float  m12,
float  m13,
float  m20,
float  m21,
float  m22,
float  m23,
float  m30,
float  m31,
float  m32,
float  m33 
)
inline

Definition at line 660 of file Types.h.

Member Function Documentation

template<class T>
IMATH_HOSTDEVICE static constexpr T Matrix44< T >::baseTypeEpsilon ( )
inlinestatic

Smallest possible e for which 1+e != 1.

Definition at line 1043 of file ImathMatrix.h.

template<class T>
IMATH_HOSTDEVICE static constexpr T Matrix44< T >::baseTypeLowest ( )
inlinestatic

Largest possible negative value.

Definition at line 1034 of file ImathMatrix.h.

template<class T>
IMATH_HOSTDEVICE static constexpr T Matrix44< T >::baseTypeMax ( )
inlinestatic

Largest possible positive value.

Definition at line 1037 of file ImathMatrix.h.

template<class T>
IMATH_HOSTDEVICE static constexpr T Matrix44< T >::baseTypeSmallest ( )
inlinestatic

Smallest possible positive value.

Definition at line 1040 of file ImathMatrix.h.

template<class T>
static Matrix44 Matrix44< T >::createRotationX ( float  angle)
static

Create a rotation matrix about the X-axis.

Parameters
angleAngle in radians
template<class T>
static Matrix44 Matrix44< T >::createRotationY ( float  angle)
static

Create a rotation matrix about the Y-axis.

Parameters
angleAngle in radians
template<class T>
static Matrix44 Matrix44< T >::createRotationZ ( float  angle)
static

Create a rotation matrix about the Z-axis.

Parameters
angleAngle in radians
template<class T>
static Matrix44 Matrix44< T >::createScale ( const Vector3 v)
static

Create a scale matrix.

template<class T>
static Matrix44 Matrix44< T >::createTranslation ( const Vector3 v)
static

Create a translation matrix.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T Matrix44< T >::determinant ( ) const
inline

Determinant.

Definition at line 4189 of file ImathMatrix.h.

template<class T>
IMATH_HOSTDEVICE static constexpr unsigned int Matrix44< T >::dimensions ( )
inlinestatic

Return the number of the row and column dimensions, i.e. 4.

Definition at line 1048 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Matrix44< T >::equalWithAbsError ( const Matrix44< T > &  v,
T  e 
) const
inline

Compare two matrices and test if they are "approximately equal":

Returns
True if the coefficients of this and m are the same with an absolute error of no more than e, i.e., for all i, j:
abs (this[i][j] - m[i][j]) <= e  

Definition at line 3320 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Matrix44< T >::equalWithRelError ( const Matrix44< T > &  v,
T  e 
) const
inline

Compare two matrices and test if they are "approximately equal":

Returns
True if the coefficients of this and m are the same with a relative error of no more than e, i.e., for all i, j:
abs (this[i] - v[i][j]) <= e * abs (this[i][j])  

Definition at line 3332 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr T Matrix44< T >::fastMinor ( const int  r0,
const int  r1,
const int  r2,
const int  c0,
const int  c1,
const int  c2 
) const
inline

Build a minor using the specified rows and columns.

Definition at line 4151 of file ImathMatrix.h.

template<class T>
Matrix44 Matrix44< T >::getAdjugate ( ) const

Return the adjugate of the matrix.

template<class T>
float Matrix44< T >::getDeterminant ( ) const

Return the determinant of the matrix.

template<class T>
Matrix44 Matrix44< T >::getInverse ( ) const
inline

Return the inverse of the matrix.

Definition at line 685 of file Types.h.

template<class T>
Matrix44 Matrix44< T >::getTranspose ( ) const

Return the transpose of the matrix.

template<class T >
IMATH_HOSTDEVICE IMATH_HOSTDEVICE T * Matrix44< T >::getValue ( )
inline

Return a raw pointer to the array of values.

Definition at line 3189 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE const T * Matrix44< T >::getValue ( ) const
inline

Return a raw pointer to the array of values.

Definition at line 3196 of file ImathMatrix.h.

template<class T >
template<class S >
IMATH_HOSTDEVICE void Matrix44< T >::getValue ( Matrix44< S > &  v) const
inline

Return the value in v

Definition at line 3204 of file ImathMatrix.h.

template<class T >
Matrix44< T > Matrix44< T >::gjInverse ( bool  singExc) const
inline

Return the inverse using the Gauss-Jordan method, leaving this unmodified. Significantly slower but more accurate than inverse().

Definition at line 3798 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE Matrix44< T > Matrix44< T >::gjInverse ( ) const
inline

Return the inverse using the Gauss-Jordan method, leaving this unmodified Significantly slower but more accurate than inverse().

Definition at line 3902 of file ImathMatrix.h.

template<class T >
IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::gjInvert ( bool  singExc)
inline

Invert in place using the Gauss-Jordan method. Significantly slower but more accurate than invert().

Parameters
singExcIf true, throw an exception if the matrix cannot be inverted.
Returns
const reference to this

Definition at line 3782 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::gjInvert ( )
inline

Invert in place using the Gauss-Jordan method. Significantly slower but more accurate than invert().

Returns
const reference to this

Definition at line 3790 of file ImathMatrix.h.

template<class T >
IMATH_CONSTEXPR14 Matrix44< T > Matrix44< T >::inverse ( bool  singExc) const
inline

Return the inverse using the determinant, leaving this unmodified.

Parameters
singExcIf true, throw an exception if the matrix cannot be inverted.

Definition at line 4016 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T > Matrix44< T >::inverse ( ) const
inline

Return the inverse using the determinant, leaving this unmodified.

Definition at line 4085 of file ImathMatrix.h.

template<class T >
IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::invert ( bool  singExc)
inline

Invert in place using the determinant.

Parameters
singExcIf true, throw an exception if the matrix cannot be inverted.
Returns
const reference to this

Definition at line 4000 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::invert ( )
inline

Invert in place using the determinant.

Returns
const reference to this

Definition at line 4008 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE void Matrix44< T >::makeIdentity ( )
inline

Set to the identity matrix.

Definition at line 3274 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T Matrix44< T >::minorOf ( const int  r,
const int  c 
) const
inline

Calculate the matrix minor of the (r,c) element.

Definition at line 4165 of file ImathMatrix.h.

template<class T >
template<class S >
IMATH_HOSTDEVICE void Matrix44< T >::multDirMatrix ( const Vec3< S > &  src,
Vec3< S > &  dst 
) const
inline

Vector-matrix multiplication: multiply src by the upper left 2x2 submatrix, ignoring the rest of matrix.

Parameters
[in]srcThe input vector
[out]dstThe output vector

Definition at line 3675 of file ImathMatrix.h.

template<class T>
Vector4 Matrix44< T >::multiply ( const Vector4 v) const

Return the product of this matrix and a 4D vector.

template<class T >
IMATH_HOSTDEVICE void Matrix44< T >::multiply ( const Matrix44< T > &  a,
const Matrix44< T > &  b,
Matrix44< T > &  c 
)
inlinestatic

Matrix-matrix multiplication: compute c = a * b.

Definition at line 3650 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T > Matrix44< T >::multiply ( const Matrix44< T > &  a,
const Matrix44< T > &  b 
)
inlinestatic

Matrix-matrix multiplication returning a result.

Definition at line 3585 of file ImathMatrix.h.

template<class T >
template<class S >
IMATH_HOSTDEVICE void Matrix44< T >::multVecMatrix ( const Vec3< S > &  src,
Vec3< S > &  dst 
) const
inline

Vector-matrix multiplication: a homogeneous transformation by computing Vec3 (src.x, src.y, src.z, 1) * m and dividing by the result's third element.

Parameters
[in]srcThe input vector
[out]dstThe output vector

Definition at line 3658 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::negate ( )
inline

Component-wise multiplication by -1.

Definition at line 3506 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr bool Matrix44< T >::operator!= ( const Matrix44< T > &  v) const
inline

Inequality.

Definition at line 3308 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr Matrix44< T > Matrix44< T >::operator* ( T  a) const
inline

Component-wise multiplication.

Definition at line 3554 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44< T > Matrix44< T >::operator* ( const Matrix44< T > &  v) const
inline

Matrix-matrix multiplication.

Definition at line 3643 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator*= ( T  a)
inline

Component-wise multiplication.

Definition at line 3530 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator*= ( const Matrix44< T > &  v)
inline

Matrix-matrix multiplication.

Definition at line 3635 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr Matrix44< T > Matrix44< T >::operator+ ( const Matrix44< T > &  v) const
inline

Component-wise addition.

Definition at line 3392 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator+= ( const Matrix44< T > &  v)
inline

Component-wise addition.

Definition at line 3344 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator+= ( T  a)
inline

Component-wise addition.

Definition at line 3368 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr Matrix44< T > Matrix44< T >::operator- ( const Matrix44< T > &  v) const
inline

Component-wise subtraction.

Definition at line 3462 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr Matrix44< T > Matrix44< T >::operator- ( ) const
inline

Component-wise multiplication by -1.

Definition at line 3484 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator-= ( const Matrix44< T > &  v)
inline

Component-wise subtraction.

Definition at line 3414 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator-= ( T  a)
inline

Component-wise subtraction.

Definition at line 3438 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr Matrix44< T > Matrix44< T >::operator/ ( T  a) const
inline

Component-wise division.

Definition at line 3714 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator/= ( T  a)
inline

Component-wise division.

Definition at line 3690 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator= ( const Matrix44< T > &  v)
inline

Assignment operator.

Definition at line 3143 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::operator= ( T  a)
inline

Assignment from scalar.

Definition at line 3166 of file ImathMatrix.h.

template<class T>
template<typename M , IMATH_ENABLE_IF(has_double_subscript< M, T, 4, 4 >::value) >
IMATH_HOSTDEVICE const Matrix44& Matrix44< T >::operator= ( const M &  m)
inline

Interoperability assignment from another type that behaves as if it were an equivalent matrix.

Definition at line 766 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr bool Matrix44< T >::operator== ( const Matrix44< T > &  v) const
inline

Equality.

Definition at line 3296 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_HOSTDEVICE T * Matrix44< T >::operator[] ( int  i)
inline

Row access.

Definition at line 2985 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE const T * Matrix44< T >::operator[] ( int  i) const
inline

Row access.

Definition at line 2992 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE const Matrix44& Matrix44< T >::rotate ( const Vec3< S > &  r)

Rotate the matrix by XYZ euler angles in r (in radians)

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE const Matrix44<T>& Matrix44< T >::rotate ( const Vec3< S > &  r)
inline

Definition at line 4278 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::scale ( const Vec3< S > &  s)

Scale the matrix by s

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::scale ( const Vec3< S > &  s)
inline

Definition at line 4389 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::setAxisAngle ( const Vec3< S > &  ax,
S  ang 
)

Set matrix to rotation around given axis by given angle (in radians)

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::setAxisAngle ( const Vec3< S > &  axis,
S  angle 
)
inline

Definition at line 4246 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE const Matrix44& Matrix44< T >::setEulerAngles ( const Vec3< S > &  r)

Set matrix to rotation by XYZ euler angles (in radians)

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE const Matrix44<T>& Matrix44< T >::setEulerAngles ( const Vec3< S > &  r)
inline

Definition at line 4208 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::setScale ( T  s)
inline

Set matrix to scale by given uniform factor

Returns
const referenced to this

Definition at line 4325 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::setScale ( const Vec3< S > &  s)

Set matrix to scale by given vector

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::setScale ( const Vec3< S > &  s)
inline

Definition at line 4357 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::setShear ( const Vec3< S > &  h)

Set matrix to shear by given vector h. The resulting matrix

  • will shear x for each y coord. by a factor of h[0] ;
  • will shear x for each z coord. by a factor of h[1] ;
  • will shear y for each z coord. by a factor of h[2] .
    Returns
    const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::setShear ( const Shear6< S > &  h)

Set matrix to shear by given factors. The resulting matrix

  • will shear x for each y coord. by a factor of h.xy ;
  • will shear x for each z coord. by a factor of h.xz ;
  • will shear y for each z coord. by a factor of h.yz ;
  • will shear y for each x coord. by a factor of h.yx ;
  • will shear z for each x coord. by a factor of h.zx ;
  • will shear z for each y coord. by a factor of h.zy .
    Returns
    const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::setShear ( const Vec3< S > &  h)
inline

Definition at line 4460 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::setShear ( const Shear6< S > &  h)
inline

Definition at line 4488 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44& Matrix44< T >::setTheMatrix ( const Matrix44< S > &  v)

Set the value.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44<T>& Matrix44< T >::setTheMatrix ( const Matrix44< S > &  v)
inline

Definition at line 3251 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::setTranslation ( const Vec3< S > &  t)

Set matrix to translation by given vector

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::setTranslation ( const Vec3< S > &  t)
inline

Definition at line 4412 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44& Matrix44< T >::setValue ( const Matrix44< S > &  v)

Set the value.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix44<T>& Matrix44< T >::setValue ( const Matrix44< S > &  v)
inline

Definition at line 3227 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::shear ( const Vec3< S > &  h)

Shear the matrix by given vector. The composed matrix will be shear * this, where the shear matrix ...

  • will shear x for each y coord. by a factor of h[0] ;
  • will shear x for each z coord. by a factor of h[1] ;
  • will shear y for each z coord. by a factor of h[2] .
    Returns
    const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::shear ( const Shear6< S > &  h)

Shear the matrix by the given factors. The composed matrix will be shear * this, where the shear matrix ...

  • will shear x for each y coord. by a factor of h.xy ;
  • will shear x for each z coord. by a factor of h.xz ;
  • will shear y for each z coord. by a factor of h.yz ;
  • will shear y for each x coord. by a factor of h.yx ;
  • will shear z for each x coord. by a factor of h.zx ;
  • will shear z for each y coord. by a factor of h.zy .
    Returns
    const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::shear ( const Vec3< S > &  h)
inline

Definition at line 4516 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::shear ( const Shear6< S > &  h)
inline

Definition at line 4536 of file ImathMatrix.h.

template<class T>
Vector3 Matrix44< T >::transformNormal ( const Vector3 v) const

Transform the given 3D normal vector.

template<class T>
Vector3 Matrix44< T >::transformPoint ( const Vector3 v) const

Transform the given 3D point.

template<class T>
Vector3 Matrix44< T >::transformVector ( const Vector3 v) const

Transform the given 3D direction vector.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44& Matrix44< T >::translate ( const Vec3< S > &  t)

Translate the matrix by t

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44<T>& Matrix44< T >::translate ( const Vec3< S > &  t)
inline

Definition at line 4447 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr const Vec3< T > Matrix44< T >::translation ( ) const
inline

Return translation component.

Definition at line 4439 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix44< T > & Matrix44< T >::transpose ( )
inline

Transpose.

Definition at line 3736 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr Matrix44< T > Matrix44< T >::transposed ( ) const
inline

Return the transpose.

Definition at line 3760 of file ImathMatrix.h.

Member Data Documentation

template<class T>
const Matrix44 Matrix44< T >::IDENTITY
static

Definition at line 727 of file Types.h.

template<class T>
T Matrix44< T >::x[4][4]

Matrix elements.

Definition at line 670 of file ImathMatrix.h.


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