- Timestamp:
- 01/21/07 23:05:34 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp
r2002 r2008 68 68 69 69 70 bool mExportAnimation = false;71 70 vector<VssRayContainer> rayBuffer; 72 71 -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r2006 r2008 1910 1910 "false"); 1911 1911 1912 RegisterOption("Preprocessor.Export.rays", optBool, "export_rays=", "false"); 1913 RegisterOption("Preprocessor.Export.numRays", optInt, "export_num_rays=", "5000"); 1912 RegisterOption("Preprocessor.Export.rays", optBool, "export_rays", "false"); 1913 RegisterOption("Preprocessor.Export.animation", optBool, "export_animation", "false"); 1914 RegisterOption("Preprocessor.Export.numRays", optInt, "export_num_rays=", "5000"); 1914 1915 1915 1916 /*************************************************************************/ -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h
r2002 r2008 174 174 return mPvsStat.GetAvgError()*GetWidth()*GetHeight(); 175 175 } 176 177 virtual float GetMaxPixelError() { 178 return mPvsStat.GetMaxError()*GetWidth()*GetHeight(); 179 } 176 180 177 181 public: -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r2006 r2008 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: ne 21. I 01:18:1920073 # Generated by qmake (2.00a) (Qt 4.1.2) on: ne 21. I 22:47:46 2007 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 63 63 $(MAKE) -f $(MAKEFILE).Debug uninstall 64 64 65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc 2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 66 66 C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 67 67 C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2005 r2008 167 167 168 168 Environment::GetSingleton()->GetBoolValue("Preprocessor.Export.rays", mExportRays); 169 Environment::GetSingleton()->GetBoolValue("Preprocessor.Export.animation", mExportAnimation); 169 170 Environment::GetSingleton()->GetIntValue("Preprocessor.Export.numRays", mExportNumRays); 170 171 171 172 172 Environment::GetSingleton()->GetIntValue("Preprocessor.samplesPerPass", mSamplesPerPass); … … 1201 1201 const long t1 = GetTime(); 1202 1202 1203 #if 01203 #if 1 1204 1204 mRayCaster->SortRays(rays); 1205 1205 cout<<"Rays sorted in "<<TimeDiff(t1, GetTime())<<" s."<<endl; 1206 1206 1207 if ( 1) {1207 if (0) { 1208 1208 VssRayContainer tmpRays; 1209 1209 int m = 50000; … … 1403 1403 exporter->SetFilled(); 1404 1404 // $$JB temporarily do not export the scene 1405 if ( 1)1405 if (0) 1406 1406 exporter->ExportScene(mSceneGraph->GetRoot()); 1407 1407 exporter->SetWireframe(); … … 1439 1439 "#AvgPvsRenderError\n" <<renderer->mPvsStat.GetAvgError()<<endl<< 1440 1440 "#AvgPixelError\n" <<renderer->GetAvgPixelError()<<endl<< 1441 "#MaxPixelError\n" <<renderer->GetMaxPixelError()<<endl<< 1441 1442 "#MaxPvsRenderError\n" <<renderer->mPvsStat.GetMaxError()<<endl<< 1442 1443 "#ErrorFreeFrames\n" <<renderer->mPvsStat.GetErrorFreeFrames()<<endl<< -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h
r2003 r2008 235 235 236 236 bool mExportRays; 237 bool mExportAnimation; 237 238 int mExportNumRays; 238 239 -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2002 r2008 120 120 121 121 SetupCamera(); 122 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );122 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); 123 123 glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE); 124 124 125 126 glStencilFunc(GL_EQUAL, 0x0, 0x1); 127 glStencilOp(GL_KEEP, GL_KEEP, GL_INCR); 125 128 126 129 // // Render PVS … … 137 140 // glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); 138 141 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 142 glEnable(GL_STENCIL_TEST); 139 143 140 144 mUseFalseColors = true; … … 142 146 OcclusionQuery *query = mOcclusionQueries[0]; 143 147 148 144 149 query->BeginQuery(); 145 150 … … 149 154 150 155 query->EndQuery(); 151 156 glDisable(GL_STENCIL_TEST); 152 157 // reenable other state 153 158 // int wait=0; -
GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.cpp
r2002 r2008 163 163 int i; 164 164 165 // if (depth%4==0) 165 const int batchsize = 8192; 166 167 // if (r - l < 32*batchsize) 166 168 // offset = 3; 169 170 // if (depth%5==0) 171 // offset = 3; 167 172 168 173 for (i=offset; i < offset + 3; i++) { … … 174 179 } 175 180 176 // cout<<depth<<" "<<axis<< endl;181 // cout<<depth<<" "<<axis<<" "<<l<<" "<<r<<endl; 177 182 178 183 i=l; … … 182 187 // float x = rays[(l+r)/2].GetParam(axis); 183 188 do { 184 while( rays[i].GetParam(axis) < x && i<=j)189 while(i<j && rays[i].GetParam(axis) < x) 185 190 i++; 186 while( x <= rays[j].GetParam(axis) && i<=j)191 while(i<j && x < rays[j].GetParam(axis)) 187 192 j--; 188 193 … … 193 198 } 194 199 } while (i<=j); 195 196 if (l + 4 < j ) { 200 201 202 if (l + batchsize < j ) { 197 203 // set new max 198 204 float save = box[axis+6]; … … 200 206 _SortRays(rays, l, j, depth+1, box); 201 207 box[axis+6] = save; 208 } else { 209 // for (int k=0; k < 6; k++) 210 // cout<<k<<" "<<box[k]<<" - "<<box[k+6]<<endl; 202 211 } 203 212 204 if (i + 4< r) {213 if (i + batchsize < r) { 205 214 // set new min 206 215 box[axis] = x; 207 216 _SortRays(rays, i, r, depth+1, box); 217 } else { 218 // for (int k=0; k < 6; k++) 219 // cout<<k<<" "<<box[k]<<" - "<<box[k+6]<<endl; 208 220 } 221 209 222 } 210 223 -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r2004 r2008 653 653 if (strcmp(curr, "mutation")==0) { 654 654 // temp matt: still no mutationstrategy! 655 //mDistributions.push_back(new MutationBasedDistribution(mPreprocessor)); 655 656 mDistributions.push_back(new MutationBasedDistribution(mPreprocessor)); 656 657 } 657 658 -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r2006 r2008 62 62 detectEmptyViewSpace true 63 63 # pvsRenderErrorSamples 0 64 pvsRenderErrorSamples 500064 pvsRenderErrorSamples 10000 65 65 quitOnFinish false 66 66 computeVisibility true … … 83 83 } 84 84 Export { 85 rays true85 rays false 86 86 numRays 5000 87 87 } -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r2003 r2008 351 351 // $$matt 352 352 preprocessor->renderer = 353 new QtGlRendererBuffer( 512, 512,353 new QtGlRendererBuffer(1024, 1024, 354 354 preprocessor->mSceneGraph, 355 355 preprocessor->mViewCellsManager, -
GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
r2006 r2008 2 2 3 3 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 4 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer - -preprocessor_evaluate_filter+"4 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter-" 5 5 6 6 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" … … 49 49 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 50 50 -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 51 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4 g.xml \52 -preprocessor_stats=$PREFIX-i-mixed-b1-n4 g.log \53 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4 g.hlog51 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4h.xml \ 52 -preprocessor_stats=$PREFIX-i-mixed-b1-n4h.log \ 53 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4h.hlog 54 54 55 55
Note: See TracChangeset
for help on using the changeset viewer.