-#define RESX 640 // image x-resolution
-#define RESY 480 // image y-resolution
-using namespace std;
-
-int main(int, char**) {
- // test vector implementation
-
- Vec3f bar(1, 4, 5), foo(3, 2, 1);
- cout << "Using example vector bar=" << bar << ", foo=" << foo << endl;
- cout << "bar | foo = " << (bar | foo) << ", should be 16" << endl;
- cout << "bar | bar = " << (bar | bar) << ", should be 42" << endl;
- cout << "foo | foo = " << (foo | foo) << ", should be 14" << endl;
- cout << "bar % foo = " << (bar % foo) << ", should be (-6,14,-10)" << endl;
- cout << "bar % bar = " << (bar % bar) << ", should be (0,0,0)" << endl;
- cout << "foo % foo = " << (foo % foo) << ", should be (0,0,0)" << endl;
- cout << "bar.norm() = " << bar.norm() << ", should be 6.48" << endl;
- cout << "foo.norm() = " << foo.norm() << ", should be 3.74" << endl;
- cout << "bar*5 = " << (bar * 5) << ", should be (5,20,25)" << endl;
- cout << "bar/5 = " << (bar / 5) << ", should be (0.2,0.8,1)" << endl;
- cout << "bar + foo = " << (bar + foo) << ", should be (4,6,6)" << endl;
- cout << "bar - foo = " << (bar - foo) << ", should be (-2,2,4)" << endl;
- cout << "foo - bar = " << (foo - bar) << ", should be (2,-2,-4)" << endl;
- cout << "bar * foo = " << (bar * foo) << ", should be (3,8,5)" << endl;
- cout << "bar / foo = " << (bar / foo) << ", should be (0.33,2,5)" << endl;
- cout << "foo / bar = " << (foo / bar) << ", should be (3,0.5,0.2)" << endl;