Changeset 555


Ignore:
Timestamp:
01/19/06 14:49:56 (18 years ago)
Author:
mattausch
Message:

fixed bug in finalizeviewcells when loading view cells

Location:
trunk/VUT/GtpVisibilityPreprocessor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env

    r552 r555  
    3030        samplesPerPass  100000 
    3131        initialSamples 300000 
    32         vssSamples 1800000 
    33         vssSamplesPerPass 100000 
     32        vssSamples 1500000 
     33        vssSamplesPerPass 500000 
    3434        useImportanceSampling true 
    3535        loadInitialSamples  false 
     
    5252        maxDepth        40 
    5353        minPvs          30 
    54         minRays         800 
     54        minRays         400 
    5555        minSize         0.001 
    5656        maxCostRatio    1.5 
     
    170170 
    171171ViewCells { 
    172         loadFromFile false 
    173         exportToFile true 
     172        loadFromFile true 
     173        exportToFile false 
    174174        #type kdTree 
    175175        #type vspKdTree 
     
    259259VspBspTree { 
    260260        Construction { 
    261                 samples 1200000 
     261                samples 900000 
    262262                epsilon 0.005 
    263263                randomize false 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r554 r555  
    259259                Finalize(*it, createMesh); 
    260260        } 
     261 
     262        mTotalAreaValid = false; 
    261263} 
    262264 
     
    24732475        mVspBspTree->mBox = GetViewSpaceBox(); 
    24742476        ResetViewCells(); 
    2475         CreateViewCellMeshes(); 
     2477         
     2478        mViewCellsFinished = true; 
     2479 
     2480        FinalizeViewCells(true); 
    24762481 
    24772482        Debug << (int)mViewCells.size() << " view cells loaded" << endl; 
    2478  
    2479         mViewCellsFinished = true; 
    24802483 
    24812484        return success; 
     
    25292532 
    25302533 
    2531 void VspBspViewCellsManager::Finalize(ViewCell *viewCell) 
     2534void VspBspViewCellsManager::Finalize(ViewCell *viewCell, const bool createMesh) 
    25322535{ 
    25332536        BspViewCell *vc = dynamic_cast<BspViewCell *>(viewCell); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.h

    r551 r555  
    606606        //float GetVolume(ViewCell *viewCell) const; 
    607607 
    608         void Finalize(ViewCell *viewCell); 
     608        void Finalize(ViewCell *viewCell, const bool createMesh); 
    609609 
    610610protected: 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp

    r551 r555  
    19371937                bool isAdjacent = true; 
    19381938 
     1939                 
     1940#if 1 
    19391941                // test all planes of current node if still adjacent 
    19401942                for (int i = 0; (i < halfSpaces.size()) && isAdjacent && (node != n); ++ i) 
     
    19501952                        } 
    19511953                } 
    1952  
     1954#else 
     1955                // test all planes of current node if still adjacent 
     1956                for (int i = 0; i < nodeGeom.size()) && isAdjacent && (node != n); ++ i) 
     1957                { 
     1958                        Polygon3 *poly = nodeGeom->mPolys[i]; 
     1959 
     1960                        const int cf = 
     1961                                Polygon3::ClassifyPlane(geom->mPolys, 
     1962                                                                                poly->GetSupportingPlane(), 
     1963                                                                                mEpsilon); 
     1964 
     1965                        if (cf == Polygon3::BACK_SIDE) 
     1966                        { 
     1967                                isAdjacent = false; 
     1968                        } 
     1969                } 
     1970#endif 
    19531971                if (isAdjacent) 
    19541972                { 
Note: See TracChangeset for help on using the changeset viewer.