Ignore:
Timestamp:
01/12/06 20:40:26 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r530 r531  
    1111#include "ViewCellsManager.h" 
    1212#include "RenderSimulator.h" 
     13#include "Beam.h" 
     14#include "GlRenderer.h" 
    1315 
    1416bool use2dSampling = false; 
     
    347349 
    348350 
    349 void VssPreprocess::VerifyBeamCasting() 
    350 { 
    351  
    352         vector<VssLeaf *> leaves; 
    353         mVssTree->CollectLeaves(leaves); 
     351void VssPreprocessor::TestBeamCasting(VssTree *tree) 
     352{ 
     353 
     354        vector<VssTreeLeaf *> leaves; 
     355        tree->CollectLeaves(leaves); 
    354356 
    355357        for (int i = 0; i < 10; ++i) 
    356358        { 
    357                 const int index = (int)RandomValue(0, (Real)((int)leaf.size() - 1)); 
    358                 VssLeaf *leaf = leaves[index]; 
     359                const int index = (int)RandomValue(0, (Real)((int)leaves.size() - 1)); 
     360                VssTreeLeaf *leaf = leaves[index]; 
    359361 
    360362                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); 
    363365                beam.Construct(dirBox, box); 
    364366                Intersectable *sourceObj = mObjects[5]; 
    365367                BeamSampleStatistics stats; 
    366                 mGlRenderer->SampleBeamContributions(sourceObj, 
    367                                                                                         beam, 
    368                                                                                         10000, 
    369                                                                                         stats); 
     368                renderer->SampleBeamContributions(sourceObj, 
     369                                                                                  beam, 
     370                                                                                  10000, 
     371                                                                                  stats); 
    370372 
    371373                Debug << "beam statistics: " << stats << endl; 
Note: See TracChangeset for help on using the changeset viewer.