Changeset 2635 for GTP/trunk/Lib/Vis
- Timestamp:
- 01/23/08 03:20:29 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Camera.cpp
r2629 r2635 18 18 #include "RayCaster.h" 19 19 #include "tgaimg.h" 20 20 21 21 22 #ifdef USE_HAVRAN_RAYCASTER -
GTP/trunk/Lib/Vis/Preprocessing/src/HavranRayCaster.cpp
r2629 r2635 243 243 #endif 244 244 245 #if 0245 #if 1 246 246 // This is shooting ray by ray 247 247 SimpleRayContainer::const_iterator sit, sit_end = rays.end(); -
GTP/trunk/Lib/Vis/Preprocessing/src/ObjectPvs.cpp
r2606 r2635 10 10 #include "BvHierarchy.h" 11 11 12 // $$ switched off by JB for testing 13 #define USE_MULTIPLE_OBJECTS 0 12 14 using namespace std; 13 15 … … 38 40 { 39 41 KdLeaf *leaf = static_cast<KdLeaf *>(node); 40 42 #if USE_MULTIPLE_OBJECTS 41 43 // add #objects exclusivly in this node 42 44 pvs += (int)(leaf->mObjects.size() - leaf->mMultipleObjects.size()); … … 56 58 } 57 59 } 60 #else 61 62 // Objects already accounted for can only be found among those 63 // which are referenced in more than one leaf 64 ObjectContainer::const_iterator oit, oit_end = leaf->mObjects.end(); 65 66 for (oit = leaf->mObjects.begin(); oit != oit_end; ++ oit) 67 { 68 Intersectable *object = *oit; 69 70 if (!object->Mailed()) 71 { 72 object->Mail(); 73 ++ pvs; 74 } 75 } 76 77 #endif 58 78 } 59 79 else // traverse tree 60 {80 { 61 81 KdInterior *interior = static_cast<KdInterior *>(node); 62 82 -
GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h
r2634 r2635 9 9 //$$ 19.1. 2008 test for speed 10 10 //#define USE_BIT_PVS 11 #define USE_HASH_PVS11 //#define USE_HASH_PVS 12 12 13 13 -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2634 r2635 152 152 if (!evaluateFilter) 153 153 pvs = viewcell->GetPvs(); 154 else 154 else { 155 155 156 mViewCellsManager->ApplyFilter2(viewcell, 156 157 false, 157 158 mViewCellsManager->GetFilterWidth(), 158 159 pvs); 160 } 159 161 160 162 mUseForcedColors = true; … … 516 518 //mMutex.lock(); 517 519 // mSpatialFilter size is in range 0.001 - 0.1 518 520 mViewCellsManager->ApplyFilter2(viewcell, 519 521 mUseFilter, 520 522 100.0f * mSpatialFilterSize, -
GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.cpp
r2629 r2635 9 9 namespace GtpVisibilityPreprocessor { 10 10 11 12 #define DEBUG_PROCESS_RAY 0 11 13 12 14 #define DEBUG_RAYCAST 0 … … 412 414 { 413 415 if (!hitA.mObject && !hitB.mObject) { 416 #if DEBUG_PROCESS_RAY 417 cout<<"I1 "; 418 #endif 414 419 return 0; 415 420 } … … 419 424 // rays whic degenerate to a point 420 425 if (EpsilonEqualV3(hitA.mPoint, hitB.mPoint, Limits::Small)) { 426 #if DEBUG_PROCESS_RAY 427 cout<<"I2 "; 428 #endif 421 429 return 0; 422 430 } … … 435 443 if (0 || pruneInvalidRays) 436 444 return 0; 437 445 446 #if DEBUG_PROCESS_RAY 447 cout<<"I2 "; 448 #endif 449 438 450 // reset both contributions of this ray 439 451 hitA.mObject = NULL; … … 459 471 hitB.mPoint, 460 472 clipA, 461 clipB)) 473 clipB)) { 474 #if DEBUG_PROCESS_RAY 475 cout<<"I3 "; 476 #endif 477 462 478 return 0; 479 } 463 480 464 481 if (!pruneInvalidRays || hitA.mObject) { -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
r2130 r2635 141 141 if (vssRays[j]->mFlags & VssRay::Valid) { 142 142 Intersectable *obj = vssRays[j]->mTerminationObject; 143 144 143 if (obj) { 145 144 // if ray not outside of view space -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2634 r2635 3206 3206 ) 3207 3207 { 3208 pvs.Reserve(viewCell->GetFilteredPvsSize()); 3209 3208 3209 3210 pvs.Reserve(viewCell->GetFilteredPvsSize()); 3211 3210 3212 PvsFilterStatistics stats; 3211 3213 … … 3369 3371 // $$ warning collect objects takes only unmailed ones! 3370 3372 if (mUseKdPvs) { 3371 GetPreprocessor()->mKdTree->CollectKdObjects(box, objects);3372 //GetPreprocessor()->mKdTree->CollectSmallKdObjects(box, objects, 0.02f);3373 // GetPreprocessor()->mKdTree->CollectKdObjects(box, objects); 3374 GetPreprocessor()->mKdTree->CollectSmallKdObjects(box, objects, 0.02f); 3373 3375 3374 3376 } else … … 3407 3409 viewCell->SetFilteredPvsSize(pvs.GetSize()); 3408 3410 3411 // cout<<"pvsCost="<<basePvs.EvalPvsCost()<<endl; 3412 // cout<<"fPvsCost="<<pvs.EvalPvsCost()<<endl; 3413 3414 3409 3415 // warning: not thread-safe! 3410 3416 if (!mUseKdPvs) -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r2629 r2635 558 558 #rayCastMethod 1 559 559 # Havran - 2 - static scene 560 rayCastMethod 2560 # rayCastMethod 2 561 561 # Havran - 3 - dynamic scene 562 rayCastMethod 3562 # rayCastMethod 3 563 563 564 564 loadMeshes false -
GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
r2634 r2635 4 4 5 5 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass= 500000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_ray_cast_method=2 -preprocessor_detect_empty_viewspace-"6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=1000000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_ray_cast_method=1 -preprocessor_detect_empty_viewspace+" 7 7 8 8 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" … … 29 29 #VIEWCELLS=../data/test1/test-viewcells.xml 30 30 31 SCENE=../data/Arena/arena-high-lods.obj32 VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz31 #SCENE=../data/Arena/arena-high-lods.obj 32 #VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz 33 33 #VIEWCELLS=../data/Arena/viewcells-5000.xml.gz 34 34 #VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz 35 35 36 36 37 #SCENE=../data/vienna/vienna_cropped.obj38 #VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz37 SCENE=../data/vienna/vienna_cropped.obj 38 VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 39 39 40 40 #VIEWCELLS=../data/vienna/vienna-sequential-30000-single-viewcell.xml
Note: See TracChangeset
for help on using the changeset viewer.