Ignore:
Timestamp:
01/18/08 16:28:30 (16 years ago)
Author:
mattausch
Message:

worked on dynamic objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2609 r2614  
    24072407                                                                                                   Intersectable *obj, 
    24082408                                                                                                   const Vector3 &pt, 
    2409                                                                                                    const bool addSamplesToPvs) 
     2409                                                                                                   bool addSamplesToPvs) 
    24102410{ 
    24112411        // check if we are outside of view space 
     
    24242424        if (addSamplesToPvs)  
    24252425        { 
     2426                //if (obj->Type() == Intersectable::TRANSFORMED_MESH_INSTANCE)cout << "here12 " << endl; 
     2427 
    24262428                hasAbsContribution = viewCell->GetPvs().AddSampleDirtyCheck(obj, ray.mPdf); 
    24272429                //hasAbsContribution = viewCell->GetPvs().AddSample(obj,ray.mPdf); 
     
    24372439                        viewCell->GetPvs().GetSampleContribution(obj, ray.mPdf, relContribution); 
    24382440        } 
    2439  
    2440         //cout << "here6: " << ray.GetDir() << " "; 
    24412441 
    24422442        // $$ clear the relative contribution as it is currently not correct anyway 
     
    24832483 
    24842484void 
    2485 ViewCellsManager::DeterminePvsObjects( 
    2486                                                                           VssRayContainer &rays, 
    2487                                                                           const bool useHitObjects) 
     2485ViewCellsManager::DeterminePvsObjects(VssRayContainer &rays, 
     2486                                                                          bool useHitObjects) 
    24882487{ 
    24892488        if (!useHitObjects)  
     
    24982497                        // set only the termination object 
    24992498                        vssRay->mTerminationObject = GetIntersectable(*vssRay, true); 
     2499                         
     2500                        if (vssRay->mTerminationObject->Type() == Intersectable::TRANSFORMED_MESH_INSTANCE)      
     2501                                cout << "r"; 
     2502 
    25002503#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; 
    25042506#endif 
    25052507                } 
    25062508        } 
    2507    
    25082509} 
    25092510 
     
    25472548float 
    25482549ViewCellsManager::ComputeSampleContribution(VssRay &ray, 
    2549                                                                                         const bool addRays, 
    2550                                                                                         const bool storeViewCells, 
    2551                                                                                         const bool useHitObjects) 
     2550                                                                                        bool addRays, 
     2551                                                                                        bool storeViewCells, 
     2552                                                                                        bool useHitObjects) 
    25522553{ 
    25532554        ray.mPvsContribution = 0; 
     
    25952596                // traverse the view space subdivision 
    25962597                CastLineSegment(origin, termination, viewCells); 
    2597  
    25982598                lastVssRay = &ray; 
    25992599        } 
     
    26312631        pvsTimer.Entry(); 
    26322632#endif 
    2633          
     2633        //if (terminationObj->Type() == Intersectable::TRANSFORMED_MESH_INSTANCE) 
     2634        //      cout << "found tmi: " << Intersectable::GetTypeName(terminationObj) << " " << viewCells.size() << endl; 
    26342635        bool contri = false; 
    26352636        ViewCellContainer::const_iterator it = viewCells.begin(); 
     
    26382639        { 
    26392640                if (ComputeViewCellContribution(*it,  
    2640                                                 ray,  
    2641                                                                         terminationObj,  
    2642                                                                         ray.mTermination,  
    2643                                                                         addRays)) 
     2641                                                    ray,  
     2642                                                                                terminationObj,  
     2643                                                                                ray.mTermination,  
     2644                                                                                addRays)) 
    26442645                { 
    26452646                        contri = true; 
     
    31663167void ViewCellsManager::MergeViewCellsRecursivly(ObjectPvs &pvs,  
    31673168                                                                                                const ViewCellContainer &viewCells,  
    3168                                                                                                 const int leftIdx,  
    3169                                                                                                 const int rightIdx) const 
     3169                                                                                                int leftIdx,  
     3170                                                                                                int rightIdx) const 
    31703171{ 
    31713172        if (leftIdx == rightIdx) 
Note: See TracChangeset for help on using the changeset viewer.