Created
July 21, 2014 17:00
-
-
Save elliotwoods/c5986f04c75b4962d73e to your computer and use it in GitHub Desktop.
results of matrix multiplication in openFrameworks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cout << ((ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f) * ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f)) * ofVec3f(1.0f, 0.0f, 0.0f)) << endl; | |
//0, 0, 0 | |
cout << ((ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f) * ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f)) * ofVec3f(1.0f, 0.0f, 0.0f)) << endl; | |
//0, 0, 0 | |
cout << ((ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f) * ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f)) * ofVec4f(1.0f, 0.0f, 0.0f, 1.0f)) << endl; | |
//0, 0, 0, 1 | |
cout << ((ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f) * ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f)) * ofVec4f(1.0f, 0.0f, 0.0f, 1.0f)) << endl; | |
//0, 0, 0, 2 | |
cout << (ofVec3f(1.0f, 0.0f, 0.0f) * (ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f) * ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f))) << endl; | |
//0, 0, 0 | |
cout << (ofVec3f(1.0f, 0.0f, 0.0f) * (ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f) * ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f)) * ofVec3f(1.0f, 0.0f, 0.0f)) << endl; | |
//1, 0, 0 | |
cout << (ofVec4f(1.0f, 0.0f, 0.0f, 1.0f) * (ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f) * ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f))) << endl; | |
//0, 0, 0, 1 | |
cout << (ofVec4f(1.0f, 0.0f, 0.0f, 1.0f) * (ofMatrix4x4::newScaleMatrix(0.0f, 0.0f, 0.0f) * ofMatrix4x4::newTranslationMatrix(1.0f, 0.0f, 0.0f))) << endl; | |
//1, 0, 0, 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment