Changeset 1900 for GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h
- Timestamp:
- 12/15/06 23:40:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h
r1899 r1900 57 57 58 58 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; } 60 64 61 65 … … 70 74 public: 71 75 72 73 74 75 76 77 78 79 80 81 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; 82 86 83 87 protected: … … 273 277 Construct(char *str); 274 278 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 275 286 private: 276 287
Note: See TracChangeset
for help on using the changeset viewer.