Ignore:
Timestamp:
01/12/06 18:31:26 (18 years ago)
Author:
mattausch
Message:

started test function for beam

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp

    r527 r530  
    347347 
    348348 
     349void VssPreprocess::VerifyBeamCasting() 
     350{ 
     351 
     352        vector<VssLeaf *> leaves; 
     353        mVssTree->CollectLeaves(leaves); 
     354 
     355        for (int i = 0; i < 10; ++i) 
     356        { 
     357                const int index = (int)RandomValue(0, (Real)((int)leaf.size() - 1)); 
     358                VssLeaf *leaf = leaves[index]; 
     359 
     360                Beam beam; 
     361                AxisAlignedBox3 dirBox = mVssTree->GetDirBBox(leaf); 
     362                AxisAlignedBox3 box = mVssTree->GetBBox(leaf); 
     363                beam.Construct(dirBox, box); 
     364                Intersectable *sourceObj = mObjects[5]; 
     365                BeamSampleStatistics stats; 
     366                mGlRenderer->SampleBeamContributions(sourceObj, 
     367                                                                                         beam, 
     368                                                                                         10000, 
     369                                                                                         stats); 
     370 
     371                Debug << "beam statistics: " << stats << endl; 
     372 
     373 
     374        } 
     375 
     376} 
     377 
    349378float 
    350379VssPreprocessor::GetAvgPvsSize(VssTree *tree, 
Note: See TracChangeset for help on using the changeset viewer.