Changeset 1771 for GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
- Timestamp:
- 11/20/06 14:02:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1769 r1771 151 151 char buffer[256]; 152 152 Environment::GetSingleton()->GetStringValue("Preprocessor.visibilityFile", buffer); 153 154 153 mVisibilityFileName = buffer; 154 155 Environment::GetSingleton()->GetStringValue("Preprocessor.stats", buffer); 156 mStats.open(buffer); 157 158 155 159 Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilityFilter", mApplyVisibilityFilter); 156 160 Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilitySpatialFilter", … … 935 939 } 936 940 937 int Preprocessor::GenerateRays(const int number, 938 const int sampleType, 939 SimpleRayContainer &rays) 940 { 941 const int startSize = (int)rays.size(); 942 SamplingStrategy *strategy = GenerateSamplingStrategy(sampleType); 943 944 if (!strategy) 945 { 946 return 0; 947 } 948 949 int castRays = 0; 950 951 for (int i = 0; (int)rays.size() - startSize < number; ++ i) 952 { 953 SimpleRay newRay; 954 955 if (strategy->GenerateSample(newRay)) 956 { 941 942 int 943 Preprocessor::GenerateRays(const int number, 944 const SamplingStrategy &strategy, 945 SimpleRayContainer &rays) 946 { 947 return strategy.GenerateSamples(number, rays); 948 } 949 950 int 951 Preprocessor::GenerateRays(const int number, 952 const int sampleType, 953 SimpleRayContainer &rays) 954 { 955 const int startSize = (int)rays.size(); 956 SamplingStrategy *strategy = GenerateSamplingStrategy(sampleType); 957 int castRays = 0; 958 959 if (!strategy) 960 { 961 return 0; 962 } 963 957 964 #if 1 958 rays.AddRay(newRay); 959 ++ castRays; 965 if (!strategy->GenerateSamples(number, rays)) 966 return false; 967 ++ castRays; 960 968 #else 961 962 969 GenerateRayBundle(rays, newRay, 16, 0); 970 castRays += 16; 963 971 #endif 964 } 965 } 966 967 delete strategy; 968 return castRays; 972 973 delete strategy; 974 return castRays; 969 975 } 970 976 … … 1155 1161 } 1156 1162 1157 1158 } 1163 void 1164 Preprocessor::EvalViewCellHistogram() 1165 { 1166 char filename[256]; 1167 Environment::GetSingleton()->GetStringValue("Preprocessor.histogram.file", 1168 filename); 1169 1170 // mViewCellsManager->EvalViewCellHistogram(filename, 1000000); 1171 mViewCellsManager->EvalViewCellHistogramForPvsSize(filename, 1000000); 1172 } 1173 1174 }
Note: See TracChangeset
for help on using the changeset viewer.