Ignore:
Timestamp:
11/10/05 01:09:53 (19 years ago)
Author:
mattausch
Message:

fixed pvs bug in bsp view cells

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp

    r396 r399  
    192192                         
    193193                        if (!ray.intersections.empty()) // second intersection found 
    194                                 { 
    195                                         sampleContributions +=  
    196                                                 AddObjectSamples(ray.intersections[0].mObject, ray); 
    197                                 } 
     194                        { 
     195                                sampleContributions +=  
     196                                        AddObjectSamples(ray.intersections[0].mObject, ray); 
     197                        } 
    198198                } 
    199199        } 
     
    475475                                        { 
    476476                                                ProcessBspViewCells(ray, 
    477                                                                                         object, 
     477                                                                                        reverseSample ? NULL : object, 
    478478                                                                                        faceIndex, 
    479479                                                                                        passContributingSamples, 
     
    907907 
    908908                        // export rays piercing this view cell 
    909                         exporter->ExportRays(vcRays[i], 1000, RgbColor(0, 1, 0)); 
     909                        exporter->ExportRays(vcRays[i], 10000, RgbColor(0, 1, 0)); 
    910910 
    911911                        m.mDiffuseColor = RgbColor(1, 0, 0); 
     
    981981 
    982982                        Exporter *exporter = Exporter::GetExporter(s); 
    983                         exporter->SetFilled(); 
    984  
    985                         ViewCellPvsMap::iterator it = vc->GetPvs().mEntries.begin(); 
    986  
     983                         
    987984                        exporter->SetFilled();//Wireframe(); 
    988985 
     
    1002999                        } 
    10031000 
    1004                         Debug << i << ": pvs size=" << (int)vc->GetPvs().GetSize() << endl; 
     1001                         
     1002                        Debug << i << ": pvs size=" << (int)vc->GetPvs().GetSize()  
     1003                                        << ", piercing rays=" << (int)vcRays[i].size() << endl; 
    10051004 
    10061005                         
    10071006                        // export rays piercing this view cell 
    1008                         exporter->ExportRays(vcRays[i], 10000, RgbColor(0, 1, 0)); 
    1009  
     1007                        exporter->ExportRays(vcRays[i], 1000, RgbColor(0, 1, 0)); 
     1008         
    10101009                        m.mDiffuseColor = RgbColor(1, 0, 0); 
    10111010                        exporter->SetForcedMaterial(m); 
    10121011 
     1012                        ViewCellPvsMap::const_iterator it, 
     1013                                it_end = vc->GetPvs().mEntries.end(); 
     1014 
    10131015                        // output PVS of view cell 
    1014                         for (; it != vc->GetPvs().mEntries.end(); ++ it)  
     1016                        for (it = vc->GetPvs().mEntries.begin(); it != it_end; ++ it)  
    10151017                        { 
    10161018                                Intersectable *intersect = (*it).first; 
    10171019                                if (!intersect->Mailed()) 
    10181020                                { 
     1021                                        Material m = RandomMaterial(); 
     1022                         
     1023                                        exporter->SetForcedMaterial(m); 
     1024 
    10191025                                        exporter->ExportIntersectable(intersect); 
    10201026                                        intersect->Mail(); 
Note: See TracChangeset for help on using the changeset viewer.