Atoms Crowd
7.0.0
|
#include <ImathMatrix.h>
Public Types | |
typedef T | BaseType |
typedef Vec2< T > | BaseVecType |
The base vector type. | |
Public Member Functions | |
ATOMSMATH_HOSTDEVICE T * | operator[] (int i) noexcept |
Row access. | |
ATOMSMATH_HOSTDEVICE const T * | operator[] (int i) const noexcept |
Row access. | |
template<class S > | |
ATOMSMATH_CONSTEXPR14 | Matrix22 (const Matrix22< S > &v) noexcept |
template<class S > | |
void | getValue (Matrix22< S > &v) const noexcept |
template<class S > | |
ATOMSMATH_CONSTEXPR14 Matrix22< T > & | setValue (const Matrix22< S > &v) noexcept |
template<class S > | |
ATOMSMATH_CONSTEXPR14 Matrix22< T > & | setTheMatrix (const Matrix22< S > &v) noexcept |
template<class S > | |
void | multDirMatrix (const Vec2< S > &src, Vec2< S > &dst) const noexcept |
template<class S > | |
const Matrix22< T > & | setRotation (S r) noexcept |
template<class S > | |
ATOMSMATH_CONSTEXPR14 const Matrix22< T > & | rotate (S r) noexcept |
template<class S > | |
ATOMSMATH_CONSTEXPR14 const Matrix22< T > & | setScale (const Vec2< S > &s) noexcept |
template<class S > | |
ATOMSMATH_CONSTEXPR14 const Matrix22< T > & | scale (const Vec2< S > &s) noexcept |
Constructors and Assignment | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Matrix22 () noexcept |
Uninitialized. More... | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Matrix22 (T a) noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Matrix22 (const T a[2][2]) noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Matrix22 (T a, T b, T c, T d) noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Matrix22 (const Matrix22 &v) noexcept |
Copy constructor. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Matrix22 (const Matrix22< S > &v) noexcept |
Construct from Matrix22 of another base type. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator= (const Matrix22 &v) noexcept |
Assignment. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator= (T a) noexcept |
Assignment from scalar. | |
~Matrix22 () noexcept=default | |
Destructor. | |
Compatibility with Sb | |
ATOMSMATH_HOSTDEVICE T * | getValue () noexcept |
Return a raw pointer to the array of values. | |
ATOMSMATH_HOSTDEVICE const T * | getValue () const noexcept |
Return a raw pointer to the array of values. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE void | getValue (Matrix22< S > &v) const noexcept |
Return the value in v | |
template<class S > | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Matrix22 & | setValue (const Matrix22< S > &v) noexcept |
Set the value. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Matrix22 & | setTheMatrix (const Matrix22< S > &v) noexcept |
Set the value. | |
Arithmetic and Comparison | |
constexpr ATOMSMATH_HOSTDEVICE bool | operator== (const Matrix22 &v) const noexcept |
Equality. | |
constexpr ATOMSMATH_HOSTDEVICE bool | operator!= (const Matrix22 &v) const noexcept |
Inequality. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | equalWithAbsError (const Matrix22< T > &v, T e) const noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | equalWithRelError (const Matrix22< T > &v, T e) const noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator+= (const Matrix22 &v) noexcept |
Component-wise addition. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator+= (T a) noexcept |
Component-wise addition. | |
constexpr ATOMSMATH_HOSTDEVICE Matrix22 | operator+ (const Matrix22 &v) const noexcept |
Component-wise addition. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator-= (const Matrix22 &v) noexcept |
Component-wise subtraction. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator-= (T a) noexcept |
Component-wise subtraction. | |
constexpr ATOMSMATH_HOSTDEVICE Matrix22 | operator- (const Matrix22 &v) const noexcept |
Component-wise subtraction. | |
constexpr ATOMSMATH_HOSTDEVICE Matrix22 | operator- () const noexcept |
Component-wise multiplication by -1. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | negate () noexcept |
Component-wise multiplication by -1. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator*= (T a) noexcept |
Component-wise multiplication. | |
constexpr ATOMSMATH_HOSTDEVICE Matrix22 | operator* (T a) const noexcept |
Component-wise multiplication. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator/= (T a) noexcept |
Component-wise division. | |
constexpr ATOMSMATH_HOSTDEVICE Matrix22 | operator/ (T a) const noexcept |
Component-wise division. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | operator*= (const Matrix22 &v) noexcept |
Matrix-matrix multiplication. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Matrix22 | operator* (const Matrix22 &v) const noexcept |
Matrix-matrix multiplication. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE void | multDirMatrix (const Vec2< S > &src, Vec2< S > &dst) const noexcept |
Maniplation | |
ATOMSMATH_HOSTDEVICE void | makeIdentity () noexcept |
Set to the identity. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | transpose () noexcept |
Transpose. | |
constexpr ATOMSMATH_HOSTDEVICE Matrix22 | transposed () const noexcept |
Return the transpose. | |
ATOMSMATH_CONSTEXPR14 const Matrix22 & | invert (bool singExc) |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | invert () noexcept |
ATOMSMATH_CONSTEXPR14 Matrix22< T > | inverse (bool singExc) const |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Matrix22< T > | inverse () const noexcept |
Return the inverse, leaving this unmodified. | |
constexpr ATOMSMATH_HOSTDEVICE T | determinant () const noexcept |
Determinant. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE const Matrix22 & | setRotation (S r) noexcept |
template<class S > | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | rotate (S r) noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | setScale (T s) noexcept |
template<class S > | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | setScale (const Vec2< S > &s) noexcept |
template<class S > | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Matrix22 & | scale (const Vec2< S > &s) noexcept |
Static Public Member Functions | |
constexpr static ATOMSMATH_HOSTDEVICE unsigned int | dimensions () noexcept |
Return the number of the row and column dimensions, i.e. 2. | |
Numeric Limits | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeLowest () noexcept |
Largest possible negative value. | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeMax () noexcept |
Largest possible positive value. | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeSmallest () noexcept |
Smallest possible positive value. | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeEpsilon () noexcept |
Smallest possible e for which 1+e != 1. | |
Public Attributes | |
Direct access to elements | |
T | x [2][2] |
Matrix elements. | |
2x2 transformation matrix
The base type: In templates that accept a parameter V
, you can refer to T
as V::BaseType
Uninitialized.
Default constructor: initialize to identity
1 0 0 1
Initialize to scalar constant:
a a a a
Construct from 2x2 array:
a[0][0] a[0][1] a[1][0] a[1][1]
|
inlinenoexcept |
Construct from given scalar values:
a b c d
|
inlinenoexcept |
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
|
inlinenoexcept |
Compare two matrices and test if they are "approximately equal":
abs (this[i] - v[i][j]) <= e * abs (this[i][j])
|
inline |
Return the inverse, leaving this unmodified.
singExc | If true, throw an exception if the matrix cannot be inverted. |
Invert in place
|
inline |
Invert in place
singExc | If true, throw an exception if the matrix cannot be inverted. |
|
noexcept |
Vector * matrix multiplication
[in] | src | Input vector |
[out] | dst | transformed vector |
|
noexcept |
Rotate the given matrix by r (in radians)
|
noexcept |
|
noexcept |
Set matrix to rotation by r (in radians)
|
noexcept |
Set matrix to scale by given vector
|
inlinenoexcept |
Set matrix to scale by given uniform factor