searchTest.C

00001 #include <math.h>
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004 #include <time.h>
00005 #include <string.h>
00006 #include <GL/gl.h>
00007 #include <GL/glu.h>
00008 #include <SDL/SDL.h>
00009 #include "BO/functionsTest.H"
00010 //#include "functions.h"
00011 //#include "draw.h"
00012 #include "BO/defineConj.H"
00013 /////////////#include "BO/drawConj.H"
00014 
00015 #include "Component/ModelManager.H"
00016 #include "Image/Image.H"
00017 #include "Psycho/PsychoDisplay.H"
00018 #include "Psycho/EyeTrackerConfigurator.H"
00019 #include "Psycho/EyeTracker.H"
00020 #include "Psycho/PsychoOpts.H"
00021 #include "Component/EventLog.H"
00022 #include "Component/ComponentOpts.H"
00023 #include "Util/MathFunctions.H"
00024 #include "Util/Types.H"
00025 #include "rutz/time.h"
00026 
00027 int type;
00028 int trial;
00029 int record = 1;
00030 int /*start = 0,*/ tracking = 0;
00031 int target[STIM*4];
00032 float color[16];
00033 float hor[16] = {0.25,0.25,-0.25,-0.25, //x location of stimuli
00034                  -0.25,0.25,0.75,0.75,
00035                  0.75,0.75,0.25,-0.25,
00036                  -0.75,-0.75,-0.75,-0.75};
00037 float ver[16] = {0.25,-0.25,-0.25,0.25, // y location of stimuli
00038                  0.75,0.75,0.75,0.25,
00039                  -0.25,-0.75,-0.75,-0.75,
00040                  -0.75,-0.25,0.25,0.75};
00041 
00042 //time_t timer;
00043 double Rec_ES[100],Rec_RT[100];
00044 int place[100][16];
00045 int calib[9] = {0,0,0,0,0,0,0,0,0};
00046 int state_calib=0,flag_state=0;
00047 int input,occlude=0;
00048 int target_BO,target_Shape,target_stim,target_type,target_top,target_location;
00049 char subj[128];
00050 /*int BO_L[2][2] = {{1,3},{0,2}};
00051   int BO_Sq[2][2] = {{0,2},{1,3}};*/
00052 //time_t sec, min;
00053 time_t start_sec,start_min,last_sec,last_min;
00054 clock_t SS,ES;
00055 
00056  // Instantiate a ModelManager: this manages all are little modules
00057 //ModelManager manager("SearchConjunction");
00058 
00059   // Instantiate our various ModelComponents: the event log and eye tracker stuff
00060 //nub::soft_ref<EyeTrackerConfigurator>
00061 //etc(new EyeTrackerConfigurator(manager));
00062 
00063 //nub::soft_ref<EventLog> el(new EventLog(manager));
00064 //manager.addSubComponent(el);
00065 
00066 //nub::soft_ref<EyeTracker> et = etc->getET();
00067 //et->setEventLog(el);
00068 
00069 //nub::soft_ref<PsychoDisplay> d(new PsychoDisplay(manager));
00070 
00071 
00072 int Require_Result(void)
00073 {
00074   int i,j;
00075   FILE *fp1,*fp2;
00076   char File_Time[128],File_Loc[128];
00077 
00078   /* Make & Open record file. */
00079   sprintf(File_Time,"%s_RT.data",subj);
00080   sprintf(File_Loc,"%s_Loc.data",subj);
00081   printf("test1\n");
00082   /* Write Answer */
00083   fp1=fopen(File_Time,"w");
00084   fp2=fopen(File_Loc,"w");
00085   printf("test2\n");
00086   for(i=0;i<trial;i++){
00087     fprintf(fp1,"%d\t%d\t%6.3f\t%6.3f\n",i,target[i],Rec_RT[i],Rec_ES[i]);
00088   }
00089   printf("test3\n");
00090   for(i=0;i<trial;i++){
00091     for(j=0;j<16;j++){
00092       fprintf(fp2,"%d",place[i][j]);
00093       if(j==15)fprintf(fp2,"\n");
00094       else fprintf(fp2,"\t");
00095     }
00096   }
00097   printf("test4\n");
00098   fclose(fp1);
00099   fclose(fp2);
00100   printf("test5\n");
00101   return 0;
00102 }
00103 
00104 void quit_tutorial(int code)
00105 {
00106   SDL_Quit();
00107   exit(code);
00108 }
00109 
00110 void idle(void)
00111 {
00112   //glutPostRedisplay();
00113   if(input == 1)input = 0;
00114   //printf("idle = %d\n",input);
00115 }
00116 
00117 void InputName(char *str)
00118 {
00119   printf("Subject Name : ");
00120   scanf("%s",str);
00121   printf("%s\n",subj);
00122 }
00123 
00124 void CheckFormat(int argc)
00125 {
00126   if(argc!=2 && argc !=3){
00127     printf("Error\n./StimuliBO FileName\n");
00128     exit(0);
00129   }
00130   if(argc == 3)record = 0;
00131 }
00132 
00133 void myReshape(GLsizei w, GLsizei h)
00134 {
00135   glClearColor(BGC, BGC, BGC, 1.0);
00136   glClear(GL_COLOR_BUFFER_BIT);
00137   glViewport(0, 0, w, h);
00138   glMatrixMode(GL_PROJECTION);
00139   glLoadIdentity();
00140 
00141   /*if(w <= h)
00142     glOrtho( -1.3, 1.3, -1.0 * (GLfloat)h/(GLfloat)w,   // 1.3 for 18deg if assigned to 15)
00143          1.0 * (GLfloat)h/(GLfloat)w, -10.0, 10.0);
00144   else
00145     glOrtho( -1.3 * (GLfloat)h/(GLfloat)w,
00146     1.3 * (GLfloat)h/(GLfloat)w, -1.0, 1.0, -10.0, 10.0);*/ //original
00147 
00148   /*
00149     if(w <= h)
00150     glOrtho( -1.75, 1.75, -1.0 * (GLfloat)h/(GLfloat)w,   // 1.3 for 18deg if assigned to 15)
00151     1.0 * (GLfloat)h/(GLfloat)w, -10.0, 10.0);
00152     else
00153     glOrtho( -1.75 * (GLfloat)h/(GLfloat)w,
00154     1.75 * (GLfloat)h/(GLfloat)w, -1.0, 1.0, -10.0, 10.0);
00155   */
00156 
00157   if(w <= h)
00158     glOrtho( -3.25, 3.25, -1.0 * (GLfloat)h/(GLfloat)w,   // 1.3 for 18deg if assigned to 15)
00159              1.0 * (GLfloat)h/(GLfloat)w, -10.0, 10.0);
00160   else
00161     glOrtho( -3.25 * (GLfloat)h/(GLfloat)w,
00162              3.25 * (GLfloat)h/(GLfloat)w, -1.0, 1.0, -10.0, 10.0);
00163   glMatrixMode(GL_MODELVIEW);
00164   glLoadIdentity();
00165 
00166 }
00167 
00168 void Init(int stimuli[], int array[], float color[])
00169 {
00170   int i;
00171 
00172   for(i = 0 ;i < STIM; i++){
00173     stimuli[i]=0;
00174   }
00175 
00176   for(i = 0 ; i < 16; i++) array[i] = 0;
00177 
00178   for(i = 0 ; i < 16; i++){
00179     color[i] = rand()%2;
00180   }
00181 }
00182 
00183 void setTargetConjunction(int stimuli[],int array[],int target_trial)//target_stim is conbination of Target shapes
00184 {
00185   struct tm *t_st;
00186   time_t timer;
00187 
00188   time(&timer);
00189   t_st = localtime(&timer);
00190 
00191   target_location = (rand()+t_st->tm_sec)%16;
00192   //pattern = search(target_trial);
00193   if((target_trial)%2==0)target_BO = 1; //left
00194   else target_BO = 0; //right
00195 
00196   target_Shape = selection(target_trial);
00197   fragStimuli(stimuli,target_trial,target_BO);
00198 
00199   array[target_location] = 1;
00200   place[trial][target_location]=target_trial;
00201 }
00202 
00203 /* Display Stimulus */
00204 /*void display(void)
00205 {
00206   //int target_BO,target_Shape,target_stim,target_type,target_top,target_location;
00207   int stimuli[STIM],array[16];
00208 
00209   printf("checking et false (display)\n");
00210   usleep(50000);
00211   et->track(false);
00212 
00213   if(tracking == 0){
00214     printf("before start\n");
00215     //et->track(true);
00216     et->track(true);
00217     tracking = 1;
00218     printf("after start\n");
00219   }
00220 
00221 
00222   if(flag_state == 0)Display_Calibration(state_calib,calib);
00223   else{
00224     Init(stimuli,array,color);
00225     //printf("trial = %d\n",trial);
00226     printf("target[%d] = %d\n",trial,target[trial]);
00227     target_stim = target[trial];
00228     target_type = target_stim%4;
00229     setTargetConjunction(stimuli,array,target[trial]);
00230 
00231     //array[target_location] = 1;
00232 
00233     Display_Conjunction(target_BO,target_Shape,target_stim,target_type,target_location,stimuli,array,place,trial,hor,ver,color);
00234 
00235     SS = clock();
00236   }
00237 }*/
00238 
00239 /*void display(void)
00240 {
00241   //int target_BO,target_Shape,target_stim,target_type,target_top,target_location;
00242   int stimuli[STIM],array[16];
00243 
00244   //printf("checking et false (display)\n");
00245   //usleep(50000);
00246   //et->track(false);
00247 
00248   //if(tracking == 0){
00249     // printf("before start\n");
00250     //et->track(true);
00251     //et->track(true);
00252     //tracking = 1;
00253     //printf("after start\n");
00254   //}
00255 
00256 
00257   if(flag_state == 0){
00258     //printf("calib\n");
00259     Display_Calibration(state_calib,calib);
00260   }
00261   else{
00262     Init(stimuli,array,color);
00263     //printf("trial = %d\n",trial);
00264     printf("target[%d] = %d\n",trial,target[trial]);
00265     target_stim = target[trial];
00266     target_type = target_stim%4;
00267     setTargetConjunction(stimuli,array,target[trial]);
00268 
00269     //array[target_location] = 1;
00270 
00271     Display_Conjunction(target_BO,target_Shape,target_stim,target_type,target_location,stimuli,array,place,trial,hor,ver,color);
00272 
00273     SS = clock();
00274   }
00275 }*/
00276 
00277 void display(void)
00278 {
00279   //int target_BO,target_Shape,target_stim,target_type,target_top,target_location;
00280   int stimuli[STIM],array[16];
00281 
00282   Init(stimuli,array,color);
00283   //printf("trial = %d\n",trial);
00284   printf("target[%d] = %d\n",trial,target[trial]);
00285   target_stim = target[trial];
00286   target_type = target_stim%4;
00287   setTargetConjunction(stimuli,array,target[trial]);
00288 
00289   //array[target_location] = 1;
00290 
00291   Display_Conjunction(target_BO,target_Shape,target_stim,target_type,target_location,stimuli,array,place,trial,hor,ver,color);
00292 
00293   SS = clock();
00294 
00295 }
00296 
00297 /* For Format */
00298 void init(void)
00299 {
00300   glClearColor(BGC, BGC, BGC, 0.0);
00301 }
00302 
00303 /* Exit Process of Key board*/
00304 void keyboard2(SDL_keysym* keysym)
00305 {
00306   double RT;
00307   printf("checking et (keyboard)\n");
00308   //et->track(true);
00309   if(flag_state == 0){
00310     switch (keysym->sym){ //exit when 'q', 'Q' or "ESC"
00311     case SDLK_ESCAPE:
00312       {
00313         //printf("before stop\n");
00314         //usleep(50000);
00315         //et->track(false);
00316         //tracking = 0;
00317         //printf("after stop\n");
00318         //printf("before final\n");
00319         //manager.stop();printf("after final\n");
00320         quit_tutorial(0);
00321       }
00322 
00323     case SDLK_SPACE:
00324       {
00325         state_calib++;
00326         if(state_calib==13){
00327           printf("calibration is over\n");
00328           glClearColor(BGC, BGC, BGC, 0);
00329           glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00330           Display_Blank();
00331           SDL_GL_SwapBuffers();
00332           msleep(F_SLEEP*5);
00333           flag_state = 1;
00334         }
00335       }
00336     default:
00337       break;
00338     }
00339   }else{
00340     switch (keysym->sym){ //exit when 'q', 'Q' or "ESC"
00341     case SDLK_ESCAPE:
00342       {
00343         printf("before stop\n");
00344         //usleep(50000);
00345         //et->track(false);
00346         tracking = 0;
00347         //printf("after stop\n");
00348         //printf("before final\n");
00349         //manager.stop();printf("after final\n");
00350         quit_tutorial(0);
00351       }
00352 
00353     case SDLK_SPACE:
00354       {
00355         ES=clock();
00356         RT=(double)(ES-SS)/CLOCKS_PER_SEC;
00357         Rec_ES[trial]=(double)ES/CLOCKS_PER_SEC;
00358         Rec_RT[trial]=RT;
00359         printf("time = %6.3f sec\n",Rec_ES[trial]);
00360         printf("Reaction time R = %6.3f sec\n",Rec_RT[trial]);
00361         trial++;
00362         //printf("time = %6.3f sec\n",(double)ES/CLOCKS_PER_SEC);
00363         //printf("Reaction time R = %6.3f sec\n",RT);
00364         glClearColor(BGC, BGC, BGC, 0);
00365         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00366         SDL_GL_SwapBuffers();
00367         msleep(1000);
00368       }
00369     default:
00370       break;
00371     }
00372 
00373     if(trial == STIM*4){
00374       if(record == 1)Require_Result();
00375       printf("before stop\n");
00376       //usleep(50000);
00377       //et->track(false);
00378       tracking = 0;
00379       //printf("after stop\n");
00380       //printf("before final\n");
00381       //manager.stop();printf("after final\n");
00382       quit_tutorial(0);
00383     }
00384   }
00385   //printf("before stop\n");
00386   //usleep(50000);
00387   //et->track(false);
00388   //usleep(50000);
00389   //et->track(false);
00390   tracking = 0;
00391   //printf("after stop\n\n");
00392   SDL_GL_SwapBuffers();
00393   //glutPostRedisplay();
00394 }
00395 
00396 void keyboard(int key)
00397 {
00398   double RT;
00399   printf("checking et (keyboard)\n");
00400 
00401 
00402   switch (key){ //exit when 'q', 'Q' or "ESC"
00403   case 'q':
00404   case 'Q':
00405   case '\033':
00406     {
00407       quit_tutorial(0);
00408     }
00409 
00410   case ' ':
00411     {
00412       ES=clock();
00413       RT=(double)(ES-SS)/CLOCKS_PER_SEC;
00414       Rec_ES[trial]=(double)ES/CLOCKS_PER_SEC;
00415       Rec_RT[trial]=RT;
00416       printf("time = %6.3f sec\n",Rec_ES[trial]);
00417       printf("Reaction time R = %6.3f sec\n",Rec_RT[trial]);
00418       trial++;
00419         //printf("time = %6.3f sec\n",(double)ES/CLOCKS_PER_SEC);
00420         //printf("Reaction time R = %6.3f sec\n",RT);
00421       glClearColor(BGC, BGC, BGC, 0);
00422       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00423       SDL_GL_SwapBuffers();
00424       msleep(1000);
00425     }
00426   default:
00427     break;
00428   }
00429 
00430   /*if(trial == 4){//STIM*4){
00431     if(record == 1)Require_Result();
00432     quit_tutorial(0);
00433     }*/
00434 
00435   //glutPostRedisplay();
00436 }
00437 
00438 void process_events(void)
00439 {
00440   SDL_Event event;
00441 
00442   while(SDL_PollEvent(&event)){
00443     switch(event.type){
00444     case SDL_KEYDOWN:
00445       keyboard2(&event.key.keysym);
00446       break;
00447     case SDL_QUIT:
00448       quit_tutorial(0);
00449       break;
00450     }
00451   }
00452 }
00453 
00454 void ourInit(void)
00455 {
00456 
00457 
00458   glClearColor(BGC,BGC,BGC,0.0);
00459   glMatrixMode(GL_PROJECTION);
00460   glLoadIdentity();
00461   // glOrtho(-1.2,1.2,-1.0,1.0,-1.0,1.0); //
00462 
00463 
00464   glEnable(GL_LINE_SMOOTH);
00465   glEnable(GL_POINT_SMOOTH);
00466   glEnable(GL_POLYGON_SMOOTH);
00467 
00468   glEnable(GL_BLEND);
00469   glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00470 
00471   glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);//GL_DONT_CARE);
00472 
00473 
00474 }
00475 
00476 void myInit(int target[])
00477 {
00478   int i;
00479 
00480   for(i=0;i<STIM*4;i++){
00481     if(i<STIM)target[i]=i;
00482     else if(i>=STIM && i<2*STIM)target[i]=i-STIM;
00483     else if(i>=2*STIM && i<3*STIM)target[i]=i-2*STIM;
00484     else if(i>=3*STIM && i<4*STIM)target[i]=i-3*STIM;
00485     //printf("%d\n",target[i]);
00486   }
00487 
00488   shuffle(target,STIM*4);
00489 }
00490 
00491 /*void new_mouse(int button, int state,int x, int y)
00492 {
00493   double RT;
00494 
00495   if(flag_state == 0){
00496     switch(button){
00497       case GLUT_RIGHT_BUTTON:
00498         if(state == GLUT_DOWN){
00499           state_calib++;
00500           if(state_calib==13){
00501             glClearColor(BGC,BGC,BGC,0);
00502             glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00503             Display_Blank();
00504             glutSwapBuffers();
00505             msleep(F_SLEEP*5);
00506             flag_state = 1;
00507           }
00508         }
00509         break;
00510 
00511     case GLUT_LEFT_BUTTON:
00512       if(state == GLUT_DOWN){
00513           state_calib++;
00514           if(state_calib==13){
00515             glClearColor(BGC,BGC,BGC,0);
00516             glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00517             Display_Blank();
00518             glutSwapBuffers();
00519             msleep(F_SLEEP*5);
00520             flag_state = 1;
00521           }
00522         }
00523       break;
00524 
00525     default:
00526       break;
00527     }
00528   }else{
00529     switch(button){
00530     case GLUT_RIGHT_BUTTON:
00531       if(state == GLUT_DOWN)
00532         {
00533           ES=clock();
00534           RT=(double)(ES-SS)/CLOCKS_PER_SEC;
00535           Rec_ES[trial]=(double)ES/CLOCKS_PER_SEC;
00536           Rec_RT[trial]=RT;
00537           printf("time = %6.3f sec\n",Rec_ES[trial]);
00538           printf("Reaction time R = %6.3f sec\n",Rec_RT[trial]);
00539           trial++;
00540           //printf("time = %6.3f sec\n",(double)ES/CLOCKS_PER_SEC);
00541           //printf("Reaction time R = %6.3f sec\n",RT);
00542           glClearColor(BGC, BGC, BGC, 0);
00543           glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00544           glutSwapBuffers();
00545           msleep(1000);
00546         }
00547       break;
00548 
00549     case GLUT_LEFT_BUTTON:
00550       if(state == GLUT_DOWN)
00551         {
00552           ES=clock();
00553           RT=(double)(ES-SS)/CLOCKS_PER_SEC;
00554           Rec_ES[trial]=(double)ES/CLOCKS_PER_SEC;
00555           Rec_RT[trial]=RT;
00556           printf("time = %6.3f sec\n",Rec_ES[trial]);
00557           printf("Reaction time R = %6.3f sec\n",Rec_RT[trial]);
00558           trial++;
00559           //printf("time = %6.3f sec\n",(double)ES/CLOCKS_PER_SEC);
00560           //printf("Reaction time L = %6.3f sec\n",RT);
00561           glClearColor(BGC, BGC, BGC, 0);
00562           glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00563           glutSwapBuffers();
00564           msleep(1000);
00565         }
00566       break;
00567 
00568     default:
00569       break;
00570     }
00571   }
00572   if(trial == 4){
00573     if(record == 1)Require_Result();
00574     exit(0);
00575   }
00576   glutPostRedisplay();
00577 }*/
00578 
00579 int main(int argc, char *argv[])
00580 {
00581   const SDL_VideoInfo* info = NULL;
00582   int c;
00583   int width = 0;
00584   int height = 0;
00585   int bpp = 0;
00586   uint32 flag = 0;
00587 
00588   MYLOGVERB = LOG_INFO;  // suppress debug messages
00589 
00590 // Instantiate a ModelManager:
00591   ModelManager manager("Psycho SearchConjunction");
00592 
00593   nub::soft_ref<EventLog> el(new EventLog(manager));
00594   manager.addSubComponent(el);
00595 
00596   nub::soft_ref<EyeTrackerConfigurator>
00597     etc(new EyeTrackerConfigurator(manager));
00598   manager.addSubComponent(etc);
00599 
00600   nub::soft_ref<PsychoDisplay> d(new PsychoDisplay(manager));
00601   manager.addSubComponent(d);
00602 
00603   if(SDL_Init(SDL_INIT_VIDEO)<0)quit_tutorial(1);
00604 
00605   info = SDL_GetVideoInfo();
00606   width = 500;//640;
00607     height = 500;//480;
00608   bpp = info->vfmt->BitsPerPixel;
00609 
00610   manager.setOptionValString(&OPT_EventLogFileName, "searchConj.log");
00611   manager.setOptionValString(&OPT_EyeTrackerType, "ISCAN");
00612 
00613   // Parse command-line:
00614   if (manager.parseCommandLine(argc, argv, "<fileName>", 1, 1) == false)
00615     return(1);
00616 
00617   nub::soft_ref<EyeTracker> et = etc->getET();
00618   d->setEyeTracker(et);
00619   d->setEventLog(el);
00620   et->setEventLog(el);
00621 
00622     // EyeLink opens the screen for us, so make sure SDLdisplay is slave:
00623   if (etc->getModelParamString("EyeTrackerType").compare("EL") == 0)
00624     d->setModelParamVal("SDLslaveMode", true);
00625 
00626 
00627 
00628   CheckFormat(argc);
00629   //printf("test1\n");
00630   //glutInit(&argc, argv);
00631 
00632   //glClearColor(BGC,BGC,BGC,0);
00633 
00634   //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00635 
00636 
00637   manager.start();
00638   el->pushEvent(std::string("===== Trial : Search Conjucntion Task ====="));
00639   et->calibrate(d);
00640 
00641   d->clearScreen();
00642   d->clearScreen();
00643   d->displayText("Experiment start for space");
00644   d->waitForKey();
00645   d->clearScreen();
00646 
00647   /*flag =
00648     SDL_OPENGL |
00649     SDL_FULLSCREEN |
00650     SDL_SWSURFACE |
00651     SDL_HWSURFACE |
00652     SDL_DOUBLEBUF |
00653     SDL_HWACCEL;*/
00654 
00655   flag =
00656     SDL_OPENGL |
00657     SDL_FULLSCREEN;
00658   strcpy(subj,argv[1]);
00659   printf("%s\n",subj);
00660   myInit(target);
00661   trial = 0;
00662 
00663   if(SDL_SetVideoMode(width,height,32,flag) == 0)quit_tutorial(1);
00664 
00665   //glClearColor(BGC,BGC,BGC,0);
00666 
00667   //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00668   ourInit();
00669 
00670   while(1){
00671     // start the eye tracker:
00672     et->track(true);
00673     //myReshape(width,height);
00674     display();
00675     c = d->waitForKey();
00676     //waitForKey();
00677     //process_events();
00678     keyboard(c);
00679     // stop the eye tracker:
00680     usleep(50000);
00681     et->track(false);
00682     if(trial == 4/*STIM*/)break;
00683   }
00684 
00685 
00686   if(record == 1)Require_Result();
00687   printf("finish record\n");
00688   //glutDisplayFunc(display);
00689   //glutKeyboardFunc(keyboard);
00690   //glutMouseFunc(new_mouse);
00691 
00692   //glutMouseFunc(new_mouse);
00693   //glutKeyboardFunc(keyboard);
00694   //printf("trial = %d\n",trial);
00695   //glutDisplayFunc(display);
00696 
00697   //glutMainLoop();
00698 
00699   d->clearScreen();
00700   d->displayText("Experiment complete. Thank you!");
00701   d->waitForKey();
00702 
00703   // stop all our ModelComponents
00704   manager.stop();
00705 
00706   // all done!
00707   return 0;
00708 }
Generated on Sun May 8 08:04:23 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3