Files Classes Functions Hierarchy
00001 #include <iostream> 00002 using namespace std; 00003 00004 #include <GL/glut.h> 00005 00006 #include <commandline.h> 00007 #include <partitionstest.h> 00008 00009 00010 int main(int argc, char** argv) 00011 { 00012 commandline cmd(argc,argv); 00013 uint prog(0); 00014 cmd.mapvar(prog,"prog"); 00015 00016 switch (prog) 00017 { 00018 case 0: 00019 cout << "There are a few test programs." << endl; 00020 cout << endl << endl; 00021 cout << "The first 1..5 programs are interactive. The user\n" 00022 << " uses the mouse as a paint brush to see the partition.\n" 00023 << " Red is inside and blue outside" << endl << endl; 00024 00025 cout << "$./main prog=1 - test d2halfspace / straight line partition." << endl; 00026 cout << "$./main prog=2 - test the triangle partition class." << endl; 00027 cout << "$./main prog=3 - test boomerang from an equation." << endl; 00028 cout << " L[0]*L[1]*(L[2]+L[3])." << endl; 00029 cout << "$./main prog=4 - test inverted square from equation." << endl; 00030 cout << "$./main prog=5 - test subtraction of circle from rectangle." << endl; 00031 cout << "$./main prog=6 - test tetrahedron partition by drawing thousands of points" << endl; 00032 break; 00033 00034 case 1: partitionstest(argc,argv).test01(); break; 00035 case 2: partitionstest(argc,argv).test02(); break; 00036 case 3: partitionstest(argc,argv).test03(); break; 00037 case 4: partitionstest(argc,argv).test04(); break; 00038 case 5: partitionstest(argc,argv).test05(); break; 00039 case 6: partitionstest().test06(argc,argv); break; 00040 00041 default: cout << "error: No case handled." << endl; return 1; 00042 }; 00043 00044 return 0; 00045 } 00046 00047 00048
1.5.8