Jump to content
  • Advertisement
Sign in to follow this  

how to matrxi multiplication in C++

This topic is 4958 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

Advertisement
they dont help, i know how to multi a matrix i just want to know if u can do it in C++ without having to right the method myself

Share this post


Link to post
Share on other sites
There's are no methods in c(++) that handle 3d math specific operations, but writing your own wouldn't be so hard i'd say:

void multVector(Vertex *v, float *mat){
v->x=v->x*mat[0]+v->x*mat[1]+v->x*mat[2];
v->y=v->y*mat[4]+v->y*mat[5]+v->y*mat[6];
v->z=v->z*mat[8]+v->z*mat[9]+v->z*mat[10];
}

If that's what you mean.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!