- Timestamp:
- 01/12/06 20:40:26 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
r530 r531 11 11 #include "ViewCellsManager.h" 12 12 #include "RenderSimulator.h" 13 #include "Beam.h" 14 #include "GlRenderer.h" 13 15 14 16 bool use2dSampling = false; … … 347 349 348 350 349 void VssPreprocess ::VerifyBeamCasting()350 { 351 352 vector<Vss Leaf *> leaves;353 mVssTree->CollectLeaves(leaves);351 void VssPreprocessor::TestBeamCasting(VssTree *tree) 352 { 353 354 vector<VssTreeLeaf *> leaves; 355 tree->CollectLeaves(leaves); 354 356 355 357 for (int i = 0; i < 10; ++i) 356 358 { 357 const int index = (int)RandomValue(0, (Real)((int)lea f.size() - 1));358 Vss Leaf *leaf = leaves[index];359 const int index = (int)RandomValue(0, (Real)((int)leaves.size() - 1)); 360 VssTreeLeaf *leaf = leaves[index]; 359 361 360 362 Beam beam; 361 AxisAlignedBox3 dirBox = mVssTree->GetDirBBox(leaf);362 AxisAlignedBox3 box = mVssTree->GetBBox(leaf);363 AxisAlignedBox3 dirBox =tree->GetDirBBox(leaf); 364 AxisAlignedBox3 box = tree->GetBBox(leaf); 363 365 beam.Construct(dirBox, box); 364 366 Intersectable *sourceObj = mObjects[5]; 365 367 BeamSampleStatistics stats; 366 mGlRenderer->SampleBeamContributions(sourceObj,367 368 369 368 renderer->SampleBeamContributions(sourceObj, 369 beam, 370 10000, 371 stats); 370 372 371 373 Debug << "beam statistics: " << stats << endl;
Note: See TracChangeset
for help on using the changeset viewer.