matrix4
Fully qualified name: omni::math::linalg::matrix4
- 
template<typename T>
 class matrix4 : public omni::math::linalg::base_matrix<T, 4>
 
- 
Public Functions 
- 
matrix4() = default
 
 
- 
constexpr matrix4(const this_type&) = default
 
 
- 
constexpr this_type &operator=(const this_type&) = default
 
 
- 
inline matrix4(const base_type &other)
 
 
- 
template<typename OTHER_T>
 inline explicit matrix4(
- const matrix4<OTHER_T> &other,
 )
 
 
- 
inline matrix4(
- T v00,
- T v01,
- T v02,
- T v03,
- T v10,
- T v11,
- T v12,
- T v13,
- T v20,
- T v21,
- T v22,
- T v23,
- T v30,
- T v31,
- T v32,
- T v33,
 )
 
 
- 
inline matrix4(
- const usdrt::GfRotation &rotate,
- const vec3<T> &translate,
 )
 
 
- 
inline matrix4(
- const matrix3<T> &rotmx,
- const vec3<T> &translate,
 )
 
 
- 
inline this_type &Set(const T m[numRows][numColumns])
 
 
- 
inline this_type &Set(
- T v00,
- T v01,
- T v02,
- T v03,
- T v10,
- T v11,
- T v12,
- T v13,
- T v20,
- T v21,
- T v22,
- T v23,
- T v30,
- T v31,
- T v32,
- T v33,
 )
 
 
- 
inline this_type &SetIdentity()
 
 
- 
inline this_type &SetZero()
 
 
- 
inline this_type &SetDiagonal(T scalar)
 
 
- 
inline this_type &SetDiagonal(
- const base_vec<T, numRows> &diagonal,
 )
 
 
- 
inline this_type GetTranspose() const
 
 
- 
inline this_type GetInverse(T *det = nullptr, T epsilon = T(0)) const
 
 
- 
inline T GetDeterminant() const
 
 
- 
inline T GetDeterminant3() const
 
 
- 
inline int GetHandedness() const
 
 
- 
inline bool IsRightHanded() const
 
 
- 
inline bool IsLeftHanded() const
 
 
- 
inline bool Orthonormalize()
 
 
- 
inline this_type GetOrthonormalized() const
 
 
- 
inline this_type &operator*=(const base_type &other)
 
 
- 
inline this_type &operator*=(T scalar)
 
 
- 
inline this_type &operator+=(const base_type &other)
 
 
- 
inline this_type &operator-=(const base_type &other)
 
 
- 
inline this_type operator-() const
 
 
- 
inline this_type &SetScale(T scale)
 
 
- 
inline this_type &SetScale(const vec3<T> &scales)
 
 
- 
inline this_type &SetTransform(
- const usdrt::GfRotation &rot,
- const vec3<T> &translate,
 )
 
 
- 
inline this_type &SetTransform(
- const matrix3<T> &rot,
- const vec3<T> &translate,
 )
 
 
- 
inline this_type RemoveScaleShear() const
 
 
- 
inline this_type &SetRotate(const usdrt::GfRotation &rotation)
 
 
- 
inline this_type &SetRotateOnly(const usdrt::GfRotation &rotation)
 
 
- 
inline this_type &SetRotate(const quat<double> &rotation)
 
 
- 
inline this_type &SetRotateOnly(const quat<double> &rotation)
 
 
- 
inline this_type &SetRotate(const matrix3<T> &m3)
 
 
- 
inline this_type &SetRotateOnly(const matrix3<T> &m3)
 
 
- 
inline this_type &SetTranslate(const vec3<T> &translation)
 
 
- 
inline this_type &SetTranslateOnly(const vec3<T> &translation)
 
 
- 
inline void SetRow3(size_t rowIndex, const vec3<T> &rowValues)
 
 
- 
inline vec3<T> GetRow3(size_t rowIndex) const
 
 
- 
inline this_type &SetLookAt(
- const vec3<T> &cameraPosition,
- const vec3<T> &focusPosition,
- const vec3<T> &upDirection,
 )
 
 
- 
inline this_type &SetLookAt(
- const vec3<T> &cameraPosition,
- const quat<double> &orientation,
 )
 
 
- 
template<typename R>
 inline this_type &SetLookAt(
- const vec3<T> &cameraPosition,
- const R &orientation,
 )
 
 
- 
bool Factor(
- this_type *r,
- vec3<T> *s,
- this_type *u,
- vec3<T> *t,
- this_type *p,
- float eps = 1e-10,
 ) const
 
 
 
 
 
- 
template<typename R>
 inline vec3<T> DecomposeRotation(
- const vec3<T> &axis0,
- const vec3<T> &axis1,
- const vec3<T> &axis2,
 ) const
 
 
 
- 
template<typename OTHER_T>
 inline vec3<OTHER_T> Transform(
- const vec3<OTHER_T> &u,
 ) const
 
 
- 
template<typename OTHER_T>
 inline vec3<OTHER_T> TransformDir(
- const vec3<OTHER_T> &u,
 ) const
 
 
- 
template<typename OTHER_T>
 inline vec3<OTHER_T> TransformAffine(
- const vec3<OTHER_T> &u,
 ) const
 
 
- 
inline void SetRow(
- size_t rowIndex,
- const base_vec<T, N> &rowValues,
 )
 
 
- 
inline void SetColumn(
- size_t colIndex,
- const base_vec<T, N> &colValues,
 )
 
 
- 
inline base_vec<T, N> GetRow(size_t rowIndex) const
 
 
- 
inline base_vec<T, N> GetColumn(size_t colIndex) const
 
 
- 
inline base_matrix<T, N> &Set(const T m[N][N])
 
 
- 
inline base_matrix<T, N> &SetDiagonal(
- const base_vec<T, N> &diagonal,
 )
 
 
- 
inline T *Get(T m[N][N]) const
 
 
- 
inline T *data()
 
 
- 
inline const T *data() const
 
 
- 
inline T *GetArray()
 
 
- 
inline const T *GetArray() const
 
 
- 
inline T *operator[](size_t row)
 
 
- 
inline const T *operator[](size_t row) const
 
 
- 
inline bool operator==(const base_matrix<T, N> &other) const
 
 
- 
inline bool operator==(const base_matrix<OTHER_T, N> &other) const
 
 
- 
inline bool operator!=(const base_matrix<T, N> &other) const
 
 
- 
inline bool operator!=(const base_matrix<OTHER_T, N> &other) const
 
 
- 
inline base_matrix<T, N> &operator*=(
- const base_matrix<T, N> &other,
 )
 
 
- 
inline base_matrix<T, N> &operator+=(
- const base_matrix<T, N> &other,
 )
 
 
- 
inline base_matrix<T, N> &operator-=(
- const base_matrix<T, N> &other,
 )
 
 
 
Public Static Attributes 
- 
static const size_t numRows
 
 
- 
static const size_t numColumns
 
 
 
Protected Attributes 
- 
T v[N][N]