Changeset 1901 for GTP/trunk/Lib/Vis
- Timestamp:
- 12/15/06 23:42:04 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r1900 r1901 9 9 namespace GtpVisibilityPreprocessor { 10 10 11 12 //HaltonSequence SamplingStrategy::sHalton; 11 13 12 14 HaltonSequence ObjectBasedDistribution::sHalton; … … 124 126 sHalton.GetNext(4, r); 125 127 126 r[0] *= mPreprocessor.mObjects.size()-1;128 r[0] *= (float)mPreprocessor.mObjects.size() - 1; 127 129 const int i = (int)r[0]; 128 130 -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h
r1900 r1901 55 55 virtual int GenerateSamples(const int number, SimpleRayContainer &rays); 56 56 57 58 57 virtual bool GenerateSample(SimpleRay &ray) = 0; 59 58 … … 66 65 virtual void Update(VssRayContainer &vssRays) {} 67 66 68 69 70 67 friend bool LowerRatio(const SamplingStrategy *a, const SamplingStrategy *b) { 71 68 return a->mRatio < b->mRatio; … … 87 84 protected: 88 85 86 //static HaltonSequence sHalton; 89 87 Preprocessor &mPreprocessor; 90 88 }; … … 102 100 103 101 private: 104 virtual bool GenerateSample(SimpleRay &ray);105 106 static HaltonSequence sHalton;102 103 virtual bool GenerateSample(SimpleRay &ray); 104 static HaltonSequence sHalton; 107 105 }; 108 106 … … 118 116 119 117 private: 120 virtual bool GenerateSample(SimpleRay &ray); 118 119 virtual bool GenerateSample(SimpleRay &ray); 121 120 }; 122 121 … … 173 172 174 173 private: 175 virtual bool GenerateSample(SimpleRay &ray);176 177 174 175 virtual bool GenerateSample(SimpleRay &ray); 176 static HaltonSequence sHalton; 178 177 }; 179 178 … … 188 187 189 188 private: 189 190 190 virtual bool GenerateSample(SimpleRay &ray); 191 191 }; … … 229 229 private: 230 230 231 virtual bool GenerateSample(SimpleRay &ray); 232 233 static HaltonSequence sHalton; 231 virtual bool GenerateSample(SimpleRay &ray); 232 static HaltonSequence sHalton; 234 233 }; 235 234 … … 273 272 UpdateRatios(); 274 273 275 // construct distribution mix yure from a string describing the required distributions274 // construct distribution mixture from a string describing the required distributions 276 275 bool 277 276 Construct(char *str); … … 286 285 private: 287 286 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; 294 292 }; 295 293
Note: See TracChangeset
for help on using the changeset viewer.