Changeset 2117 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
- Timestamp:
- 02/15/07 13:19:17 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r2100 r2117 65 65 while (pit.HasMoreEntries()) 66 66 { 67 ObjectPvsEntry entry= pit.Next();68 69 if (! entry.mObject->Mailed())70 { 71 entry.mObject->Mail();67 Intersectable *obj = pit.Next(); 68 69 if (!obj->Mailed()) 70 { 71 obj->Mail(); 72 72 ++ count; 73 73 } … … 92 92 while (pit.HasMoreEntries()) 93 93 { 94 ObjectPvsEntry entry = pit.Next(); 95 entry.mObject->Mail(); 94 pit.Next()->Mail(); 96 95 } 97 96 … … 100 99 while (pit.HasMoreEntries()) 101 100 { 102 ObjectPvsEntry entry = pit.Next(); 103 104 Intersectable *obj = entry.mObject; 105 if (!obj->Mailed()) 101 if (!pit.Next()->Mailed()) 106 102 ++ pvs; 107 103 } … … 847 843 while (pit.HasMoreEntries()) 848 844 { 849 ObjectPvsEntry entry = pit.Next(); 850 851 Intersectable *obj = entry.mObject; 845 Intersectable *obj = pit.Next(); 852 846 853 847 obj->Mail(); … … 859 853 while (pit2.HasMoreEntries()) 860 854 { 861 ObjectPvsEntry entry = pit2.Next(); 862 Intersectable *obj = entry.mObject; 863 855 Intersectable *obj = pit2.Next(); 856 864 857 // test if object already considered 865 858 if (!obj->Mailed()) … … 1681 1674 while (pit.HasMoreEntries()) 1682 1675 { 1683 const ObjectPvsEntry &entry = pit.Next(); 1684 Intersectable *obj = entry.mObject; 1685 obj->Mail(); 1676 pit.Next()->Mail(); 1686 1677 } 1687 1678 } … … 1695 1686 while (pit.HasMoreEntries()) 1696 1687 { 1697 const ObjectPvsEntry &entry = pit.Next(); 1698 Intersectable *obj = entry.mObject; 1699 1700 obj->IncMail(); 1688 pit.Next()->IncMail(); 1701 1689 } 1702 1690 } … … 1705 1693 interior->GetPvs().Clear(false); 1706 1694 1695 PvsData pvsData; 1696 1707 1697 // only the objects which are present in all leaf pvs 1708 1698 // should remain in the parent pvs … … 1716 1706 while (pit.HasMoreEntries()) 1717 1707 { 1718 ObjectPvsEntry entry = pit.Next();1719 1720 if ( entry.mObject->Mailed(mail))1708 Intersectable *obj = pit.Next(pvsData); 1709 1710 if (obj->Mailed(mail)) 1721 1711 { 1722 interior->GetPvs().AddSample( entry.mObject, entry.mData.mSumPdf);1712 interior->GetPvs().AddSample(obj, pvsData.mSumPdf); 1723 1713 } 1724 1714 } … … 1733 1723 1734 1724 ObjectPvs newPvs; 1735 1725 1736 1726 while (pit.HasMoreEntries()) 1737 1727 { 1738 const ObjectPvsEntry &entry = pit.Next(); 1739 Intersectable *obj = entry.mObject; 1740 1741 /*if (obj->Mailed(mail)) 1742 { 1743 vc->GetPvs().RemoveSample(entry.mObject, Limits::Infinity)) 1744 }*/ 1728 Intersectable *obj = pit.Next(pvsData); 1729 1745 1730 if (!obj->Mailed(mail)) 1746 1731 { 1747 newPvs.AddSampleDirty(obj, entry.mData.mSumPdf);1732 newPvs.AddSampleDirty(obj, pvsData.mSumPdf); 1748 1733 } 1749 1734 } … … 1872 1857 while (oit.HasMoreEntries()) 1873 1858 { 1874 ObjectPvsEntry entry = oit.Next(); 1875 Intersectable *intersect = entry.mObject; 1859 Intersectable *intersect = oit.Next(); 1876 1860 1877 1861 if (!intersect->Mailed()) … … 2390 2374 while (it.HasMoreEntries()) 2391 2375 { 2392 ObjectPvsEntry entry = it.Next(); 2393 Intersectable *obj = entry.mObject; 2376 Intersectable *obj = it.Next(); 2394 2377 2395 2378 // hack: just output full pvs … … 2408 2391 else 2409 2392 { 2410 stream << entry.mObject->GetId() << " ";2393 stream << obj->GetId() << " "; 2411 2394 } 2412 2395 }
Note: See TracChangeset
for help on using the changeset viewer.