Ignore:
Timestamp:
03/01/06 10:31:49 (18 years ago)
Author:
mattausch
Message:

test version
build script for testing. code is set uo for testing also

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r666 r667  
    1616#include "RssPreprocessor.h" 
    1717 
    18 #define SAMPLE_AFTER_SUBDIVISION 0 
     18#define SAMPLE_AFTER_SUBDIVISION 1 
    1919 
    2020 
     
    210210 
    211211        // rays can be passed or deleted 
    212         if (0) // remove!! 
    213212        disposeRays(initialSamples, outRays); 
    214213         
     
    216215        // -- stats after contruction 
    217216        ResetViewCells(); 
    218         Debug << "\nView cells after initial sampling: " << mCurrentViewCellsStats << endl; 
     217 
     218        Debug << "\nView cells after initial sampling:\n" << mCurrentViewCellsStats << endl; 
    219219 
    220220        if (0) // export initial view cells 
     
    247247                VssRayContainer constructionSamples; 
    248248 
    249                 const int samplingType = mSamplingType; 
    250 /*                      dirSamples ?  
     249                const int samplingType = 
     250                        dirSamples ?  
    251251                                                Preprocessor::DIRECTION_BASED_DISTRIBUTION : 
    252252                                                Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 
    253 */ 
     253 
    254254                if (0) 
    255255                        dirSamples = !dirSamples; // toggle sampling method 
     256 
    256257                numSamples += CastPassSamples(mSamplesPerPass,  
    257258                                                                          samplingType, 
     
    333334        } 
    334335         
    335         ViewCellContainer leaves; 
    336         mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 
    337         mViewCellsTree->ResetPvs(); 
    338         VssRayContainer dummyRays; 
    339         CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 
    340          
    341         //ComputeSampleContributions(initialSamples, true, false); 
    342         ComputeSampleContributions(dummyRays, true, false); 
    343  
    344         ViewCellContainer::const_iterator it, it_end = leaves.end(); 
    345  
    346         for (it = leaves.begin(); it != it_end; ++ it) 
    347         { 
    348                 mViewCellsTree->PropagatePvs(*it); 
    349         } 
    350  
    351         mViewCellsTree->ExportStats("dummy.log"); 
     336        if (0) 
     337        { 
     338                ViewCellContainer leaves; 
     339                mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 
     340                mViewCellsTree->ResetPvs(); 
     341                VssRayContainer dummyRays; 
     342                CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 
     343         
     344                //ComputeSampleContributions(initialSamples, true, false); 
     345                ComputeSampleContributions(dummyRays, true, false); 
     346 
     347                ViewCellContainer::const_iterator it, it_end = leaves.end(); 
     348 
     349                for (it = leaves.begin(); it != it_end; ++ it) 
     350                { 
     351                        mViewCellsTree->PropagatePvs(*it); 
     352                } 
     353 
     354                mViewCellsTree->ExportStats("dummy.log"); 
     355        } 
    352356 
    353357        return numSamples; 
     
    428432 
    429433                // output stats 
    430                 sprintf(s, "Stats-%09d-eval.log", castSamples); 
     434                sprintf(s, "-%09d-eval.log", castSamples); 
    431435                string fileName = string(statsPrefix) + string(s); 
    432436 
     
    899903{ 
    900904        int axis = 0; 
    901  
    902         const float factor = 0.65f; 
    903         Vector3 point = mViewSpaceBox.Min() +  mViewSpaceBox.Size() * factor; 
     905        float pos; 
     906 
     907        environment->GetFloatValue("ViewCells.Visualization.clipPlanePos", pos); 
     908 
     909        Vector3 point = mViewSpaceBox.Min() +  mViewSpaceBox.Size() * pos; 
    904910 
    905911        if (mUseClipPlaneForViz) 
     
    26632669 
    26642670        //TODO: remove 
    2665         if(0) 
    2666         mVspBspTree->Construct(constructionRays, &mViewSpaceBox); 
     2671        if (1) 
     2672                mVspBspTree->Construct(constructionRays, &mViewSpaceBox); 
    26672673        else 
    2668 mVspBspTree->Construct(rays, &mViewSpaceBox); 
     2674                mVspBspTree->Construct(rays, &mViewSpaceBox); 
     2675 
    26692676        // collapse invalid regions 
    26702677        cout << "collapsing invalid tree regions ... "; 
     
    27472754 
    27482755        //BspLeaf::NewMail(); 
    2749         if (0) // export merged view cells 
     2756        if (1) // export merged view cells 
    27502757        { 
    27512758                mColorCode = 0; 
     
    27782785        } 
    27792786 
    2780         if (0) // export merged view cells using pvs coding 
     2787        if (1) // export merged view cells using pvs coding 
    27812788        { 
    27822789                mColorCode = 1; 
Note: See TracChangeset for help on using the changeset viewer.