00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <geometry/vector.h>
00025 #include <utils/time/tracker.h>
00026 #include <core/exceptions/software.h>
00027
00028 #include <iostream>
00029 #include <cmath>
00030
00031 using namespace fawkes;
00032 using namespace std;
00033
00034 int
00035 main(int argc, char **argv)
00036 {
00037
00038
00039
00040
00041
00042
00043 Vector v1;
00044 v1.x(1);
00045 v1.y(2);
00046 v1.z(3);
00047
00048 cout << "v1: " << v1 << endl;
00049 Vector v2 = v1 / 10;
00050 cout << "v2 = v1 / 10: " << v2 << endl;
00051 v1 /= 10;
00052 cout << "v1 /= 10: " << v1 << endl << endl << endl;
00053
00054 Vector v4;
00055 v4.x(1);
00056 v4.y(2);
00057 v4.z(3);
00058
00059 Vector v5;
00060 v5.x(4);
00061 v5.y(5);
00062 v5.z(6);
00063
00064 Vector v6(4);
00065 v6.x(7);
00066 v6.y(8);
00067 v6.z(9);
00068
00069 cout << "v4: " << v4 << " v5: " << v5 << endl;
00070 Vector v7 = v4 + v5;
00071 cout << "v7 = v4 + v5: " << v7 << endl;
00072 v4 += v5;
00073 cout << "v4 += v5: " << v4 << endl << endl;
00074
00075 try {
00076 Vector v8 = v4 + v6;
00077 }
00078 catch (fawkes::TypeMismatchException &e) {
00079 cout << e.what() << endl << endl << endl;
00080 }
00081
00082 try {
00083 v4 += v6;
00084 }
00085 catch (fawkes::TypeMismatchException &e) {
00086 cout << e.what() << endl << endl << endl;
00087 }
00088 }
00089
00090
00091