Changeset 1901


Ignore:
Timestamp:
12/15/06 23:42:04 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
2 edited

Legend:

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

    r1900 r1901  
    99namespace GtpVisibilityPreprocessor { 
    1010 
     11 
     12//HaltonSequence SamplingStrategy::sHalton; 
    1113 
    1214HaltonSequence ObjectBasedDistribution::sHalton; 
     
    124126  sHalton.GetNext(4, r); 
    125127 
    126   r[0] *= mPreprocessor.mObjects.size()-1; 
     128  r[0] *= (float)mPreprocessor.mObjects.size() - 1; 
    127129  const int i = (int)r[0]; 
    128130   
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h

    r1900 r1901  
    5555        virtual int GenerateSamples(const int number, SimpleRayContainer &rays); 
    5656 
    57  
    5857        virtual bool GenerateSample(SimpleRay &ray) = 0; 
    5958 
     
    6665  virtual void Update(VssRayContainer &vssRays) {} 
    6766 
    68  
    69  
    7067  friend bool LowerRatio(const SamplingStrategy *a, const SamplingStrategy *b) { 
    7168        return a->mRatio < b->mRatio; 
     
    8784protected: 
    8885 
     86        //static HaltonSequence sHalton; 
    8987        Preprocessor &mPreprocessor; 
    9088}; 
     
    102100 
    103101private: 
    104   virtual bool GenerateSample(SimpleRay &ray); 
    105  
    106    static HaltonSequence sHalton; 
     102   
     103        virtual bool GenerateSample(SimpleRay &ray); 
     104    static HaltonSequence sHalton; 
    107105}; 
    108106 
     
    118116 
    119117private: 
    120   virtual bool GenerateSample(SimpleRay &ray); 
     118         
     119        virtual bool GenerateSample(SimpleRay &ray); 
    121120}; 
    122121 
     
    173172   
    174173private: 
    175            virtual bool GenerateSample(SimpleRay &ray); 
    176  
    177            static HaltonSequence sHalton; 
     174         
     175        virtual bool GenerateSample(SimpleRay &ray); 
     176        static HaltonSequence sHalton; 
    178177}; 
    179178 
     
    188187          
    189188private: 
     189 
    190190         virtual bool GenerateSample(SimpleRay &ray); 
    191191}; 
     
    229229private: 
    230230 
    231   virtual bool GenerateSample(SimpleRay &ray); 
    232  
    233    static HaltonSequence sHalton; 
     231        virtual bool GenerateSample(SimpleRay &ray); 
     232        static HaltonSequence sHalton; 
    234233}; 
    235234 
     
    273272  UpdateRatios(); 
    274273 
    275   // construct distribution mixyure from a string describing the required distributions 
     274  // construct distribution mixture from a string describing the required distributions 
    276275  bool 
    277276  Construct(char *str); 
     
    286285private: 
    287286 
    288    // Generate a new sample according to a mixture distribution 
    289   virtual bool GenerateSample(SimpleRay &ray); 
    290  
    291 // halton sequence generator for deciding between distributions 
    292   static HaltonSequence sHalton; 
    293    
     287        // Generate a new sample according to a mixture distribution 
     288        virtual bool GenerateSample(SimpleRay &ray); 
     289 
     290        // halton sequence generator for deciding between distributions 
     291        static HaltonSequence sHalton; 
    294292}; 
    295293 
Note: See TracChangeset for help on using the changeset viewer.