- Timestamp:
- 11/25/05 17:16:26 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
r434 r436 440 440 cout << "#totalRayStackSize=" << mVssRays.size() << endl <<flush; 441 441 442 int numExportRays = 10000;443 //int numExportRays = 0;442 //int numExportRays = 10000; 443 int numExportRays = 0; 444 444 445 445 if (numExportRays) { … … 451 451 //-- construct BSP view cells 452 452 if (ViewCell::sHierarchy == ViewCell::BSP) 453 453 { 454 454 const int bspSamples = min((int)mVssRays.size(), mBspConstructionSamples); 455 455 456 Debug << "bpssamples: " << bspSamples << endl; 456 457 for (int i = 0; i < bspSamples; ++ i) 457 458 458 bspRays.push_back(new Ray(*mVssRays[i])); 459 459 460 //-- construct BSP tree using the samples 460 461 mBspTree = new BspTree(&mUnbounded); 461 462 463 ObjectContainer objects; 464 mSceneGraph->CollectObjects(&objects); 465 462 466 mBspTree->SetGenerateViewCells(true); 463 mBspTree->Construct(bspRays); 464 465 Exporter *exporter = Exporter::GetExporter("vccbsprays.x3d"); 466 467 // export rays piercing this view cell 468 exporter->ExportRays(bspRays, 1000, RgbColor(0, 1, 0)); 469 470 // cast remaining initial rays into BSP tree 471 for (int i = bspSamples; i < (int)mVssRays.size(); ++ i) 472 CastRay(*mBspTree, *mVssRays[i]); 467 mBspTree->Construct(objects, bspRays); 473 468 } 474 469 … … 587 582 //-- cast ray to BSP tree to get intersection with view cells 588 583 Ray ray(vssRay); 589 590 Debug << ray << endl;591 if (ray.intersections.empty())592 Debug << "empty ray" << endl;593 else594 Debug << "intersection: " << ray.intersections[0].mT << " " << ray.intersections[0].mObject << endl;595 596 584 mBspTree->CastRay(ray); 597 585 … … 601 589 602 590 if (!ray.intersections.empty()) // second intersection found 603 591 { 604 592 //sampleContributions += 605 593 AddObjectSamples(ray.intersections[0].mObject, ray); 606 594 } 607 595 } 608 596
Note: See TracChangeset
for help on using the changeset viewer.