- Timestamp:
- 11/07/05 11:27:38 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r385 r386 386 386 int pvsOut = Min((int)objects.size(), 10); 387 387 388 vector<Ray>rays[10];388 RayContainer rays[10]; 389 389 390 390 while (totalSamples < mTotalSamples) { … … 455 455 } 456 456 457 if ( i < pvsOut ) 458 rays[i].push_back(ray); 457 if ( i < pvsOut ) { 458 Ray *nray = new Ray(ray); 459 rays[i].push_back(nray); 460 } 459 461 460 462 if (!ray.intersections.empty()) { … … 462 464 for (int j = 0; j < pvsOut; j++) { 463 465 if (objects[j] == ray.intersections[0].mObject) { 464 rays[j].push_back(ray); 466 Ray *nray = new Ray(ray); 467 rays[j].push_back(nray); 465 468 } 466 469 } … … 635 638 636 639 for (i=0; i < pvsOut; i++) 637 exporter->ExportRays(rays[i], 1000, RgbColor(1, 0, 0));640 exporter->ExportRays(rays[i], 1000, RgbColor(1, 0, 0)); 638 641 exporter->SetFilled(); 639 642 640 643 delete exporter; 641 644 } … … 833 836 //-- some random view cells and rays for output 834 837 const int raysOut = min((int)mSampleRays.size(), 20000); 835 vector<Ray > vcRays[leafOut];838 vector<Ray *> vcRays[leafOut]; 836 839 vector<BspLeaf *> bspLeaves; 837 840 for (int i = 0; i < leafOut; ++ i) … … 852 855 if (bspLeaves[i]->GetViewCell() == leaf->GetViewCell()) 853 856 { 854 vcRays[i].push_back( *ray);857 vcRays[i].push_back(ray); 855 858 } 856 859 }
Note: See TracChangeset
for help on using the changeset viewer.