- Timestamp:
- 01/23/07 01:06:46 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp
r2015 r2021 87 87 88 88 mMixtureDistribution->GenerateSamples(mSamplesPerPass, rays); 89 89 90 90 bool doubleRays = true; 91 91 CastRays(rays, vssRays, doubleRays, pruneInvalidRays); -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r2019 r2021 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: po 22. I 22:05:05 20073 # Generated by qmake (2.00a) (Qt 4.1.2) on: út 23. I 00:22:45 2007 4 4 # Project: preprocessor.pro 5 5 # Template: app -
GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp
r2011 r2021 90 90 mutationRays++; 91 91 92 Intersectable *newObject = 93 mPreprocessor.mViewCellsManager->GetIntersectable( 94 *vssRays[i], 95 true); 96 97 Intersectable *oldObject = 98 mPreprocessor.mViewCellsManager->GetIntersectable( 99 *mRays[vssRays[i]->mGeneratorId].mRay, 100 true); 92 Intersectable *newObject = vssRays[i]->mTerminationObject; 93 94 Intersectable *oldObject =mRays[vssRays[i]->mGeneratorId].mRay->mTerminationObject; 101 95 102 96 if (oldObject == newObject) … … 131 125 #define DIST_THRESHOLD 3.0f 132 126 133 Intersectable *oldObject = 134 mPreprocessor.mViewCellsManager->GetIntersectable( 135 *oldRay, 136 true); 127 Intersectable *oldObject = oldRay->mTerminationObject; 137 128 138 129 … … 156 147 mutationRays++; 157 148 158 Intersectable *newObject = 159 mPreprocessor.mViewCellsManager->GetIntersectable( 160 *vssRays[i], 161 true); 149 Intersectable *newObject = vssRays[i]->mTerminationObject; 162 150 163 151 … … 370 358 Vector3 line = 2.0f*(oldPivot - newPivot); 371 359 372 Intersectable *occluder = mPreprocessor.mViewCellsManager->GetIntersectable( 373 newRay, 374 true); 360 Intersectable *occluder = newRay.mTerminationObject; 375 361 376 362 AxisAlignedBox3 box = occluder->GetBox(); … … 442 428 exporter->SetFilled(); 443 429 444 Intersectable *occludee = mPreprocessor.mViewCellsManager->GetIntersectable( 445 oldRay, 446 true); 430 Intersectable *occludee = 431 oldRay.mTerminationObject; 447 432 448 433 exporter->SetForcedMaterial(RgbColor(0,0,1)); … … 734 719 VssRay *ray = mRays[index].mRay; 735 720 736 Intersectable *object = mPreprocessor.mViewCellsManager->GetIntersectable( 737 *ray, 738 true); 721 Intersectable *object = ray->mTerminationObject; 739 722 740 723 AxisAlignedBox3 box = object->GetBox(); -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2017 r2021 1300 1300 #endif 1301 1301 } 1302 1303 mViewCellsManager->DeterminePvsObjects(vssRays 1304 ); 1305 1302 1306 } 1303 1307 -
GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.cpp
r2014 r2021 312 312 Debug<<"PR2c"<<flush; 313 313 #endif 314 314 315 315 if (validA) 316 vssRay->mFlags |= VssRay::Valid; 317 316 vssRay->mFlags |= VssRay::Valid; 317 318 318 319 vssRay->mDistribution = simpleRay.mDistribution; 319 320 vssRay->mGeneratorId = simpleRay.mGeneratorId; … … 343 344 vssRay->mFlags |= VssRay::Valid; 344 345 346 345 347 vssRay->mDistribution = simpleRay.mDistribution; 346 348 vssRay->mGeneratorId = simpleRay.mGeneratorId; -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2019 r2021 2615 2615 2616 2616 2617 void 2618 ViewCellsManager::DeterminePvsObjects( 2619 VssRayContainer &rays, 2620 const bool useHitObjects) 2621 { 2622 if (!useHitObjects) { 2623 VssRayContainer::const_iterator it, it_end = rays.end(); 2624 for (it = rays.begin(); it != it_end; ++ it) { 2625 VssRay *vssRay = *it; 2626 // set only the termination object 2627 vssRay->mTerminationObject = GetIntersectable( 2628 *vssRay, 2629 true); 2630 } 2631 } 2632 } 2633 2634 2617 2635 float ViewCellsManager::ComputeSampleContribution(VssRay &ray, 2618 2636 const bool addRays, … … 2629 2647 Intersectable *terminationObj; 2630 2648 2631 if (!useHitObjects) 2632 terminationObj = GetIntersectable(ray, true); 2633 else 2634 terminationObj = ray.mTerminationObject; 2649 terminationObj = ray.mTerminationObject; 2635 2650 2636 2651 ComputeViewCellContribution(currentViewCell, … … 2716 2731 Intersectable *terminationObj; 2717 2732 2718 objTimer.Entry();2733 // objTimer.Entry(); 2719 2734 2720 2735 // obtain pvs entry (can be different from hit object) 2721 if (!useHitObjects) 2722 terminationObj = GetIntersectable(ray, true); 2723 else 2724 terminationObj = ray.mTerminationObject; 2725 2726 objTimer.Exit(); 2736 terminationObj = ray.mTerminationObject; 2737 2738 // objTimer.Exit(); 2727 2739 2728 2740 pvsTimer.Entry(); -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r2017 r2021 381 381 SortViewCellPvs(); 382 382 383 // map the ray intersection objects from triangles to high level objects... 384 void 385 DeterminePvsObjects( 386 VssRayContainer &rays, 387 const bool useHitObjects = false); 388 383 389 /** Sets validity of view cell 384 390 */ -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r2017 r2021 3454 3454 BspInterior *in = static_cast<BspInterior *>(node); 3455 3455 3456 Plane3 splitPlane = in->GetPlane();3456 Plane3 &splitPlane = in->GetPlane(); 3457 3457 3458 3458 const int entSide = splitPlane.Side(entp, thresh); … … 3503 3503 3504 3504 // question: always contribute to leaf or to currently active view cell? 3505 if (0)3506 viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell());3507 else3508 3505 // if (0) 3506 // viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 3507 // else 3508 viewCell = leaf->GetViewCell(); 3509 3509 3510 3510 if (!viewCell->Mailed()) -
GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
r2016 r2021 3 3 4 4 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 5 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer --preprocessor_evaluate_filter- -samples_per_pass=1000000"5 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_pass=1000000" 6 6 7 7 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" … … 58 58 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 59 59 -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 60 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 60 61 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4j.xml \ 61 62 -preprocessor_stats=$PREFIX-i-mixed-b1-n4j.log \
Note: See TracChangeset
for help on using the changeset viewer.