Ignore:
Timestamp:
05/24/08 11:59:35 (16 years ago)
Author:
mattausch
Message:

enabled view cell visualization

File:
1 edited

Legend:

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

    r2702 r2705  
    14451445 
    14461446 
    1447 float ViewCellsManager::ComputeRenderCost(const int tri, const int obj) //const 
     1447float ViewCellsManager::ComputeRenderCost(int tri, int obj) //const 
    14481448{ 
    14491449        return max((float)tri * mTriangleWeight, (float)obj * mObjectWeight); 
     
    23742374{ 
    23752375#ifdef USE_VERBOSE_PVS 
    2376         KdIntersectable *kdObj = static_cast<KdIntersectable *>(obj); 
    2377  
    2378         const AxisAlignedBox3 box = kdObj->GetBox(); 
     2376        const AxisAlignedBox3 box = obj->GetBox(); 
    23792377        const float dist = Distance(vc->GetBox().Center(), box.Center()); 
    23802378 
     
    24312429                //hasAbsContribution = viewCell->GetPvs().AddSample(obj,ray.mPdf); 
    24322430                 
    2433                 //if (hasAbsContribution)       UpdateStatsForViewCell(viewCell, obj); 
    2434                  
     2431                if (hasAbsContribution) 
     2432                { 
     2433                        if (QT_VISUALIZATION_SHOWN) 
     2434                        { 
     2435                                int numTriangles; 
     2436 
     2437                                if (obj->Type() == Intersectable::KD_INTERSECTABLE) 
     2438                                { 
     2439                                        numTriangles = GetPreprocessor()->mKdTree->GetNumObjects(static_cast<KdIntersectable *>(obj)->GetItem()); 
     2440                                } 
     2441                                else if (obj->Type() == Intersectable::SCENEGRAPHLEAF_INTERSECTABLE) 
     2442                                { 
     2443                                        numTriangles = static_cast<SceneGraphLeafIntersectable *>(obj)->GetItem()->mGeometry.size(); 
     2444                                } 
     2445 
     2446                                UpdateStatsForViewCell(viewCell, obj, numTriangles); 
     2447                        } 
     2448                } 
    24352449        } 
    24362450        else  
Note: See TracChangeset for help on using the changeset viewer.