Jump to content
  • Advertisement
Sign in to follow this  
Bruno

matrix multiplication

This topic is 4748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
This is an ordinary matrix multiplication operation; the three loops are just a slick way to multiply everything.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!