HDK
|
#include <ImathMatrix.h>
Public Types | |
typedef T | BaseType |
typedef Vec2< T > | BaseVecType |
The base vector type. More... | |
Public Member Functions | |
IMATH_HOSTDEVICE T * | operator[] (int i) IMATH_NOEXCEPT |
Row access. More... | |
IMATH_HOSTDEVICE const T * | operator[] (int i) const IMATH_NOEXCEPT |
Row access. More... | |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22< T > & | setValue (const Matrix22< S > &v) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22< T > & | setTheMatrix (const Matrix22< S > &v) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE const Matrix22< T > & | setRotation (S r) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22< T > & | rotate (S r) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22< T > & | setScale (const Vec2< S > &s) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22< T > & | scale (const Vec2< S > &s) IMATH_NOEXCEPT |
Constructors and Assignment | |
IMATH_HOSTDEVICE | Matrix22 (Uninitialized) IMATH_NOEXCEPT |
Uninitialized. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Matrix22 () IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Matrix22 (T a) IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Matrix22 (const T a[2][2]) IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Matrix22 (T a, T b, T c, T d) IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Matrix22 (const Matrix22 &v) IMATH_NOEXCEPT |
Copy constructor. More... | |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Matrix22 (const Matrix22< S > &v) IMATH_NOEXCEPT |
Construct from Matrix22 of another base type. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator= (const Matrix22 &v) IMATH_NOEXCEPT |
Assignment. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator= (T a) IMATH_NOEXCEPT |
Assignment from scalar. More... | |
~Matrix22 () IMATH_NOEXCEPT=default | |
Destructor. More... | |
Interoperability with other matrix types | |
template<typename M , IMATH_ENABLE_IF(has_double_subscript< M, T, 2, 2 >::value) > | |
IMATH_HOSTDEVICE | Matrix22 (const M &m) |
template<typename M , IMATH_ENABLE_IF(has_double_subscript< M, T, 2, 2 >::value) > | |
IMATH_HOSTDEVICE const Matrix22 & | operator= (const M &m) |
Compatibility with Sb | |
IMATH_HOSTDEVICE T * | getValue () IMATH_NOEXCEPT |
Return a raw pointer to the array of values. More... | |
IMATH_HOSTDEVICE const T * | getValue () const IMATH_NOEXCEPT |
Return a raw pointer to the array of values. More... | |
template<class S > | |
IMATH_HOSTDEVICE void | getValue (Matrix22< S > &v) const IMATH_NOEXCEPT |
Return the value in v More... | |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22 & | setValue (const Matrix22< S > &v) IMATH_NOEXCEPT |
Set the value. More... | |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22 & | setTheMatrix (const Matrix22< S > &v) IMATH_NOEXCEPT |
Set the value. More... | |
Arithmetic and Comparison | |
IMATH_HOSTDEVICE constexpr bool | operator== (const Matrix22 &v) const IMATH_NOEXCEPT |
Equality. More... | |
IMATH_HOSTDEVICE constexpr bool | operator!= (const Matrix22 &v) const IMATH_NOEXCEPT |
Inequality. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | equalWithAbsError (const Matrix22< T > &v, T e) const IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | equalWithRelError (const Matrix22< T > &v, T e) const IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator+= (const Matrix22 &v) IMATH_NOEXCEPT |
Component-wise addition. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator+= (T a) IMATH_NOEXCEPT |
Component-wise addition. More... | |
IMATH_HOSTDEVICE constexpr Matrix22 | operator+ (const Matrix22 &v) const IMATH_NOEXCEPT |
Component-wise addition. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator-= (const Matrix22 &v) IMATH_NOEXCEPT |
Component-wise subtraction. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator-= (T a) IMATH_NOEXCEPT |
Component-wise subtraction. More... | |
IMATH_HOSTDEVICE constexpr Matrix22 | operator- (const Matrix22 &v) const IMATH_NOEXCEPT |
Component-wise subtraction. More... | |
IMATH_HOSTDEVICE constexpr Matrix22 | operator- () const IMATH_NOEXCEPT |
Component-wise multiplication by -1. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | negate () IMATH_NOEXCEPT |
Component-wise multiplication by -1. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator*= (T a) IMATH_NOEXCEPT |
Component-wise multiplication. More... | |
IMATH_HOSTDEVICE constexpr Matrix22 | operator* (T a) const IMATH_NOEXCEPT |
Component-wise multiplication. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator/= (T a) IMATH_NOEXCEPT |
Component-wise division. More... | |
IMATH_HOSTDEVICE constexpr Matrix22 | operator/ (T a) const IMATH_NOEXCEPT |
Component-wise division. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | operator*= (const Matrix22 &v) IMATH_NOEXCEPT |
Matrix-matrix multiplication. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22 | operator* (const Matrix22 &v) const IMATH_NOEXCEPT |
Matrix-matrix multiplication. More... | |
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. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | transpose () IMATH_NOEXCEPT |
Transpose. More... | |
IMATH_HOSTDEVICE constexpr Matrix22 | transposed () const IMATH_NOEXCEPT |
Return the transpose. More... | |
IMATH_CONSTEXPR14 const Matrix22 & | invert (bool singExc) |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | invert () IMATH_NOEXCEPT |
IMATH_CONSTEXPR14 Matrix22< T > | inverse (bool singExc) const |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22< T > | inverse () const IMATH_NOEXCEPT |
Return the inverse, leaving this unmodified. More... | |
IMATH_HOSTDEVICE constexpr T | determinant () const IMATH_NOEXCEPT |
Determinant. More... | |
template<class S > | |
IMATH_HOSTDEVICE const Matrix22 & | setRotation (S r) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | rotate (S r) IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | setScale (T s) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | setScale (const Vec2< S > &s) IMATH_NOEXCEPT |
template<class S > | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22 & | scale (const Vec2< S > &s) IMATH_NOEXCEPT |
Static Public Member Functions | |
IMATH_HOSTDEVICE static constexpr unsigned int | dimensions () IMATH_NOEXCEPT |
Return the number of the row and column dimensions, i.e. 2. 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... | |
Public Attributes | |
Direct access to elements | |
T | x [2][2] |
Matrix elements. More... | |
2x2 transformation matrix
Definition at line 45 of file ImathMatrix.h.
The base type: In templates that accept a parameter V
, you can refer to T
as V::BaseType
Definition at line 308 of file ImathMatrix.h.
typedef Vec2<T> Matrix22< T >::BaseVecType |
The base vector type.
Definition at line 311 of file ImathMatrix.h.
|
inline |
Uninitialized.
Definition at line 67 of file ImathMatrix.h.
|
inline |
|
inline |
|
inline |
Construct from 2x2 array:
a[0][0] a[0][1] a[1][0] a[1][1]
Definition at line 1176 of file ImathMatrix.h.
|
inline |
Copy constructor.
Definition at line 1196 of file ImathMatrix.h.
|
inlineexplicit |
Construct from Matrix22 of another base type.
Definition at line 1210 of file ImathMatrix.h.
|
inlineexplicit |
Definition at line 126 of file ImathMatrix.h.
|
inlinestatic |
Smallest possible e for which 1+e != 1.
Definition at line 299 of file ImathMatrix.h.
|
inlinestatic |
Largest possible negative value.
Definition at line 290 of file ImathMatrix.h.
|
inlinestatic |
Largest possible positive value.
Definition at line 293 of file ImathMatrix.h.
|
inlinestatic |
Smallest possible positive value.
Definition at line 296 of file ImathMatrix.h.
|
inline |
Determinant.
Definition at line 1636 of file ImathMatrix.h.
|
inlinestatic |
Return the number of the row and column dimensions, i.e. 2.
Definition at line 304 of file ImathMatrix.h.
|
inline |
Compare two matrices and test if they are "approximately equal":
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 1321 of file ImathMatrix.h.
|
inline |
Compare two matrices and test if they are "approximately equal":
abs (this[i] - v[i][j]) <= e * abs (this[i][j])
Definition at line 1333 of file ImathMatrix.h.
|
inline |
Return a raw pointer to the array of values.
Definition at line 1246 of file ImathMatrix.h.
|
inline |
Return a raw pointer to the array of values.
Definition at line 1253 of file ImathMatrix.h.
|
inline |
Return the value in v
Definition at line 1261 of file ImathMatrix.h.
|
inline |
Return the inverse, leaving this unmodified.
singExc | If true, throw an exception if the matrix cannot be inverted. |
Definition at line 1553 of file ImathMatrix.h.
|
inline |
Return the inverse, leaving this unmodified.
Definition at line 1596 of file ImathMatrix.h.
|
inline |
Invert in place
singExc | If true, throw an exception if the matrix cannot be inverted. |
Definition at line 1537 of file ImathMatrix.h.
|
inline |
Set to the identity.
Definition at line 1295 of file ImathMatrix.h.
|
inline |
Vector * matrix multiplication
[in] | src | Input vector |
[out] | dst | transformed vector |
Definition at line 1489 of file ImathMatrix.h.
|
inline |
Component-wise multiplication by -1.
Definition at line 1420 of file ImathMatrix.h.
|
inline |
Inequality.
Definition at line 1313 of file ImathMatrix.h.
|
inline |
Component-wise multiplication.
Definition at line 1444 of file ImathMatrix.h.
|
inline |
Matrix-matrix multiplication.
Definition at line 1474 of file ImathMatrix.h.
|
inline |
Component-wise multiplication.
Definition at line 1432 of file ImathMatrix.h.
|
inline |
Matrix-matrix multiplication.
Definition at line 1459 of file ImathMatrix.h.
|
inline |
Component-wise addition.
Definition at line 1369 of file ImathMatrix.h.
|
inline |
Component-wise addition.
Definition at line 1345 of file ImathMatrix.h.
|
inline |
Component-wise addition.
Definition at line 1357 of file ImathMatrix.h.
|
inline |
Component-wise subtraction.
Definition at line 1403 of file ImathMatrix.h.
|
inline |
Component-wise multiplication by -1.
Definition at line 1413 of file ImathMatrix.h.
|
inline |
Component-wise subtraction.
Definition at line 1379 of file ImathMatrix.h.
|
inline |
Component-wise subtraction.
Definition at line 1391 of file ImathMatrix.h.
|
inline |
Component-wise division.
Definition at line 1514 of file ImathMatrix.h.
|
inline |
Component-wise division.
Definition at line 1502 of file ImathMatrix.h.
|
inline |
Assignment.
Definition at line 1220 of file ImathMatrix.h.
|
inline |
Assignment from scalar.
Definition at line 1235 of file ImathMatrix.h.
|
inline |
Definition at line 131 of file ImathMatrix.h.
|
inline |
Equality.
Definition at line 1305 of file ImathMatrix.h.
|
inline |
Row access.
Definition at line 1148 of file ImathMatrix.h.
|
inline |
Row access.
Definition at line 1155 of file ImathMatrix.h.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22& Matrix22< T >::rotate | ( | S | r | ) |
Rotate the given matrix by r (in radians)
|
inline |
Definition at line 1663 of file ImathMatrix.h.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22& Matrix22< T >::scale | ( | const Vec2< S > & | s | ) |
|
inline |
Definition at line 1709 of file ImathMatrix.h.
IMATH_HOSTDEVICE const Matrix22& Matrix22< T >::setRotation | ( | S | r | ) |
Set matrix to rotation by r (in radians)
|
inline |
Definition at line 1644 of file ImathMatrix.h.
Set matrix to scale by given uniform factor
Definition at line 1671 of file ImathMatrix.h.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Matrix22& Matrix22< T >::setScale | ( | const Vec2< S > & | s | ) |
Set matrix to scale by given vector
|
inline |
Definition at line 1690 of file ImathMatrix.h.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22& Matrix22< T >::setTheMatrix | ( | const Matrix22< S > & | v | ) |
Set the value.
|
inline |
Definition at line 1284 of file ImathMatrix.h.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Matrix22& Matrix22< T >::setValue | ( | const Matrix22< S > & | v | ) |
Set the value.
|
inline |
Definition at line 1272 of file ImathMatrix.h.
|
inline |
Transpose.
Definition at line 1521 of file ImathMatrix.h.
|
inline |
Return the transpose.
Definition at line 1530 of file ImathMatrix.h.
Matrix elements.
Definition at line 53 of file ImathMatrix.h.