Changeset 2206


Ignore:
Timestamp:
03/07/07 18:35:10 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp

    r2184 r2206  
    19101910                                                                                                bool includeOverlays) 
    19111911{ 
    1912         if (0 && mNormalExecution) 
     1912        if (1 && mNormalExecution) 
    19131913        { 
    19141914                TerrainSceneManager::_renderScene(camera, vp, includeOverlays); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BitVectorPvs.h

    r2176 r2206  
    145145        void MergeInPlace(const BitVectorPvs<T, S> &a) 
    146146        { 
    147                 cerr << "not implemented yet" << endl; 
     147                cerr << "bitvector: merge in place not implemented yet" << endl; 
    148148        } 
    149149 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp

    r2199 r2206  
    237237mRoot(NULL), 
    238238mTimeStamp(1), 
    239 mIsInitialSubdivision(false) 
     239mIsInitialSubdivision(false), 
     240mCachedObjects(NULL) 
    240241{ 
    241242        ReadEnvironment(); 
     
    19401941 
    19411942 
    1942 int BvHierarchy::CollectViewCells(const ObjectContainer &objects,  
    1943                                                                   ViewCellContainer &viewCells, 
    1944                                                                   const bool setCounter, 
    1945                                                                   const bool onlyUnmailedRays)// const 
    1946 { 
    1947         ViewCell::NewMail(); 
    1948  
     1943 
     1944#if STORE_VIEWCELLS_WITH_BVH 
     1945 
     1946 
     1947void BvHierarchy::ReleaseViewCells(const ObjectContainer &objects) 
     1948{ 
    19491949        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    19501950 
    1951         // use mailing to avoid dublicates 
     1951        for (oit = objects.begin(); oit != oit_end; ++ oit) 
     1952        { 
     1953                (*oit)->DelViewCells(); 
     1954        } 
     1955 
     1956        DEL_PTR(mCachedObjects); 
     1957} 
     1958 
     1959 
     1960void BvHierarchy::AssociateViewCellsWithObjects(const ObjectContainer &objects)// const 
     1961{ 
     1962        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
     1963 
    19521964        const bool useMailBoxing = true; 
    19531965 
    1954         int numRays = 0; 
    1955         // loop through all object and collect view cell pvs of this node 
     1966        mCachedObjects = new ObjectContainer(); 
     1967         
    19561968        for (oit = objects.begin(); oit != oit_end; ++ oit) 
    19571969        { 
    1958                 // use mailing to avoid duplicates 
    1959                 numRays += CollectViewCells(*oit, viewCells, useMailBoxing, setCounter, onlyUnmailedRays); 
    1960         } 
    1961  
    1962         return numRays; 
    1963 } 
    1964  
    1965  
    1966 #if STORE_VIEWCELLS_WITH_BVH 
    1967  
    1968  
    1969 void BvHierarchy::ReleaseViewCells(const ObjectContainer &objects) 
    1970 { 
    1971         ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    1972  
    1973         for (oit = objects.begin(); oit != oit_end; ++ oit) 
    1974         { 
    1975                 (*oit)->DelViewCells(); 
    1976         } 
    1977 } 
    1978  
    1979  
    1980 void BvHierarchy::AssociateViewCellsWithObjects(const ObjectContainer &objects) const 
    1981 { 
    1982         ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    1983  
    1984         const bool useMailBoxing = true; 
    1985         for (oit = objects.begin(); oit != oit_end; ++ oit) 
    1986         { 
    1987                 ViewCell::NewMail(); 
    1988                 // use mailing to avoid duplicates 
    1989                 AssociateViewCellsWithObject(*oit, useMailBoxing); 
     1970                if (!(*oit)->GetOrCreateRays()->empty()) 
     1971                { 
     1972                        ViewCell::NewMail(); 
     1973                        // use mailing to avoid duplicates 
     1974                        AssociateViewCellsWithObject(*oit, useMailBoxing); 
     1975                         
     1976                        mCachedObjects->push_back(*oit); 
     1977                } 
    19901978        } 
    19911979} 
     
    19961984        if (!obj->GetOrCreateViewCells()->empty()) 
    19971985        { 
    1998                 cerr << "AssociateViewCellsWithObject: view cells cache not working" << endl; 
     1986                cerr << "AssociateViewCellsWithObject: view cells cache error" << endl; 
     1987                exit(0); 
    19991988        } 
    20001989 
     
    20252014        if (obj->GetOrCreateViewCells()->empty()) 
    20262015        { 
    2027                 //cerr << "h";//CountViewCells: view cells empty, view cells cache not working" << endl; 
     2016                cerr << "h";//CountViewCells: view cells empty, view cells cache not working" << endl; 
    20282017                return CountViewCellsFromRays(obj); 
    20292018        } 
     
    21882177} 
    21892178 
     2179 
     2180int BvHierarchy::CollectViewCells(const ObjectContainer &objects,  
     2181                                                                  ViewCellContainer &viewCells, 
     2182                                                                  const bool setCounter, 
     2183                                                                  const bool onlyUnmailedRays)// const 
     2184{ 
     2185        ViewCell::NewMail(); 
     2186 
     2187        // use mailing to avoid dublicates 
     2188        const bool useMailBoxing = true; 
     2189 
     2190        int numRays = 0; 
     2191 
     2192        if (mCachedObjects) 
     2193        { 
     2194                ObjectContainer::const_iterator oit, oit_end = mCachedObjects->end(); 
     2195 
     2196                // loop through all object and collect view cell pvs of this node 
     2197                for (oit = mCachedObjects->begin(); oit != oit_end; ++ oit) 
     2198                { 
     2199                        // use mailing to avoid duplicates 
     2200                        numRays += CollectViewCells(*oit, viewCells, useMailBoxing, setCounter, onlyUnmailedRays); 
     2201                } 
     2202        } 
     2203        else 
     2204        { 
     2205                ObjectContainer::const_iterator oit, oit_end = objects.end(); 
     2206 
     2207                // loop through all object and collect view cell pvs of this node 
     2208                for (oit = objects.begin(); oit != oit_end; ++ oit) 
     2209                { 
     2210                        // use mailing to avoid duplicates 
     2211                        numRays += CollectViewCellsFromRays(*oit, viewCells, useMailBoxing, setCounter, onlyUnmailedRays); 
     2212                } 
     2213        } 
     2214 
     2215        return numRays; 
     2216} 
     2217 
     2218 
     2219int BvHierarchy::CountViewCells(const ObjectContainer &objects)// const 
     2220{ 
     2221        int nViewCells = 0; 
     2222 
     2223        ViewCell::NewMail(); 
     2224         
     2225        if (mCachedObjects) 
     2226        { 
     2227                ObjectContainer::const_iterator oit, oit_end = mCachedObjects->end(); 
     2228 
     2229                // loop through all object and collect view cell pvs of this node 
     2230                for (oit = mCachedObjects->begin(); oit != oit_end; ++ oit) 
     2231                { 
     2232                        // use mailing to avoid duplicates 
     2233                        nViewCells += CountViewCells(*oit); 
     2234                } 
     2235        } 
     2236        else 
     2237        { 
     2238                ObjectContainer::const_iterator oit, oit_end = objects.end(); 
     2239 
     2240                // loop through all object and collect view cell pvs of this node 
     2241                for (oit = objects.begin(); oit != oit_end; ++ oit) 
     2242                { 
     2243                        nViewCells += CountViewCellsFromRays(*oit); 
     2244                } 
     2245        } 
     2246 
     2247        return nViewCells; 
     2248} 
     2249 
     2250 
    21902251#else 
     2252 
     2253int BvHierarchy::CollectViewCells(const ObjectContainer &objects,  
     2254                                                                  ViewCellContainer &viewCells, 
     2255                                                                  const bool setCounter, 
     2256                                                                  const bool onlyUnmailedRays)// const 
     2257{ 
     2258        ViewCell::NewMail(); 
     2259 
     2260        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
     2261 
     2262        // use mailing to avoid dublicates 
     2263        const bool useMailBoxing = true; 
     2264 
     2265        int numRays = 0; 
     2266        // loop through all object and collect view cell pvs of this node 
     2267        for (oit = objects.begin(); oit != oit_end; ++ oit) 
     2268        { 
     2269                // use mailing to avoid duplicates 
     2270                numRays += CollectViewCells(*oit, viewCells, useMailBoxing, setCounter, onlyUnmailedRays); 
     2271        } 
     2272 
     2273        return numRays; 
     2274} 
     2275 
     2276 
     2277int BvHierarchy::CountViewCells(const ObjectContainer &objects)// const 
     2278{ 
     2279        int nViewCells = 0; 
     2280 
     2281        ViewCell::NewMail(); 
     2282        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
     2283 
     2284        // loop through all object and collect view cell pvs of this node 
     2285        for (oit = objects.begin(); oit != oit_end; ++ oit) 
     2286        { 
     2287                nViewCells += CountViewCells(*oit); 
     2288        } 
     2289 
     2290        return nViewCells; 
     2291} 
     2292 
    21912293 
    21922294int BvHierarchy::CountViewCells(Intersectable *obj) //const 
     
    22742376#endif 
    22752377 
    2276  
    2277 int BvHierarchy::CountViewCells(const ObjectContainer &objects)// const 
    2278 { 
    2279         int nViewCells = 0; 
    2280  
    2281         ViewCell::NewMail(); 
    2282         ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    2283  
    2284         // loop through all object and collect view cell pvs of this node 
    2285         for (oit = objects.begin(); oit != oit_end; ++ oit) 
    2286         { 
    2287                 nViewCells += CountViewCells(*oit); 
    2288         } 
    2289  
    2290         return nViewCells; 
    2291 } 
    22922378 
    22932379 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h

    r2199 r2206  
    860860        int AssociateViewCellsWithObject(Intersectable *obj, const bool useMailBoxing) const; 
    861861 
    862         void AssociateViewCellsWithObjects(const ObjectContainer &objects) const; 
     862        void AssociateViewCellsWithObjects(const ObjectContainer &objects);// const; 
    863863 
    864864        void ReleaseViewCells(const ObjectContainer &objects); 
     
    975975        HierarchyManager *mHierarchyManager; 
    976976 
     977 
     978        ObjectContainer *mCachedObjects; 
    977979 
    978980        //////////////////// 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp

    r2176 r2206  
    289289                        } 
    290290                default: 
    291                         cout << "merging of object type " << obj->Type() << " not implemented yet" << endl; 
     291                        cout << "merge of object type " << obj->Type() << " not implemented yet" << endl; 
    292292                        break; 
    293293                } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h

    r2199 r2206  
    163163        void MergeInPlace(const HashPvs<T, S> &a) 
    164164        { 
    165                 cerr << "not implemented yet" << endl; 
     165                cerr << "hashpvs: mergeinplace not implemented yet" << endl; 
    166166        } 
    167167 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r2199 r2206  
    379379        case SEQUENTIAL: 
    380380                ConstructInterleaved(sampleRays, objects, forcedViewSpace); 
     381                PrintTimings(true); 
    381382                break; 
    382383        case GRADIENT: 
    383384                ConstructInterleavedWithGradient(sampleRays, objects, forcedViewSpace); 
     385                PrintTimings(true); 
    384386                break; 
    385387        default: 
     
    533535        cout << "\n" << ospSteps << " object space partition steps taken" << endl; 
    534536 
    535         PrintTimings(true); 
     537        //PrintTimings(true); 
    536538 
    537539        /////////////// 
     
    555557 
    556558                dirtyList.clear(); 
    557                 PrintTimings(false); 
     559                //PrintTimings(false); 
    558560        } 
    559561        else 
     
    647649                } 
    648650 
    649                 PrintTimings(lastSplitWasOsp); 
     651                //PrintTimings(lastSplitWasOsp); 
    650652        } 
    651653 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.cpp

    r2198 r2206  
    118118float Intersectable::GetArea() const  
    119119{ 
    120         cerr << "GetArea not implemented yet" << endl; 
     120        cerr << "GetArea not implemented yet for this type" << endl; 
    121121        return 0;  
    122122} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r2199 r2206  
    222222                                OptimizeForWindowsApplication="TRUE" 
    223223                                AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(CG_INC_PATH)&quot;;Timer;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src;..\src\ootl\;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\cpp\include\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\src\cpp\include\ootl\mswin" 
    224                                 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PVS" 
     224                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV" 
    225225                                ExceptionHandling="TRUE" 
    226226                                RuntimeLibrary="2" 
     
    260260                <Configuration 
    261261                        Name="release_noqt|Win32" 
    262                         OutputDirectory="Release" 
    263                         IntermediateDirectory="Release" 
     262                        OutputDirectory="$(ConfigurationName)" 
     263                        IntermediateDirectory="$(ConfigurationName)" 
    264264                        ConfigurationType="4" 
    265265                        CharacterSet="2"> 
     
    267267                                Name="VCCLCompilerTool" 
    268268                                Optimization="3" 
    269                                 GlobalOptimizations="TRUE" 
    270                                 InlineFunctionExpansion="2" 
    271                                 EnableIntrinsicFunctions="TRUE" 
    272                                 FavorSizeOrSpeed="1" 
    273                                 OmitFramePointers="TRUE" 
    274                                 EnableFiberSafeOptimizations="TRUE" 
    275                                 OptimizeForProcessor="0" 
     269                                InlineFunctionExpansion="0" 
     270                                FavorSizeOrSpeed="0" 
     271                                OptimizeForProcessor="3" 
    276272                                OptimizeForWindowsApplication="TRUE" 
    277                                 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;Timer" 
     273                                AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;" 
    278274                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;NO_QT" 
    279                                 StringPooling="TRUE" 
    280275                                ExceptionHandling="TRUE" 
    281276                                RuntimeLibrary="2" 
    282                                 EnableEnhancedInstructionSet="2" 
    283277                                DisableLanguageExtensions="FALSE" 
    284278                                ForceConformanceInForLoopScope="FALSE" 
    285                                 RuntimeTypeInfo="FALSE" 
     279                                RuntimeTypeInfo="TRUE" 
    286280                                UsePrecompiledHeader="0" 
    287281                                BrowseInformation="1" 
     
    495489                        <File 
    496490                                RelativePath=".\HashPvs.h"> 
     491                        </File> 
     492                        <File 
     493                                RelativePath=".\HashPvs2.h"> 
    497494                        </File> 
    498495                        <File 
     
    11631160                        </File> 
    11641161                        <File 
     1162                                RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h"> 
     1163                        </File> 
     1164                        <File 
    11651165                                RelativePath=".\sparsehash\src\windows\hash_fun.h"> 
    1166                         </File> 
    1167                         <File 
    1168                                 RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h"> 
    11691166                        </File> 
    11701167                        <File 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r2199 r2206  
    199199                                OptimizeForWindowsApplication="TRUE" 
    200200                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;QtInterface;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;$(NOINHERIT)" 
    201                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PVS" 
     201                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV" 
     202                                StringPooling="TRUE" 
    202203                                ExceptionHandling="TRUE" 
    203204                                RuntimeLibrary="2" 
     
    247248                <Configuration 
    248249                        Name="release_noqt|Win32" 
    249                         OutputDirectory="Release" 
    250                         IntermediateDirectory="Release" 
     250                        OutputDirectory="$(ConfigurationName)" 
     251                        IntermediateDirectory="$(ConfigurationName)" 
    251252                        ConfigurationType="1" 
    252253                        CharacterSet="2"> 
     
    256257                                GlobalOptimizations="TRUE" 
    257258                                InlineFunctionExpansion="2" 
    258                                 EnableIntrinsicFunctions="TRUE" 
    259                                 FavorSizeOrSpeed="1" 
    260                                 OmitFramePointers="TRUE" 
     259                                FavorSizeOrSpeed="1" 
    261260                                EnableFiberSafeOptimizations="TRUE" 
    262                                 OptimizeForProcessor="0" 
     261                                OptimizeForProcessor="3" 
    263262                                OptimizeForWindowsApplication="TRUE" 
    264263                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;" 
    265264                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;NO_QT" 
    266                                 StringPooling="TRUE" 
    267                                 MinimalRebuild="FALSE" 
    268                                 RuntimeLibrary="2" 
    269                                 EnableEnhancedInstructionSet="2" 
    270                                 RuntimeTypeInfo="FALSE" 
     265                                RuntimeLibrary="2" 
     266                                RuntimeTypeInfo="TRUE" 
    271267                                UsePrecompiledHeader="0" 
    272268                                WarningLevel="3" 
     
    280276                                OutputFile="../bin/release/Preprocessor.exe" 
    281277                                LinkIncremental="1" 
    282                                 AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release" 
    283                                 GenerateDebugInformation="FALSE" 
    284                                 SubSystem="1" 
    285                                 LargeAddressAware="0" 
    286                                 OptimizeReferences="2" 
    287                                 EnableCOMDATFolding="2" 
    288                                 OptimizeForWindows98="1" 
     278                                AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;&quot;$(QTDIR)\lib&quot;;.\QtGlRenderer\Release" 
     279                                GenerateDebugInformation="FALSE" 
     280                                SubSystem="1" 
     281                                OptimizeReferences="2" 
     282                                EnableCOMDATFolding="2" 
    289283                                TargetMachine="1" 
    290284                                FixedBaseAddress="1"/> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2205 r2206  
    107107        mMixtureDistribution->GenerateSamples(samplesPerPass, rays); 
    108108         
    109         bool doubleRays = true; 
    110         bool pruneInvalidRays = true; 
     109        const bool doubleRays = true; 
     110        const bool pruneInvalidRays = true; 
    111111        mPreprocessor->CastRays(rays, passSamples, doubleRays, pruneInvalidRays); 
    112112 
     
    118118         
    119119        mStats << 
    120                 "#Pass\n" << pass ++ <<endl<< 
    121                 "#Time\n" << time <<endl<< 
    122                 "#TotalSamples\n" <<totalRays<<endl; 
     120                "#Pass\n" << pass ++ << endl << 
     121                "#Time\n" << time << endl << 
     122                "#TotalSamples\n" << totalRays << endl; 
    123123 
    124124        float last = 0.0f; 
     
    128128                float ratio = 0.0f; 
    129129 
    130                 if (k < mMixtureDistribution->mDistributions.size())  
    131                 { 
    132                         ratio = mMixtureDistribution->mDistributions[k]->mRatio-last; 
     130                if (k < (int)mMixtureDistribution->mDistributions.size())  
     131                { 
     132                        ratio = mMixtureDistribution->mDistributions[k]->mRatio - last; 
    133133                        last = mMixtureDistribution->mDistributions[k]->mRatio; 
    134134                } 
     
    925925                cout << "computing sample contribution for " << (int)constructionSamples.size() << " samples ... "; 
    926926 
    927                 // computes sample contribution of cast rays TODO: leak? 
     927                // computes sample contribution of cast rays 
    928928                if (SAMPLE_AFTER_SUBDIVISION) 
    929929                        ComputeSampleContributions(constructionSamples, true, false); 
     
    20832083float 
    20842084ViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays, 
    2085                                                                                          const bool addRays, 
     2085                                                                                         const bool addContributions, 
    20862086                                                                                         const bool storeViewCells, 
    20872087                                                                                         const bool useHitObjects) 
     
    21042104                else  
    21052105                { 
    2106                         sum += ComputeSampleContribution(*(*it), addRays, storeViewCells, useHitObjects); 
     2106                        sum += ComputeSampleContribution(*(*it), addContributions, storeViewCells, useHitObjects); 
    21072107                } 
    21082108        } 
     
    69006900 
    69016901                long startTime = GetTime(); 
     6902                Real timeDiff; 
    69026903 
    69036904                cout << "casting " << samplesPerPass << " samples ... "; 
     
    69056906         
    69066907                if (0) 
     6908                { 
    69076909                        CastPassSamples(samplesPerPass, evalStrats, evaluationSamples); 
     6910 
     6911                        timeDiff = TimeDiff(startTime, GetTime()); 
     6912                        cout << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
     6913                        Debug << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
     6914                 
     6915                        cout << "computing sample contributions of " << (int)evaluationSamples.size()  << " samples ... "; 
     6916                        Debug << "computing sample contributions of " << (int)evaluationSamples.size()  << " samples ... "; 
     6917 
     6918                        startTime = GetTime(); 
     6919 
     6920                        ComputeSampleContributions(evaluationSamples, true, false); 
     6921 
     6922                        timeDiff = TimeDiff(startTime, GetTime()); 
     6923                        cout << "finished in " << timeDiff * 1e-3 << " secs" << endl; 
     6924                        Debug << "finished in " << timeDiff * 1e-3 << " secs" << endl; 
     6925                } 
    69086926                else 
     6927                { 
    69096928                        // use mixed distributions 
    69106929                        CastEvaluationSamples(samplesPerPass, evaluationSamples); 
    69116930 
     6931                        timeDiff = TimeDiff(startTime, GetTime()); 
     6932                        cout << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
     6933                        Debug << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
     6934                 
     6935                        // don't use sample contributions because already accounted for inside the mixture distribution! 
     6936                } 
     6937 
    69126938                castSamples += samplesPerPass; 
    6913  
    6914                 Real timeDiff = TimeDiff(startTime, GetTime()); 
    6915                  
    6916                 cout << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
    6917                 cout << "computing sample contributions of " << (int)evaluationSamples.size()  << " samples ... "; 
    6918                  
    6919                 Debug << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
    6920                 Debug << "computing sample contributions of " << (int)evaluationSamples.size()  << " samples ... "; 
    6921  
    6922                 startTime = GetTime(); 
    6923  
    6924                 ComputeSampleContributions(evaluationSamples, true, false); 
    6925  
    6926                 timeDiff = TimeDiff(startTime, GetTime()); 
    6927                 cout << "finished in " << timeDiff * 1e-3 << " secs" << endl; 
    6928                 Debug << "finished in " << timeDiff * 1e-3 << " secs" << endl; 
    69296939 
    69306940                if ((castSamples >= samplesForStats + oldSamples) ||  
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r2199 r2206  
    29792979                } 
    29802980        default: 
    2981                 cerr << "not implemented yet" << endl; 
     2981                cerr << "collectdirtycandidates not implemented yet" << endl; 
    29822982                candidate = NULL; 
    29832983                break; 
Note: See TracChangeset for help on using the changeset viewer.