matrix multiplication
Hello,
This is from the nvidia matrix class :
matrix4 & mult_right( const matrix4 & b )
{
matrix4 mt(*this);
set_value(real(0));
for(int i=0; i < 4; i++)
for(int j=0; j < 4; j++)
for(int c=0; c < 4; c++)
element(i,j) += mt(i,c) * b(c,j);
return *this;
}
matrix4 & operator *= ( const matrix4 & mat )
{
mult_right( mat );
return *this;
}
And it's used like this :
matrix4f m_matrix = P * M;
It's not a standard matrix * matrix operation, what are they doing here ?
thanks,
Bruno
This is an ordinary matrix multiplication operation; the three loops are just a slick way to multiply everything.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement