PxMat44 Class Reference

4x4 matrix class More...

#include <PxMat44.h>

Collaboration diagram for PxMat44:

Public Member Functions

PX_CUDA_CALLABLE PX_INLINE PxMat44 ()
 Default constructor. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44 (PxIDENTITY r)
 identity constructor More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44 (PxZERO r)
 zero constructor More...
 
PX_CUDA_CALLABLE PxMat44 (const PxVec4 &col0, const PxVec4 &col1, const PxVec4 &col2, const PxVec4 &col3)
 Construct from four 4-vectors. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44 (float r)
 constructor that generates a multiple of the identity matrix More...
 
PX_CUDA_CALLABLE PxMat44 (const PxVec3 &col0, const PxVec3 &col1, const PxVec3 &col2, const PxVec3 &col3)
 Construct from three base vectors and a translation. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44 (float values[])
 Construct from float[16]. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44 (const PxQuat &q)
 Construct from a quaternion. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44 (const PxVec4 &diagonal)
 Construct from a diagonal vector. More...
 
PX_CUDA_CALLABLE PxMat44 (const PxMat33 &axes, const PxVec3 &position)
 Construct from Mat33 and a translation. More...
 
PX_CUDA_CALLABLE PxMat44 (const PxTransform &t)
 
PX_CUDA_CALLABLE PX_INLINE bool operator== (const PxMat44 &m) const
 returns true if the two matrices are exactly equal More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44 (const PxMat44 &other)
 Copy constructor. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44operator= (const PxMat44 &other)
 Assignment operator. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxMat44 getTranspose () const
 Get transposed matrix. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxMat44 operator- () const
 Unary minus. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxMat44 operator+ (const PxMat44 &other) const
 Add. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxMat44 operator- (const PxMat44 &other) const
 Subtract. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxMat44 operator* (float scalar) const
 Scalar multiplication. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxMat44 operator* (const PxMat44 &other) const
 Matrix multiplication. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44operator+= (const PxMat44 &other)
 Equals-add. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44operator-= (const PxMat44 &other)
 Equals-sub. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44operator*= (float scalar)
 Equals scalar multiplication. More...
 
PX_CUDA_CALLABLE PX_INLINE PxMat44operator*= (const PxMat44 &other)
 Equals matrix multiplication. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float operator() (unsigned int row, unsigned int col) const
 Element access, mathematical way! More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float & operator() (unsigned int row, unsigned int col)
 Element access, mathematical way! More...
 
PX_CUDA_CALLABLE PX_INLINE const PxVec4 transform (const PxVec4 &other) const
 Transform vector by matrix, equal to v' = M*v. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxVec3 transform (const PxVec3 &other) const
 Transform vector by matrix, equal to v' = M*v. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxVec4 rotate (const PxVec4 &other) const
 Rotate vector by matrix, equal to v' = M*v. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxVec3 rotate (const PxVec3 &other) const
 Rotate vector by matrix, equal to v' = M*v. More...
 
PX_CUDA_CALLABLE PX_INLINE const PxVec3 getBasis (int num) const
 
PX_CUDA_CALLABLE PX_INLINE const PxVec3 getPosition () const
 
PX_CUDA_CALLABLE PX_INLINE void setPosition (const PxVec3 &position)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE const float * front () const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec4operator[] (unsigned int num)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE const PxVec4operator[] (unsigned int num) const
 
PX_CUDA_CALLABLE PX_INLINE void scale (const PxVec4 &p)
 
PX_CUDA_CALLABLE PX_INLINE const PxMat44 inverseRT (void) const
 
PX_CUDA_CALLABLE PX_INLINE bool isFinite () const
 

Public Attributes

PxVec4 column0
 
PxVec4 column1
 
PxVec4 column2
 
PxVec4 column3
 

Friends

PxMat44 operator* (float, const PxMat44 &)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ PxMat44() [1/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( )
inline

Default constructor.

◆ PxMat44() [2/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( PxIDENTITY  r)
inline

identity constructor

References PX_UNUSED().

◆ PxMat44() [3/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( PxZERO  r)
inline

zero constructor

References PX_UNUSED().

◆ PxMat44() [4/12]

PX_CUDA_CALLABLE PxMat44::PxMat44 ( const PxVec4 col0,
const PxVec4 col1,
const PxVec4 col2,
const PxVec4 col3 
)
inline

Construct from four 4-vectors.

◆ PxMat44() [5/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( float  r)
inlineexplicit

constructor that generates a multiple of the identity matrix

◆ PxMat44() [6/12]

PX_CUDA_CALLABLE PxMat44::PxMat44 ( const PxVec3 col0,
const PxVec3 col1,
const PxVec3 col2,
const PxVec3 col3 
)
inline

Construct from three base vectors and a translation.

◆ PxMat44() [7/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( float  values[])
inlineexplicit

Construct from float[16].

◆ PxMat44() [8/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( const PxQuat q)
inlineexplicit

Construct from a quaternion.

References PxQuat::w, PxQuat::x, PxQuat::y, and PxQuat::z.

◆ PxMat44() [9/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( const PxVec4 diagonal)
inlineexplicit

Construct from a diagonal vector.

◆ PxMat44() [10/12]

PX_CUDA_CALLABLE PxMat44::PxMat44 ( const PxMat33 axes,
const PxVec3 position 
)
inline

Construct from Mat33 and a translation.

◆ PxMat44() [11/12]

PX_CUDA_CALLABLE PxMat44::PxMat44 ( const PxTransform t)
inline

References PxTransform::p, and PxTransform::q.

◆ PxMat44() [12/12]

PX_CUDA_CALLABLE PX_INLINE PxMat44::PxMat44 ( const PxMat44 other)
inline

Copy constructor.

Member Function Documentation

◆ front()

PX_CUDA_CALLABLE PX_FORCE_INLINE const float* PxMat44::front ( ) const
inline

◆ getBasis()

PX_CUDA_CALLABLE PX_INLINE const PxVec3 PxMat44::getBasis ( int  num) const
inline

References PX_SHARED_ASSERT.

◆ getPosition()

PX_CUDA_CALLABLE PX_INLINE const PxVec3 PxMat44::getPosition ( ) const
inline

◆ getTranspose()

PX_CUDA_CALLABLE PX_INLINE const PxMat44 PxMat44::getTranspose ( ) const
inline

Get transposed matrix.

◆ inverseRT()

PX_CUDA_CALLABLE PX_INLINE const PxMat44 PxMat44::inverseRT ( void  ) const
inline

References PxVec3::z.

◆ isFinite()

PX_CUDA_CALLABLE PX_INLINE bool PxMat44::isFinite ( ) const
inline

◆ operator()() [1/2]

PX_CUDA_CALLABLE PX_FORCE_INLINE float PxMat44::operator() ( unsigned int  row,
unsigned int  col 
) const
inline

Element access, mathematical way!

◆ operator()() [2/2]

PX_CUDA_CALLABLE PX_FORCE_INLINE float& PxMat44::operator() ( unsigned int  row,
unsigned int  col 
)
inline

Element access, mathematical way!

◆ operator*() [1/2]

PX_CUDA_CALLABLE PX_INLINE const PxMat44 PxMat44::operator* ( float  scalar) const
inline

Scalar multiplication.

◆ operator*() [2/2]

PX_CUDA_CALLABLE PX_INLINE const PxMat44 PxMat44::operator* ( const PxMat44 other) const
inline

Matrix multiplication.

References column0, column1, column2, and column3.

◆ operator*=() [1/2]

PX_CUDA_CALLABLE PX_INLINE PxMat44& PxMat44::operator*= ( float  scalar)
inline

Equals scalar multiplication.

◆ operator*=() [2/2]

PX_CUDA_CALLABLE PX_INLINE PxMat44& PxMat44::operator*= ( const PxMat44 other)
inline

Equals matrix multiplication.

◆ operator+()

PX_CUDA_CALLABLE PX_INLINE const PxMat44 PxMat44::operator+ ( const PxMat44 other) const
inline

Add.

References column0, column1, column2, and column3.

◆ operator+=()

PX_CUDA_CALLABLE PX_INLINE PxMat44& PxMat44::operator+= ( const PxMat44 other)
inline

Equals-add.

References column0, column1, column2, and column3.

◆ operator-() [1/2]

PX_CUDA_CALLABLE PX_INLINE const PxMat44 PxMat44::operator- ( ) const
inline

Unary minus.

◆ operator-() [2/2]

PX_CUDA_CALLABLE PX_INLINE const PxMat44 PxMat44::operator- ( const PxMat44 other) const
inline

Subtract.

References column0, column1, column2, and column3.

◆ operator-=()

PX_CUDA_CALLABLE PX_INLINE PxMat44& PxMat44::operator-= ( const PxMat44 other)
inline

Equals-sub.

References column0, column1, column2, and column3.

◆ operator=()

PX_CUDA_CALLABLE PX_INLINE PxMat44& PxMat44::operator= ( const PxMat44 other)
inline

Assignment operator.

References column0, column1, column2, and column3.

◆ operator==()

PX_CUDA_CALLABLE PX_INLINE bool PxMat44::operator== ( const PxMat44 m) const
inline

returns true if the two matrices are exactly equal

References column0, column1, column2, and column3.

◆ operator[]() [1/2]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec4& PxMat44::operator[] ( unsigned int  num)
inline

◆ operator[]() [2/2]

PX_CUDA_CALLABLE PX_FORCE_INLINE const PxVec4& PxMat44::operator[] ( unsigned int  num) const
inline

◆ rotate() [1/2]

PX_CUDA_CALLABLE PX_INLINE const PxVec4 PxMat44::rotate ( const PxVec4 other) const
inline

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

References PxVec4::x, PxVec4::y, and PxVec4::z.

◆ rotate() [2/2]

PX_CUDA_CALLABLE PX_INLINE const PxVec3 PxMat44::rotate ( const PxVec3 other) const
inline

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

◆ scale()

PX_CUDA_CALLABLE PX_INLINE void PxMat44::scale ( const PxVec4 p)
inline

References PxVec4::w, PxVec4::x, PxVec4::y, and PxVec4::z.

◆ setPosition()

PX_CUDA_CALLABLE PX_INLINE void PxMat44::setPosition ( const PxVec3 position)
inline

References PxVec3::x, PxVec3::y, and PxVec3::z.

◆ transform() [1/2]

PX_CUDA_CALLABLE PX_INLINE const PxVec4 PxMat44::transform ( const PxVec4 other) const
inline

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

References PxVec4::w, PxVec4::x, PxVec4::y, and PxVec4::z.

◆ transform() [2/2]

PX_CUDA_CALLABLE PX_INLINE const PxVec3 PxMat44::transform ( const PxVec3 other) const
inline

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

Friends And Related Function Documentation

◆ operator*

PxMat44 operator* ( float  ,
const PxMat44  
)
friend

Member Data Documentation

◆ column0

◆ column1

◆ column2

◆ column3


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