Matrix Vector multiplication

This blog article seems to say that you can do Matrix-Vector multiplication with ofVec3f and ofMatrix3x3:

ofVec3 v;
ofVec3f projected = v * model * view * projection;

However, I don’t see that operator function for vector * matrix in the ofFramework.
Am I missing something?

  • Luis

Hi.
It seems that there is no ofVec3f and ofMatrix3x3 multiplication. No idea if it was there and has been removed. However there is ofVec3f and ofMatrix4x4 multiplication. The model, view and projection matrices are 4x4 so probably that example was referring to a 4x4 matrix. https://github.com/openframeworks/openFrameworks/blob/patch-release/libs/openFrameworks/math/ofMatrix4x4.h#L1080-L1087

Thanks for the continued feedback! That helps!

1 Like