proj home

Files   Classes   Functions   Hierarchy  

main.cpp File Reference

#include <iostream>
#include <GL/glut.h>
#include <commandline.h>
#include <partitionstest.h>

Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 10 of file main.cpp.

References commandline::mapvar().

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 }


Generated on Fri Mar 4 00:49:33 2011 for Chelton Evans Source by  doxygen 1.5.8