Changeset 1898 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 12/15/06 17:29:45 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1884 r1898 993 993 int 994 994 Preprocessor::GenerateRays(const int number, 995 996 995 const int sampleType, 996 SimpleRayContainer &rays) 997 997 { 998 998 const int startSize = (int)rays.size(); -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r1891 r1898 9 9 namespace GtpVisibilityPreprocessor { 10 10 11 HaltonSequence SamplingStrategy::sHalton; 11 12 12 13 SamplingStrategy::SamplingStrategy(Preprocessor &preprocessor): … … 73 74 74 75 float r[5]; 75 mHalton.GetNext(5, r);76 sHalton.GetNext(5, r); 76 77 77 78 mPreprocessor.mViewCellsManager->GetViewPoint(origin, … … 81 82 Vector3 point, normal; 82 83 83 r[0] *= mPreprocessor.mObjects.size()-1;84 r[0] *= (float)mPreprocessor.mObjects.size() - 1; 84 85 const int i = (int)r[0]; 85 86 … … 115 116 116 117 float r[4]; 117 mHalton.GetNext(4, r);118 sHalton.GetNext(4, r); 118 119 119 120 r[0] *= mPreprocessor.mObjects.size()-1; … … 191 192 192 193 float r[6]; 193 mHalton.GetNext(6, r);194 sHalton.GetNext(6, r); 194 195 mPreprocessor.mViewCellsManager->GetViewPoint(origin, Vector3(r[0],r[1],r[2])); 195 196 … … 415 416 for (i=0; i < tries; i++) { 416 417 float r[4]; 417 mHalton.GetNext(4, r);418 sHalton.GetNext(4, r); 418 419 419 420 origin = center + (radius*UniformRandomVector(r[0], r[1])); … … 487 488 { 488 489 float r; 489 mHalton.GetNext(1, &r);490 sHalton.GetNext(1, &r); 490 491 491 492 // pickup a distribution -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h
r1891 r1898 69 69 70 70 public: 71 71 72 /// variables usefull for mixed distribution sampling 72 73 int mType; … … 74 75 float mContribution; 75 76 76 77 78 79 77 int mTotalRays; 78 float mTotalContribution; 79 80 float mTime; 80 81 float mRatio; 81 82 82 83 protected: 83 84 84 85 85 Preprocessor &mPreprocessor; 86 static HaltonSequence sHalton; 86 87 }; 87 88 … … 90 91 { 91 92 public: 92 HaltonSequence mHalton;93 //HaltonSequence mHalton; 93 94 94 95 ObjectBasedDistribution(Preprocessor &preprocessor): … … 118 119 class ObjectDirectionBasedDistribution: public SamplingStrategy 119 120 { 120 HaltonSequence mHalton;121 //HaltonSequence mHalton; 121 122 122 123 public: … … 158 159 { 159 160 public: 160 HaltonSequence mHalton;161 //HaltonSequence mHalton; 161 162 SpatialBoxBasedDistribution(Preprocessor &preprocessor): 162 163 SamplingStrategy(preprocessor){ … … 213 214 public: 214 215 //Halton<4> halton; 215 HaltonSequence mHalton;216 //HaltonSequence mHalton; 216 217 217 218 GlobalLinesDistribution(Preprocessor &preprocessor): … … 237 238 */ 238 239 239 class MixtureDistribution : public SamplingStrategy { 240 class MixtureDistribution : public SamplingStrategy 241 { 240 242 public: 241 243 // halton sequence generator for deciding between distributions 242 HaltonSequence mHalton;244 //HaltonSequence mHalton; 243 245 244 246 // container for the distributions
Note: See TracChangeset
for help on using the changeset viewer.