C++ namespace FW ; Matrix multiplication
I'm trying to implement some basic matrix multiplication, for translation.
In my opinion the multiplication should work, but I get this error.
binary '*=' : no operator found which takes a right-hand operand of type
'FW::Vec4f' (or there is no acceptable conversion)
Here is my code, using std and FW namepsace
Mat4f World;
float x, y, z;
World.setCol(0, Vec4f(1, 0, 0, x));
World.setCol(1, Vec4f(0, 1, 0, y));
World.setCol(2, Vec4f(0, 0, 1, z));
World.setCol(3, Vec4f(0, 0, 0, 1));
World *= Vec4f(translation_, 1, 1, 1);
No comments:
Post a Comment