Ignore:
Timestamp:
07/06/07 03:18:02 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h

    r2529 r2530  
    88 
    99 
    10 // 
    1110 
    1211namespace GtpVisibilityPreprocessor { 
    1312 
    1413 
     14/** Iterator over the pvs. 
     15*/ 
    1516template<typename T, typename S> 
    1617class PvsIterator 
     
    2425        } 
    2526 
    26         bool HasMoreEntries() const  
    27         { 
    28                 return (mItCurrent != mItEnd); 
    29         } 
    30  
    31         T Next(S &pdf) 
    32         { 
     27        inline bool HasMoreEntries() const { return (mItCurrent != mItEnd);     } 
     28 
     29        inline T Next(S &pdf) { 
    3330                pdf = (*mItCurrent).mData; 
    3431                return (*(mItCurrent ++)).mObject; 
    3532        } 
    3633 
    37         T Next() 
    38         { 
    39                 return (*(mItCurrent ++)).mObject; 
    40         } 
     34        inline T Next() { return (*(mItCurrent ++)).mObject; } 
     35 
    4136 
    4237private: 
     38         
    4339        typename vector<PvsEntry<T, S> >::const_iterator mItCurrent; 
    4440        typename vector<PvsEntry<T, S> >::const_iterator mItEnd; 
     
    5652public: 
    5753 
    58         VerbosePvs(): mSamples(0), mEntries(), mLastSorted(0), mQueriesSinceSort(0) {} 
     54        VerbosePvs(): mSamples(0), mEntries(), mLastSorted(0), mQueriesSinceSort(0)  
     55        {} 
    5956 
    6057        /** creates pvs and initializes it with the given entries.  
     
    619616 
    620617template <typename T, typename S>  
    621 bool VerbosePvs<T, S>::AddSampleDirtyCheck(T sample, 
    622                                                                         const float pdf) 
    623                                                                         //,float &contribution) 
     618bool VerbosePvs<T, S>::AddSampleDirtyCheck(T sample, const float pdf) 
    624619{ 
    625620        ++ mSamples; 
     
    633628           
    634629                data.mSumPdf += pdf; 
    635                 //contribution = pdf / data.mSumPdf; 
    636  
    637630        return false; 
    638631        } 
     
    640633        { 
    641634                AddSampleDirty(sample, pdf); 
    642                 //contribution = 1.0f; 
    643                  
    644635                return true; 
    645636        } 
Note: See TracChangeset for help on using the changeset viewer.