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

#include <ImathMatrix.h>

+ Inheritance diagram for Matrix33< 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 Vec3< TBaseVecType
 The base vector type. More...
 
- Public Types inherited from MatrixN< Matrix33, float, 3 >
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...
 
 Matrix33 ()=default
 
 Matrix33 (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix33< T > & 
setValue (const Matrix33< S > &v) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix33< T > & 
setTheMatrix (const Matrix33< S > &v) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE const
Matrix33< T > & 
setRotation (S r) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
rotate (S r) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
setScale (const Vec2< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
scale (const Vec2< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
setTranslation (const Vec2< S > &t) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
translate (const Vec2< S > &t) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
setShear (const S &xy) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
setShear (const Vec2< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
shear (const S &xy) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33< T > & 
shear (const Vec2< S > &h) IMATH_NOEXCEPT
 
Constructors and Assignment
IMATH_HOSTDEVICE Matrix33 (Uninitialized) IMATH_NOEXCEPT
 Uninitialized. More...
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33 () IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33 (T a) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33 (const T a[3][3]) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33 (T a, T b, T c, T d, T e, T f, T g, T h, T i) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33 (const Matrix33 &v) IMATH_NOEXCEPT
 Copy constructor. More...
 
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33 (const Matrix33< S > &v) IMATH_NOEXCEPT
 Construct from Matrix33 of another base type. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator= (const Matrix33 &v) IMATH_NOEXCEPT
 Assignment operator. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator= (T a) IMATH_NOEXCEPT
 Assignment from scalar. More...
 
 ~Matrix33 () 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, 3, 3 >::value) >
IMATH_HOSTDEVICE Matrix33 (const M &m)
 
template<typename M , IMATH_ENABLE_IF(has_double_subscript< M, T, 3, 3 >::value) >
IMATH_HOSTDEVICE const Matrix33operator= (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 (Matrix33< S > &v) const IMATH_NOEXCEPT
 Return the value in v More...
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix33
setValue (const Matrix33< S > &v) IMATH_NOEXCEPT
 Set the value. More...
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix33
setTheMatrix (const Matrix33< S > &v) IMATH_NOEXCEPT
 Set the value. More...
 
Arithmetic and Comparison
IMATH_HOSTDEVICE constexpr bool operator== (const Matrix33 &v) const IMATH_NOEXCEPT
 Equality. More...
 
IMATH_HOSTDEVICE constexpr bool operator!= (const Matrix33 &v) const IMATH_NOEXCEPT
 Inequality. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 bool 
equalWithAbsError (const Matrix33< T > &v, T e) const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 bool 
equalWithRelError (const Matrix33< T > &v, T e) const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator+= (const Matrix33 &v) IMATH_NOEXCEPT
 Component-wise addition. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator+= (T a) IMATH_NOEXCEPT
 Component-wise addition. More...
 
IMATH_HOSTDEVICE constexpr Matrix33 operator+ (const Matrix33 &v) const IMATH_NOEXCEPT
 Component-wise addition. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator-= (const Matrix33 &v) IMATH_NOEXCEPT
 Component-wise subtraction. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator-= (T a) IMATH_NOEXCEPT
 Component-wise subtraction. More...
 
IMATH_HOSTDEVICE constexpr Matrix33 operator- (const Matrix33 &v) const IMATH_NOEXCEPT
 Component-wise subtraction. More...
 
IMATH_HOSTDEVICE constexpr Matrix33 operator- () const IMATH_NOEXCEPT
 Component-wise multiplication by -1. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
negate () IMATH_NOEXCEPT
 Component-wise multiplication by -1. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator*= (T a) IMATH_NOEXCEPT
 Component-wise multiplication. More...
 
IMATH_HOSTDEVICE constexpr Matrix33 operator* (T a) const IMATH_NOEXCEPT
 Component-wise multiplication. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator/= (T a) IMATH_NOEXCEPT
 Component-wise division. More...
 
IMATH_HOSTDEVICE constexpr Matrix33 operator/ (T a) const IMATH_NOEXCEPT
 Component-wise division. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
operator*= (const Matrix33 &v) IMATH_NOEXCEPT
 Matrix-matrix multiplication. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix33 
operator* (const Matrix33 &v) const IMATH_NOEXCEPT
 Matrix-matrix multiplication. More...
 
template<class S >
IMATH_HOSTDEVICE void multVecMatrix (const Vec2< S > &src, Vec2< S > &dst) const IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE void multDirMatrix (const Vec2< S > &src, Vec2< S > &dst) const IMATH_NOEXCEPT
 
Maniplation
IMATH_HOSTDEVICE void makeIdentity () IMATH_NOEXCEPT
 Set to the identity matrix. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
transpose () IMATH_NOEXCEPT
 Transpose. More...
 
IMATH_HOSTDEVICE constexpr Matrix33 transposed () const IMATH_NOEXCEPT
 Return the transpose. More...
 
IMATH_CONSTEXPR14 const Matrix33invert (bool singExc)
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
invert () IMATH_NOEXCEPT
 
IMATH_CONSTEXPR14 Matrix33< Tinverse (bool singExc) const
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Matrix33< T
inverse () const IMATH_NOEXCEPT
 Return the inverse using the determinant, leaving this unmodified. More...
 
const Matrix33gjInvert (bool singExc)
 
IMATH_HOSTDEVICE const Matrix33gjInvert () IMATH_NOEXCEPT
 
Matrix33< TgjInverse (bool singExc) const
 
IMATH_HOSTDEVICE Matrix33< 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 c0, const int c1) const IMATH_NOEXCEPT
 Build a minor using the specified rows and columns. More...
 
IMATH_HOSTDEVICE constexpr T determinant () const IMATH_NOEXCEPT
 Determinant. More...
 
template<class S >
IMATH_HOSTDEVICE const Matrix33setRotation (S r) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
rotate (S r) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
setScale (T s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
setScale (const Vec2< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
scale (const Vec2< S > &s) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
setTranslation (const Vec2< S > &t) IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE constexpr
Vec2< T
translation () const IMATH_NOEXCEPT
 Return the translation component. More...
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
translate (const Vec2< S > &t) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
setShear (const S &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
setShear (const Vec2< S > &h) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
shear (const S &xy) IMATH_NOEXCEPT
 
template<class S >
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 const
Matrix33
shear (const Vec2< S > &h) IMATH_NOEXCEPT
 
Matrix Operations
Matrix33 getTranspose () const
 Return the transpose of the matrix. More...
 
float getDeterminant () const
 Return the determinant of the matrix. More...
 
Matrix33 getAdjugate () const
 Return the adjugate of the matrix. More...
 
Matrix33 getInverse () const
 Return the inverse of the matrix. More...
 
- Public Member Functions inherited from MatrixN< Matrix33, float, 3 >
 MatrixN ()
 
 MatrixN (Uninit)
 
 MatrixN (floats)
 
 MatrixN (const float *begin, const float *end)
 
bool operator== (const Matrix33 &rhs) const
 Return true if the given matrix is identical to this one. More...
 
bool operator!= (const Matrix33 &rhs) const
 Return true if the given matrix differs from this one. More...
 
bool isEquivalent (const Matrix33 &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...
 
Matrix33 operator+ (const Matrix33 &rhs) const
 Component-wise addition of two matrices. More...
 
MatrixNoperator+= (const Matrix33 &rhs)
 Component-wise addition of two matrices. More...
 
Matrix33 operator- (const Matrix33 &rhs) const
 Component-wise subtraction of two matrices. More...
 
MatrixNoperator-= (const Matrix33 &rhs)
 Component-wise subtraction of two matrices. More...
 
Matrix33 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...
 
Matrix33 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...
 
Matrix33 operator* (const Matrix33 &rhs) const
 Compute the matrix product. More...
 
MatrixNoperator*= (const Matrix33 &rhs)
 Compute the matrix product. More...
 
Matrix33 operator/ (const Matrix33 &rhs) const
 
MatrixNoperator/= (const Matrix33 &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. 3. 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< Matrix33, float, 3 >
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 [3][3]
 Matrix elements. More...
 

Static Public Attributes

static const Matrix33 IDENTITY
 

Vector Transformations

Vector3 multiply (const Vector3 &v) const
 Return the product of this matrix and a 3D vector. More...
 
Vector2 transformPoint (const Vector2 &v) const
 Transform the given 2D point. More...
 
Vector2 transformVector (const Vector2 &v) const
 Transform the given 2D direction vector. More...
 
Vector3 transformNormal (const Vector3 &v) const
 Transform the given 3D normal vector. More...
 
static Matrix33 createTranslation (const Vector2 &v)
 Create a translation matrix. More...
 
static Matrix33 createScale (const Vector2 &v)
 Create a scale matrix. More...
 
static Matrix33 createRotation (float angle)
 

Additional Inherited Members

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

Detailed Description

template<class T>
class Matrix33< T >

3x3 transformation matrix

A 3x3 matrix of floating-point values.

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

Definition at line 318 of file ImathMatrix.h.

Member Typedef Documentation

template<class T>
typedef T Matrix33< 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 652 of file ImathMatrix.h.

template<class T>
typedef Vec3<T> Matrix33< T >::BaseVecType

The base vector type.

Definition at line 655 of file ImathMatrix.h.

Constructor & Destructor Documentation

template<class T>
IMATH_HOSTDEVICE Matrix33< T >::Matrix33 ( Uninitialized  )
inline

Uninitialized.

Definition at line 340 of file ImathMatrix.h.

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

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

Definition at line 1740 of file ImathMatrix.h.

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

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

Definition at line 1753 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33< T >::Matrix33 ( const T  a[3][3])
inline

Construct from 3x3 array a[0][0] a[0][1] a[0][2] a[1][0] a[1][1] a[1][2] a[2][0] a[2][1] a[2][2]

Definition at line 1766 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix33< T >::Matrix33 ( T  a,
T  b,
T  c,
T  d,
T  e,
T  f,
T  g,
T  h,
T  i 
)
inline

Construct from given scalar values a b c d e f g h i

Definition at line 1784 of file ImathMatrix.h.

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

Copy constructor.

Definition at line 1798 of file ImathMatrix.h.

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

Construct from Matrix33 of another base type.

Definition at line 1817 of file ImathMatrix.h.

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

Destructor.

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

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

Definition at line 399 of file ImathMatrix.h.

template<class T>
Matrix33< T >::Matrix33 ( )
default
template<class T>
Matrix33< T >::Matrix33 ( float  m00,
float  m01,
float  m02,
float  m10,
float  m11,
float  m12,
float  m20,
float  m21,
float  m22 
)
inline

Definition at line 590 of file Types.h.

Member Function Documentation

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

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

Definition at line 644 of file ImathMatrix.h.

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

Largest possible negative value.

Definition at line 635 of file ImathMatrix.h.

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

Largest possible positive value.

Definition at line 638 of file ImathMatrix.h.

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

Smallest possible positive value.

Definition at line 641 of file ImathMatrix.h.

template<class T>
static Matrix33 Matrix33< T >::createRotation ( float  angle)
static

Create a rotation matrix.

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

Create a scale matrix.

template<class T>
static Matrix33 Matrix33< T >::createTranslation ( const Vector2 v)
static

Create a translation matrix.

template<class T >
IMATH_HOSTDEVICE constexpr T Matrix33< T >::determinant ( ) const
inline

Determinant.

Definition at line 2760 of file ImathMatrix.h.

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

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

Definition at line 649 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Matrix33< T >::equalWithAbsError ( const Matrix33< 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 1965 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Matrix33< T >::equalWithRelError ( const Matrix33< 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 1977 of file ImathMatrix.h.

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

Build a minor using the specified rows and columns.

Definition at line 2753 of file ImathMatrix.h.

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

Return the adjugate of the matrix.

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

Return the determinant of the matrix.

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

Return the inverse of the matrix.

Definition at line 613 of file Types.h.

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

Return the transpose of the matrix.

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

Return a raw pointer to the array of values.

Definition at line 1868 of file ImathMatrix.h.

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

Return a raw pointer to the array of values.

Definition at line 1875 of file ImathMatrix.h.

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

Return the value in v

Definition at line 1883 of file ImathMatrix.h.

template<class T >
Matrix33< T > Matrix33< 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 2307 of file ImathMatrix.h.

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

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

Definition at line 2411 of file ImathMatrix.h.

template<class T >
const Matrix33< T > & Matrix33< 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 2291 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE const Matrix33< T > & Matrix33< 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 2299 of file ImathMatrix.h.

template<class T >
IMATH_CONSTEXPR14 Matrix33< T > Matrix33< 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 2525 of file ImathMatrix.h.

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

Return the inverse using the determinant, leaving this unmodified.

Definition at line 2636 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33< T > & Matrix33< 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 2509 of file ImathMatrix.h.

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

Invert in place using the determinant.

Returns
const reference to this

Definition at line 2517 of file ImathMatrix.h.

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

Set to the identity matrix.

Definition at line 1932 of file ImathMatrix.h.

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

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

Definition at line 2741 of file ImathMatrix.h.

template<class T >
template<class S >
IMATH_HOSTDEVICE void Matrix33< T >::multDirMatrix ( const Vec2< S > &  src,
Vec2< 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 2222 of file ImathMatrix.h.

template<class T>
Vector3 Matrix33< T >::multiply ( const Vector3 v) const

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

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

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

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

Definition at line 2207 of file ImathMatrix.h.

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

Component-wise multiplication by -1.

Definition at line 2102 of file ImathMatrix.h.

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

Inequality.

Definition at line 1956 of file ImathMatrix.h.

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

Component-wise multiplication.

Definition at line 2136 of file ImathMatrix.h.

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

Matrix-matrix multiplication.

Definition at line 2183 of file ImathMatrix.h.

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

Component-wise multiplication.

Definition at line 2119 of file ImathMatrix.h.

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

Matrix-matrix multiplication.

Definition at line 2159 of file ImathMatrix.h.

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

Component-wise addition.

Definition at line 2023 of file ImathMatrix.h.

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

Component-wise addition.

Definition at line 1989 of file ImathMatrix.h.

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

Component-wise addition.

Definition at line 2006 of file ImathMatrix.h.

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

Component-wise subtraction.

Definition at line 2072 of file ImathMatrix.h.

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

Component-wise multiplication by -1.

Definition at line 2087 of file ImathMatrix.h.

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

Component-wise subtraction.

Definition at line 2038 of file ImathMatrix.h.

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

Component-wise subtraction.

Definition at line 2055 of file ImathMatrix.h.

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

Component-wise division.

Definition at line 2252 of file ImathMatrix.h.

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

Component-wise division.

Definition at line 2235 of file ImathMatrix.h.

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

Assignment operator.

Definition at line 1832 of file ImathMatrix.h.

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

Assignment from scalar.

Definition at line 1852 of file ImathMatrix.h.

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

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

Definition at line 408 of file ImathMatrix.h.

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

Equality.

Definition at line 1947 of file ImathMatrix.h.

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

Row access.

Definition at line 1726 of file ImathMatrix.h.

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

Row access.

Definition at line 1733 of file ImathMatrix.h.

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

Definition at line 2795 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33& Matrix33< T >::scale ( const Vec2< S > &  s)

Scale the matrix by s

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

Definition at line 2851 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE const Matrix33& Matrix33< T >::setRotation ( S  r)

Set matrix to rotation by r (in radians)

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE const Matrix33<T>& Matrix33< T >::setRotation ( S  r)
inline

Definition at line 2770 of file ImathMatrix.h.

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

Set matrix to scale by given uniform factor

Returns
const referenced to this

Definition at line 2803 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33& Matrix33< T >::setScale ( const Vec2< 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 Matrix33<T>& Matrix33< T >::setScale ( const Vec2< S > &  s)
inline

Definition at line 2827 of file ImathMatrix.h.

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

Set matrix to shear x for each y coord. by given factor xy

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33& Matrix33< T >::setShear ( const Vec2< S > &  h)

Set matrix to shear x for each y coord. by given factor h.x and to shear y for each x coord. by given factor h.y

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33<T>& Matrix33< T >::setShear ( const S xy)
inline

Definition at line 2906 of file ImathMatrix.h.

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

Definition at line 2926 of file ImathMatrix.h.

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

Set the value.

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

Definition at line 1916 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33& Matrix33< T >::setTranslation ( const Vec2< 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 Matrix33<T>& Matrix33< T >::setTranslation ( const Vec2< S > &  t)
inline

Definition at line 2867 of file ImathMatrix.h.

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

Set the value.

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

Definition at line 1899 of file ImathMatrix.h.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33& Matrix33< T >::shear ( const S xy)

Shear the matrix in x for each y coord. by given factor xy

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33& Matrix33< T >::shear ( const Vec2< S > &  h)

Shear the matrix in x for each y coord. by given factor xy and shear y for each x coord. by given factor yx

Returns
const referenced to this
template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33<T>& Matrix33< T >::shear ( const S xy)
inline

Definition at line 2946 of file ImathMatrix.h.

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

Definition at line 2964 of file ImathMatrix.h.

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

Transform the given 3D normal vector.

template<class T>
Vector2 Matrix33< T >::transformPoint ( const Vector2 v) const

Transform the given 2D point.

template<class T>
Vector2 Matrix33< T >::transformVector ( const Vector2 v) const

Transform the given 2D direction vector.

template<class T>
template<class S >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix33& Matrix33< T >::translate ( const Vec2< S > &  t)

Translate the matrix by t

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

Definition at line 2894 of file ImathMatrix.h.

template<class T >
IMATH_HOSTDEVICE constexpr Vec2< T > Matrix33< T >::translation ( ) const
inline

Return the translation component.

Definition at line 2886 of file ImathMatrix.h.

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

Transpose.

Definition at line 2267 of file ImathMatrix.h.

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

Return the transpose.

Definition at line 2276 of file ImathMatrix.h.

Member Data Documentation

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

Definition at line 647 of file Types.h.

template<class T>
T Matrix33< T >::x[3][3]

Matrix elements.

Definition at line 326 of file ImathMatrix.h.


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