Ignore:
Timestamp:
12/15/06 23:40:27 (18 years ago)
Author:
bittner
Message:

experiments with different contribution computations

File:
1 edited

Legend:

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

    r1899 r1900  
    5757 
    5858        virtual bool GenerateSample(SimpleRay &ray) = 0; 
    59    
     59 
     60  // true if the strategy keeps pointers to rays and thus they should get deleted 
     61  // outside, in that case the strategy has to use reference counting and deleting the rays 
     62  // by itself if the number of references drops to zero 
     63  virtual bool RequiresRays() { return false; } 
    6064 
    6165 
     
    7074public: 
    7175 
    72         /// variables usefull for mixed distribution sampling 
    73         int mType; 
    74         int mRays; 
    75         float mContribution; 
    76  
    77         int mTotalRays; 
    78         float mTotalContribution; 
    79  
    80         float mTime; 
    81         float mRatio; 
     76  /// variables usefull for mixed distribution sampling 
     77  int mType; 
     78  int mRays; 
     79  float mContribution; 
     80   
     81  int mTotalRays; 
     82  float mTotalContribution; 
     83   
     84  float mTime; 
     85  float mRatio; 
    8286 
    8387protected: 
     
    273277  Construct(char *str); 
    274278 
     279  virtual bool RequiresRays() { 
     280        for (int i=0; i < mDistributions.size(); i++) 
     281          if (mDistributions[i]->RequiresRays()) 
     282                return true; 
     283        return false; 
     284  } 
     285 
    275286private: 
    276287 
Note: See TracChangeset for help on using the changeset viewer.