PxMat44T

Defined in include/foundation/PxMat44.h

template<class Type>
class PxMat44T

4x4 matrix class

This class is layout-compatible with D3D and OpenGL matrices. More notes on layout are given in the PxMat33

See also

PxMat33 PxTransform

Public Functions

inline PxMat44T()

Default constructor.

inline PxMat44T(PxIDENTITY)

identity constructor

inline PxMat44T(PxZERO)

zero constructor

inline PxMat44T(const PxVec4T<Type> &col0, const PxVec4T<Type> &col1, const PxVec4T<Type> &col2, const PxVec4T<Type> &col3)

Construct from four 4-vectors.

inline explicit PxMat44T(Type r)

constructor that generates a multiple of the identity matrix

inline PxMat44T(const PxVec3T<Type> &col0, const PxVec3T<Type> &col1, const PxVec3T<Type> &col2, const PxVec3T<Type> &col3)

Construct from three base vectors and a translation.

inline explicit PxMat44T(Type values[])

Construct from Type[16].

inline explicit PxMat44T(const PxQuatT<Type> &q)

Construct from a quaternion.

inline explicit PxMat44T(const PxVec4T<Type> &diagonal)

Construct from a diagonal vector.

inline PxMat44T(const PxMat33T<Type> &axes, const PxVec3T<Type> &position)

Construct from Mat33 and a translation.

inline PxMat44T(const PxTransform &t)
inline bool operator==(const PxMat44T &m) const

returns true if the two matrices are exactly equal

inline PxMat44T(const PxMat44T &other)

Copy constructor.

inline PxMat44T &operator=(const PxMat44T &other)

Assignment operator.

inline const PxMat44T getTranspose() const

Get transposed matrix.

inline const PxMat44T operator-() const

Unary minus.

inline const PxMat44T operator+(const PxMat44T &other) const

Add.

inline const PxMat44T operator-(const PxMat44T &other) const

Subtract.

inline const PxMat44T operator*(Type scalar) const

Scalar multiplication.

inline const PxMat44T operator*(const PxMat44T &other) const

Matrix multiplication.

inline PxMat44T &operator+=(const PxMat44T &other)

Equals-add.

inline PxMat44T &operator-=(const PxMat44T &other)

Equals-sub.

inline PxMat44T &operator*=(Type scalar)

Equals scalar multiplication.

inline PxMat44T &operator*=(const PxMat44T &other)

Equals matrix multiplication.

inline Type operator()(PxU32 row, PxU32 col) const

Element access, mathematical way!

inline Type &operator()(PxU32 row, PxU32 col)

Element access, mathematical way!

inline const PxVec4T<Type> transform(const PxVec4T<Type> &other) const

Transform vector by matrix, equal to v’ = M*v.

inline const PxVec3T<Type> transform(const PxVec3T<Type> &other) const

Transform vector by matrix, equal to v’ = M*v.

inline const PxVec4T<Type> rotate(const PxVec4T<Type> &other) const

Rotate vector by matrix, equal to v’ = M*v.

inline const PxVec3T<Type> rotate(const PxVec3T<Type> &other) const

Rotate vector by matrix, equal to v’ = M*v.

inline const PxVec3T<Type> getBasis(PxU32 num) const
inline const PxVec3T<Type> getPosition() const
inline void setPosition(const PxVec3T<Type> &position)
inline const Type *front() const
inline PxVec4T<Type> &operator[](PxU32 num)
inline const PxVec4T<Type> &operator[](PxU32 num) const
inline void scale(const PxVec4T<Type> &p)
inline const PxMat44T inverseRT(void) const
inline bool isFinite() const

Public Members

PxVec4T<Type> column0
PxVec4T<Type> column1
PxVec4T<Type> column2
PxVec4T<Type> column3

Friends

template<class Type2>
friend PxMat44T<Type2> operator*(Type2, const PxMat44T<Type2>&)