Subversion Repositories gelsvn

Rev

Rev 417 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 417 Rev 418
Line 118... Line 118...
118
 
118
 
119
  // Initialize track ball
119
  // Initialize track ball
120
  vctrl = new GLViewController(winx, winy, c, r);
120
  vctrl = new GLViewController(winx, winy, c, r);
121
 
121
 
122
  // Initialize corresponding camera
122
  // Initialize corresponding camera
123
  cam = new Camera(c - Vec3f(r), 
123
  cam = new Camera(c - Vec3f(r), c, Vec3f(0.0f, 1.0f, 0.0f), 1.0f);
124
		   c, 
-
 
125
		   Vec3f(0.0f, 1.0f, 0.0f),
-
 
126
		   1.0f);
-
 
127
 
124
 
128
#ifdef USE_BSP
125
#ifdef USE_BSP
129
   cout << "Constructing BSP tree..." << endl;
126
   cout << "Constructing BSP tree..." << endl;
130
   tree.init(mesh_vector, transforms, MAX_OBJECTS, MAX_LEVEL);
127
   tree.init(mesh_vector, transforms, MAX_OBJECTS, MAX_LEVEL);
131
   tree.build();
128
   tree.build();
Line 346... Line 343...
346
			  sum += Vec3d(shade_ray[0](r));
343
			        sum += Vec3d(shade_ray[0](r));
347
			else 
344
			      else 
348
			  sum += background;
345
			        sum += background;
349
#endif		
346
#endif		
350
		  }
347
		      }
351
 
-
 
352
		  image[i][j] = Vec3f(sum/static_cast<double>(PIXEL_SUBDIVS*PIXEL_SUBDIVS));
348
	      image[i][j] = Vec3f(sum/static_cast<double>(PIXEL_SUBDIVS*PIXEL_SUBDIVS));
353
	  }
349
      }
354
	  if(((i + 1) % 50) == 0) cerr << ".";
350
      if(((i + 1) % 50) == 0) cerr << ".";
355
	}
351
    }
356
	cout << " - " << tim.get_secs() << " secs " << endl;
352
	  cout << " - " << tim.get_secs() << " secs " << endl;