# how to matrxi multiplication in C++

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

## Recommended Posts

Hey i have 2 vectors and i was wondering how do i perform matrix muliplication on them thanks

##### Share on other sites
Just multiply it with the matrix as if it was a point but don't use the transformation column/row.

See GameDev's vectors and matrices article.

##### Share on other sites
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 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.

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 20
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633364
• Total Posts
3011516
• ### Who's Online (See full list)

There are no registered users currently online

×