filled in scale() transformation in util/Transform
git-svn-id: svn://anubis/fart/trunk@28 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
13d7d90b87
commit
cd9530d21b
3 files changed
+11
-21
No files matched your search
+5
-20
@@ -1,30 +1,15 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include "util/Matrix.h"
|
||||
#include "util/Transform.h"
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
Matrix m = Matrix::identity();
|
||||
m[0][3] = 2.0;
|
||||
m[1][3] = -1.0;
|
||||
m[2][3] = 10.0;
|
||||
|
||||
cout << "m:" << endl << m;
|
||||
|
||||
Matrix i = m.getInverse();
|
||||
|
||||
cout << "i:" << endl << i;
|
||||
|
||||
Matrix mult = m * i;
|
||||
cout << "mult:" << endl << mult;
|
||||
|
||||
m *= m;
|
||||
cout << "m^2:" << endl << m;
|
||||
|
||||
m *= m;
|
||||
cout << "m^4:" << endl << m;
|
||||
Transform t;
|
||||
t.scale(3, 2, 1);
|
||||
t.translate(-1, 2, 3);
|
||||
cout << "t:" << endl << t.getMatrix();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user