Changeset 2614 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 01/18/08 16:28:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2609 r2614 2407 2407 Intersectable *obj, 2408 2408 const Vector3 &pt, 2409 constbool addSamplesToPvs)2409 bool addSamplesToPvs) 2410 2410 { 2411 2411 // check if we are outside of view space … … 2424 2424 if (addSamplesToPvs) 2425 2425 { 2426 //if (obj->Type() == Intersectable::TRANSFORMED_MESH_INSTANCE)cout << "here12 " << endl; 2427 2426 2428 hasAbsContribution = viewCell->GetPvs().AddSampleDirtyCheck(obj, ray.mPdf); 2427 2429 //hasAbsContribution = viewCell->GetPvs().AddSample(obj,ray.mPdf); … … 2437 2439 viewCell->GetPvs().GetSampleContribution(obj, ray.mPdf, relContribution); 2438 2440 } 2439 2440 //cout << "here6: " << ray.GetDir() << " ";2441 2441 2442 2442 // $$ clear the relative contribution as it is currently not correct anyway … … 2483 2483 2484 2484 void 2485 ViewCellsManager::DeterminePvsObjects( 2486 VssRayContainer &rays, 2487 const bool useHitObjects) 2485 ViewCellsManager::DeterminePvsObjects(VssRayContainer &rays, 2486 bool useHitObjects) 2488 2487 { 2489 2488 if (!useHitObjects) … … 2498 2497 // set only the termination object 2499 2498 vssRay->mTerminationObject = GetIntersectable(*vssRay, true); 2499 2500 if (vssRay->mTerminationObject->Type() == Intersectable::TRANSFORMED_MESH_INSTANCE) 2501 cout << "r"; 2502 2500 2503 #if 0 2501 if (vssRay->mTerminationObject == NULL) { 2502 cerr<<"Error in DeterminePvsObjects - termination object maps to NULL!"<<endl; 2503 } 2504 if (vssRay->mTerminationObject == NULL) 2505 cerr<<"Error in DeterminePvsObjects - termination object maps to NULL!"<<endl; 2504 2506 #endif 2505 2507 } 2506 2508 } 2507 2508 2509 } 2509 2510 … … 2547 2548 float 2548 2549 ViewCellsManager::ComputeSampleContribution(VssRay &ray, 2549 constbool addRays,2550 constbool storeViewCells,2551 constbool useHitObjects)2550 bool addRays, 2551 bool storeViewCells, 2552 bool useHitObjects) 2552 2553 { 2553 2554 ray.mPvsContribution = 0; … … 2595 2596 // traverse the view space subdivision 2596 2597 CastLineSegment(origin, termination, viewCells); 2597 2598 2598 lastVssRay = &ray; 2599 2599 } … … 2631 2631 pvsTimer.Entry(); 2632 2632 #endif 2633 2633 //if (terminationObj->Type() == Intersectable::TRANSFORMED_MESH_INSTANCE) 2634 // cout << "found tmi: " << Intersectable::GetTypeName(terminationObj) << " " << viewCells.size() << endl; 2634 2635 bool contri = false; 2635 2636 ViewCellContainer::const_iterator it = viewCells.begin(); … … 2638 2639 { 2639 2640 if (ComputeViewCellContribution(*it, 2640 ray,2641 terminationObj,2642 ray.mTermination,2643 addRays))2641 ray, 2642 terminationObj, 2643 ray.mTermination, 2644 addRays)) 2644 2645 { 2645 2646 contri = true; … … 3166 3167 void ViewCellsManager::MergeViewCellsRecursivly(ObjectPvs &pvs, 3167 3168 const ViewCellContainer &viewCells, 3168 constint leftIdx,3169 constint rightIdx) const3169 int leftIdx, 3170 int rightIdx) const 3170 3171 { 3171 3172 if (leftIdx == rightIdx)
Note: See TracChangeset
for help on using the changeset viewer.