- Timestamp:
- 07/27/06 20:34:55 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.cpp
r1153 r1166 25 25 Camera camera; 26 26 27 cout << "here79\n";28 27 if (0) 29 28 { -
GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h
r1143 r1166 95 95 return a->mCounter > b->mCounter; 96 96 } 97 98 static string GetTypeName(Intersectable *obj) 99 { 100 switch(obj->Type()) 101 { 102 case MESH_INSTANCE: 103 return "mesh_instance\n"; 104 105 case TRANSFORMED_MESH_INSTANCE: 106 return "transformed_mesh_instance\n"; 107 108 case SPHERE: 109 return "sphere\n"; 110 111 case VIEW_CELL: 112 return "view cell\n"; 113 114 case OGRE_MESH_INSTANCE: 115 return "ogre_mesh_instance\n"; 116 117 case KD_INTERSECTABLE: 118 return "kd_intersectable\n"; 119 120 default: 121 return "unknown\n"; 122 } 123 } 97 124 }; 98 125 -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r1146 r1166 24 24 Vector3 normal; 25 25 26 const int i = RandomValue(0, mPreprocessor.mObjects.size() - 1);26 const int i = RandomValue(0, (int)mPreprocessor.mObjects.size() - 1); 27 27 28 28 Intersectable *object = mPreprocessor.mObjects[i]; -
GTP/trunk/Lib/Vis/Preprocessing/src/SceneGraph.cpp
r1002 r1166 152 152 } 153 153 154 155 void SceneGraph::ExportScene(const string filename) 156 { 157 // export binary version of mesh 154 158 } 159 160 void SceneGraph::LoadScene(const string filename) 161 { 162 // load binary version of mesh 163 } 164 165 } -
GTP/trunk/Lib/Vis/Preprocessing/src/SceneGraph.h
r1002 r1166 44 44 AxisAlignedBox3 GetBox() const { return mRoot->mBox; } 45 45 46 /** Exports binary version of the scene. 47 */ 48 void ExportScene(const string filename); 49 50 /** Loads binary version of the scene. 51 */ 52 void LoadScene(const string filename); 53 46 54 protected: 47 55 }; -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r1161 r1166 1426 1426 1427 1427 1428 void ViewCellsTree::UpdateStats(ofstream &stats, 1429 const int pass, 1430 const int viewCells, 1431 const float renderCostDecrease, 1432 const float totalRenderCost, 1433 const int currentPvs, 1434 const float expectedCost, 1435 const float avgRenderCost, 1436 const float deviation, 1437 const int totalPvs, 1438 const int entriesInPvs, 1439 const int pvsSizeDecr, 1440 const float volume) 1441 { 1442 stats << "#Pass\n" << pass << endl 1443 //<< "#Merged\n" << mergeStats.merged << endl 1444 << "#ViewCells\n" << viewCells << endl 1445 << "#RenderCostDecrease\n" << renderCostDecrease << endl // TODO 1446 << "#TotalRenderCost\n" << totalRenderCost << endl 1447 << "#CurrentPvs\n" << currentPvs << endl 1448 << "#ExpectedCost\n" << expectedCost << endl 1449 << "#AvgRenderCost\n" << avgRenderCost << endl 1450 << "#Deviation\n" << deviation << endl 1451 << "#TotalPvs\n" << totalPvs << endl 1452 << "#TotalEntriesInPvs\n" << entriesInPvs << endl 1453 << "#PvsSizeDecrease\n" << pvsSizeDecr << endl // TODO 1454 << "#Volume\n" << volume << endl 1455 << endl; 1456 } 1457 1428 1458 void ViewCellsTree::ExportStats(const string &mergeStats) 1429 1459 { … … 1444 1474 */ 1445 1475 1446 int totalPvs;1447 1476 float totalRenderCost, avgRenderCost, expectedCost; 1448 1477 1449 1478 float deviation = 0; 1450 totalPvs = rootPvs; 1479 int totalPvs = rootPvs; 1480 int entriesInPvs = rootEntries; 1481 1451 1482 totalRenderCost = avgRenderCost = expectedCost = (float)rootPvs; 1452 1483 … … 1455 1486 1456 1487 //-- first view cell 1457 stats 1458 << "#Pass\n" << 0 << endl 1459 //<< "#Merged\n" << mergeStats.merged << endl 1460 << "#ViewCells\n" << numViewCells << endl 1461 << "#RenderCostDecrease\n" << 0 << endl // TODO 1462 << "#TotalRenderCost\n" << totalRenderCost << endl 1463 << "#CurrentPvs\n" << rootPvs << endl 1464 << "#CurrentEntries\n" << rootEntries << endl 1465 << "#ExpectedCost\n" << expectedCost << endl 1466 << "#AvgRenderCost\n" << avgRenderCost << endl 1467 << "#Deviation\n" << deviation << endl 1468 << "#TotalPvs\n" << totalPvs << endl 1469 << "#PvsSizeDecrease\n" << 0 << endl // TODO 1470 << "#Volume\n" << mRoot->GetVolume() << endl 1471 << endl; 1488 UpdateStats(stats, 1489 0, numViewCells, 0, totalRenderCost, 1490 rootPvs, expectedCost, avgRenderCost, deviation, 1491 totalPvs, entriesInPvs, 0, mRoot->GetVolume()); 1492 1472 1493 1473 1494 //-- go through tree in the order of render cost decrease … … 1484 1505 { 1485 1506 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 1486 1507 1487 1508 const int parentPvs = GetPvsSize(interior); 1488 const float parentCost = (float)parentPvs * interior->GetVolume(); 1509 const int parentPvsEntries = GetPvsEntries(interior); 1510 const float parentCost = (float)parentPvs * interior->GetVolume(); 1511 1489 1512 float childCost = 0; 1490 1513 int childPvs = 0; 1514 int childPvsEntries = 0; 1491 1515 1492 1516 -- numViewCells; … … 1496 1520 for (it = interior->mChildren.begin(); it != it_end; ++ it) 1497 1521 { 1498 const int pvsSize = GetPvsSize(*it); 1499 childCost += (float) pvsSize * (*it)->GetVolume(); 1522 ViewCell *vc = *it; 1523 const int pvsSize = GetPvsSize(vc); 1524 const int pvsEntries = GetPvsEntries(vc); 1525 1526 childCost += (float) pvsSize * vc->GetVolume(); 1500 1527 childPvs += pvsSize; 1501 1502 tqueue.push(*it); 1528 childPvsEntries += pvsEntries; 1529 1530 tqueue.push(vc); 1503 1531 ++ numViewCells; 1504 1532 } … … 1509 1537 totalRenderCost -= costDecr; 1510 1538 totalPvs += childPvs - parentPvs; 1511 1539 entriesInPvs += childPvsEntries - parentPvsEntries; 1540 1512 1541 expectedCost = totalRenderCost / (float)numViewCells; 1513 1542 avgRenderCost = (float)totalPvs / (float)numViewCells; 1514 1543 1515 stats 1516 << "#Pass\n" << 0 << endl 1517 //<< "#Merged\n" << mergeStats.merged << endl 1518 << "#ViewCells\n" << numViewCells << endl 1519 << "#RenderCostDecrease\n" << costDecr << endl // TODO 1520 << "#TotalRenderCost\n" << totalRenderCost << endl 1521 << "#CurrentPvs\n" << parentPvs << endl 1522 << "#ExpectedCost\n" << expectedCost << endl 1523 << "#AvgRenderCost\n" << avgRenderCost << endl 1524 << "#Deviation\n" << deviation << endl 1525 << "#TotalPvs\n" << totalPvs << endl 1526 << "#PvsSizeDecrease\n" << childPvs - parentPvs << endl // TODO 1527 << "#Volume\n" << vc->GetVolume() << endl 1528 << endl; 1544 UpdateStats(stats, 1545 0, numViewCells, costDecr, totalRenderCost, 1546 parentPvs, expectedCost, avgRenderCost, deviation, 1547 totalPvs, entriesInPvs, childPvs - parentPvs, 1548 vc->GetVolume()); 1529 1549 1530 1550 } … … 1635 1655 } 1636 1656 1637 // TODO matt: implement for different storing methods1657 // TODO matt: implement this function for different storing methods 1638 1658 void ViewCellsTree::GetPvs(ViewCell *vc, ObjectPvs &pvs) const 1639 1659 { … … 1686 1706 1687 1707 1708 int ViewCellsTree::GetPvsSizeForLeafStorage(ViewCell *vc) const 1709 { 1710 int pvsSize = 0; 1711 1712 // pvs is always stored directly in leaves 1713 if (vc->IsLeaf()) 1714 { 1715 pvsSize = vc->GetPvs().CountPvs(); 1716 //int pvsSize1 = vc->GetPvs().GetSize(); 1717 //Debug << "entries num: " << pvsSize1 << " size: "" << pvsSize << endl; 1718 } 1719 else // interior node 1720 { 1721 // interior nodes: pvs is either stored as a scalar or 1722 // has to be reconstructed from the leaves 1723 1724 // the stored pvs size is the valid pvs size => just return scalar 1725 if (vc->mPvsSizeValid) 1726 { 1727 pvsSize = vc->mPvsSize; 1728 } 1729 1730 // if no valid pvs size stored as a scalar => 1731 // compute current pvs size of interior from it's leaf nodes 1732 ViewCellContainer leaves; 1733 CollectLeaves(vc, leaves); 1734 1735 ViewCellContainer::const_iterator it, it_end = leaves.end(); 1736 1737 Intersectable::NewMail(); 1738 1739 // sum different intersectables 1740 for (it = leaves.begin(); it != it_end; ++ it) 1741 { 1742 pvsSize = GetPvsSizeForLeafStorage(*it); 1743 } 1744 } 1745 1746 return pvsSize; 1747 } 1748 1749 1750 int ViewCellsTree::GetEntriesInPvsForLeafStorage(ViewCell *vc) const 1751 { 1752 int pvsSize = 0; 1753 1754 // pvs is always stored directly in leaves 1755 if (vc->IsLeaf()) 1756 { 1757 pvsSize = vc->GetPvs().GetSize(); 1758 } 1759 else // interior node 1760 { 1761 // interior nodes: pvs is either stored as a scalar or 1762 // has to be reconstructed from the leaves 1763 1764 // the stored pvs size is the valid pvs size => just return scalar 1765 if (vc->mPvsSizeValid) 1766 { 1767 pvsSize = vc->mEntriesInPvs; 1768 } 1769 1770 // if no valid pvs size stored as a scalar => 1771 // compute current pvs size of interior from it's leaf nodes 1772 ViewCellContainer leaves; 1773 CollectLeaves(vc, leaves); 1774 1775 ViewCellContainer::const_iterator it, it_end = leaves.end(); 1776 1777 Intersectable::NewMail(); 1778 1779 // sum different intersectables 1780 for (it = leaves.begin(); it != it_end; ++ it) 1781 { 1782 pvsSize = GetEntriesInPvsForLeafStorage(*it); 1783 } 1784 } 1785 1786 return pvsSize; 1787 } 1788 1789 1790 int ViewCellsTree::GetPvsSizeForCompressedStorage(ViewCell *vc) const 1791 { 1792 int pvsSize = 0; 1793 1794 //-- compressed pvs 1795 1796 // the stored pvs size is the valid pvs size => just return scalar 1797 if (vc->mPvsSizeValid) 1798 { 1799 pvsSize = vc->mPvsSize; 1800 } 1801 1802 // if no pvs size stored, compute new one 1803 ViewCell *root = vc; 1804 1805 // also add pvs from this view cell to root 1806 while (root->GetParent()) 1807 { 1808 root = root->GetParent(); 1809 1810 // matt: bug! must evaluate kd pvss also 1811 pvsSize += CountDiffPvs(root); 1812 } 1813 1814 stack<ViewCell *> tstack; 1815 tstack.push(vc); 1816 1817 while (!tstack.empty()) 1818 { 1819 vc = tstack.top(); 1820 tstack.pop(); 1821 // matt: bug! must evaluate kd pvss also 1822 pvsSize += CountDiffPvs(vc); 1823 1824 if (!vc->IsLeaf()) 1825 { 1826 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 1827 1828 ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 1829 1830 for (it = interior->mChildren.begin(); it != it_end; ++ it) 1831 { 1832 tstack.push(*it); 1833 } 1834 } 1835 } 1836 1837 return pvsSize; 1838 } 1839 1840 1841 int ViewCellsTree::GetEntriesInPvsForCompressedStorage(ViewCell *vc) const 1842 { 1843 int pvsSize = 0; 1844 1845 //-- compressed pvs 1846 1847 // the stored pvs size is the valid pvs size => just return scalar 1848 if (vc->mPvsSizeValid) 1849 { 1850 pvsSize = vc->mEntriesInPvs; 1851 } 1852 1853 // if no pvs size stored, compute new one 1854 ViewCell *root = vc; 1855 1856 // also add pvs from this view cell to root 1857 while (root->GetParent()) 1858 { 1859 root = root->GetParent(); 1860 // count the pvs entries different from the already found ones 1861 pvsSize += CountDiffPvs(root); 1862 } 1863 1864 stack<ViewCell *> tstack; 1865 tstack.push(vc); 1866 1867 while (!tstack.empty()) 1868 { 1869 vc = tstack.top(); 1870 tstack.pop(); 1871 1872 // count the pvs entries different from the already found ones 1873 pvsSize += CountDiffPvs(vc); 1874 1875 if (!vc->IsLeaf()) 1876 { 1877 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 1878 1879 ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 1880 1881 for (it = interior->mChildren.begin(); it != it_end; ++ it) 1882 { 1883 tstack.push(*it); 1884 } 1885 } 1886 } 1887 1888 return pvsSize; 1889 } 1890 1891 1688 1892 int ViewCellsTree::GetPvsSize(ViewCell *vc) const 1689 1893 { … … 1700 1904 case PVS_IN_LEAVES: //-- store pvs only in leaves 1701 1905 { 1702 // pvs is always stored directly in leaves 1703 if (vc->IsLeaf()) 1704 { 1705 pvsSize = vc->GetPvs().CountPvs(); 1706 } 1707 else // interior node 1708 { 1709 // interior nodes: pvs is either stored as a scalar or 1710 // has to be reconstructed from the leaves 1711 1712 // the stored pvs size is the valid pvs size => just return scalar 1713 if (vc->mPvsSizeValid) 1714 { 1715 pvsSize = vc->mPvsSize; 1716 break; 1717 } 1718 1719 //-- if no valid pvs size stored as a scalar => 1720 //-- compute current pvs size of interior from it's leaf nodes 1721 ViewCellContainer leaves; 1722 CollectLeaves(vc, leaves); 1723 1724 ViewCellContainer::const_iterator it, it_end = leaves.end(); 1725 1726 Intersectable::NewMail(); 1727 1728 // sum different intersectables 1729 for (it = leaves.begin(); it != it_end; ++ it) 1730 { 1731 ObjectPvsMap::iterator oit, oit_end = (*it)->GetPvs().mEntries.end(); 1732 1733 // mail all from first pvs 1734 for (oit = (*it)->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1735 { 1736 Intersectable *intersect = (*oit).first; 1737 1738 if (!intersect->Mailed()) 1739 { 1740 ++ pvsSize; 1741 intersect->Mail(); 1742 } 1743 } 1744 } 1745 1746 break; 1747 } 1906 pvsSize = GetPvsSizeForLeafStorage(vc); 1907 break; 1748 1908 } 1749 1909 case COMPRESSED: 1750 1910 { 1751 //////////////////////// 1752 //-- compressed pvs 1753 1754 // the stored pvs size is the valid pvs size => just return scalar 1755 if (vc->mPvsSizeValid) 1756 { 1757 pvsSize = vc->mPvsSize; 1758 break; 1759 } 1760 1761 // if no pvs size stored, compute new one 1762 int pvsSize = 0; 1763 ViewCell *root = vc; 1764 1765 // also add pvs from this view cell to root 1766 while (root->GetParent()) 1767 { 1768 root = root->GetParent(); 1769 // matt: bug! must evaluate kd pvss also 1770 pvsSize += CountDiffPvs(root); 1771 } 1772 1773 stack<ViewCell *> tstack; 1774 tstack.push(vc); 1775 1776 while (!tstack.empty()) 1777 { 1778 vc = tstack.top(); 1779 tstack.pop(); 1780 1781 pvsSize += CountDiffPvs(vc); 1782 1783 if (!vc->IsLeaf()) 1784 { 1785 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 1786 1787 ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 1788 1789 for (it = interior->mChildren.begin(); it != it_end; ++ it) 1790 { 1791 tstack.push(*it); 1792 } 1793 } 1794 } 1911 pvsSize = GetPvsSizeForCompressedStorage(vc); 1795 1912 break; 1796 1913 } … … 1820 1937 case PVS_IN_LEAVES: //-- store pvs only in leaves 1821 1938 { 1822 // pvs is always stored directly in leaves 1823 if (vc->IsLeaf()) 1824 { 1825 pvsSize = vc->GetPvs().GetSize(); 1826 } 1827 else // interior node 1828 { 1829 // interior nodes: pvs is either stored as a scalar or 1830 // has to be reconstructed from the leaves 1831 1832 // the stored pvs size is the valid pvs size => just return scalar 1833 if (vc->mPvsSizeValid) 1834 { 1835 pvsSize = vc->mPvsSize; 1836 break; 1837 } 1838 1839 // if no valid pvs size stored as a scalar => 1840 // compute current pvs size of interior from it's leaf nodes 1841 ViewCellContainer leaves; 1842 CollectLeaves(vc, leaves); 1843 1844 ViewCellContainer::const_iterator it, it_end = leaves.end(); 1845 1846 Intersectable::NewMail(); 1847 1848 // sum different intersectables 1849 for (it = leaves.begin(); it != it_end; ++ it) 1850 { 1851 ObjectPvsMap::iterator oit, oit_end = (*it)->GetPvs().mEntries.end(); 1852 1853 // mail all from first pvs 1854 for (oit = (*it)->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1855 { 1856 Intersectable *intersect = (*oit).first; 1857 1858 if (!intersect->Mailed()) 1859 { 1860 ++ pvsSize; 1861 intersect->Mail(); 1862 } 1863 } 1864 } 1865 1866 break; 1867 } 1939 pvsSize = GetEntriesInPvsForLeafStorage(vc); 1940 break; 1868 1941 } 1869 1942 case COMPRESSED: 1870 1943 { 1871 //////////////////////// 1872 //-- compressed pvs 1873 1874 // the stored pvs size is the valid pvs size => just return scalar 1875 if (vc->mPvsSizeValid) 1876 { 1877 pvsSize = vc->mPvsSize; 1878 break; 1879 } 1880 1881 // if no pvs size stored, compute new one 1882 int pvsSize = 0; 1883 ViewCell *root = vc; 1884 1885 // also add pvs from this view cell to root 1886 while (root->GetParent()) 1887 { 1888 root = root->GetParent(); 1889 pvsSize += CountDiffPvs(root); 1890 } 1891 1892 stack<ViewCell *> tstack; 1893 tstack.push(vc); 1894 1895 while (!tstack.empty()) 1896 { 1897 vc = tstack.top(); 1898 tstack.pop(); 1899 1900 pvsSize += CountDiffPvs(vc); 1901 1902 if (!vc->IsLeaf()) 1903 { 1904 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 1905 1906 ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 1907 1908 for (it = interior->mChildren.begin(); it != it_end; ++ it) 1909 { 1910 tstack.push(*it); 1911 } 1912 } 1913 } 1944 pvsSize = GetEntriesInPvsForCompressedStorage(vc); 1914 1945 break; 1915 1946 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r1161 r1166 619 619 #endif 620 620 621 int GetEntriesInPvsForCompressedStorage(ViewCell *vc) const; 622 int GetPvsSizeForCompressedStorage(ViewCell *vc) const; 623 int GetPvsSizeForLeafStorage(ViewCell *vc) const; 624 int GetEntriesInPvsForLeafStorage(ViewCell *vc) const; 625 626 void UpdateStats( 627 ofstream &stats, 628 const int pass, 629 const int viewCells, 630 const float renderCostDecrease, 631 const float totalRenderCost, 632 const int currentPvs, 633 const float expectedCost, 634 const float avgRenderCost, 635 const float deviation, 636 const int totalPvs, 637 const int entriesInPvs, 638 const int pvsSizeDecr, 639 const float volume); 621 640 622 641 /// if the view cell tree hold compressed pvs -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1161 r1166 21 21 22 22 // should not count origin object for sampling because it disturbs heuristics 23 #define COUNT_ORIGIN_OBJECTS 023 #define SAMPLE_ORIGIN_OBJECTS 0 24 24 25 25 namespace GtpVisibilityPreprocessor { … … 1898 1898 // made in one direction!!! 1899 1899 // the other contributions of this sample will be counted for the oposite ray! 1900 #if COUNT_ORIGIN_OBJECTS1900 #if SAMPLE_ORIGIN_OBJECTS 1901 1901 if (ray.mOriginObject && 1902 1902 viewcell->GetPvs().GetSampleContribution(ray.mOriginObject, … … 1927 1927 viewcell->GetPvs().AddSample(ray.mTerminationObject, ray.mPdf); 1928 1928 } 1929 #if COUNT_ORIGIN_OBJECTS1929 #if SAMPLE_ORIGIN_OBJECTS 1930 1930 if (ray.mOriginObject) 1931 1931 { … … 5809 5809 // made in one direction!!! 5810 5810 // the other contributions of this sample will be counted for the oposite ray! 5811 #if COUNT_ORIGIN_OBJECTS5811 #if SAMPLE_ORIGIN_OBJECTS 5812 5812 if (ray.mOriginObject && 5813 5813 viewcell->GetPvs().GetSampleContribution(ray.mOriginObject, … … 5850 5850 } 5851 5851 5852 #if COUNT_ORIGIN_OBJECTS5852 #if SAMPLE_ORIGIN_OBJECTS 5853 5853 if (ray.mOriginObject) 5854 5854 viewcell->AddPvsSample(ray.mOriginObject, ray.mPdf, ray.mPvsContribution); -
GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.cpp
r1141 r1166 177 177 case Intersectable::KD_INTERSECTABLE: 178 178 ExportKdIntersectable(*(dynamic_cast<KdIntersectable *>(object))); 179 break; 179 180 default: 180 cerr << "Sorry the export for object not yet defined" << endl;181 cerr << "Sorry the export for object type " << Intersectable::GetTypeName(object) << " is not available yet" << endl; 181 182 break; 182 183 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
r1160 r1166 813 813 814 814 //Debug << "f: " << frontData.mRays->size() << " b: " << backData.mRays->size() << "d: " << tData.mRays->size() << endl; 815 815 816 //-- compute pvs 816 817 frontData.mPvs = ComputePvsSize(*frontData.mRays); … … 843 844 #ifdef _DEBUG 844 845 Debug << interior << endl; 845 #endif 846 #endif+ 846 847 847 848 … … 1157 1158 // add objects without the objects which are in several kd leaves 1158 1159 pvsSize += (int)(leaf->mObjects.size() - leaf->mMultipleObjects.size()); 1159 //Debug << " here11" << (int)leaf->mObjects.size() << " " << leaf->mMultipleObjects.size() << endl;1160 //Debug << "adding " << (int)leaf->mObjects.size() << " " << leaf->mMultipleObjects.size() << endl; 1160 1161 } 1161 1162 else … … 3229 3230 int &objectsBack) 3230 3231 { 3232 RayInfoContainer usedRays; 3233 int mMaxTests = 5000; 3234 if (mMaxTests < (int)tData.mRays->size()) 3235 { 3236 GetRayInfoSets(*tData.mRays, mMaxTests, usedRays); 3237 } 3238 else 3239 { 3240 usedRays = *tData.mRays; 3241 } 3242 3231 3243 // go through the lists, count the number of objects left and right 3232 3244 // and evaluate the following cost funcion: … … 3253 3265 int vcr = numViewCells; 3254 3266 3255 const int totalPvs = tData.mNode->mObjects.size(); 3267 /// this is kind of a reverse pvs 3268 const int totalPvs = (int)tData.mNode->mObjects.size(); 3256 3269 3257 3270 int pvsl = 0; -
GTP/trunk/Lib/Vis/QtRenderer/QtGlRenderer.cpp
r1151 r1166 1359 1359 1360 1360 1361 int currentPos = mViewCellsManager->GetViewCells().size();1362 float currentCost= -1;1361 int currentPos = (int)mViewCellsManager->GetViewCells().size(); 1362 float currentCost= -1; 1363 1363 1364 1364 if (currentPos < costFunction.size()) -
GTP/trunk/Lib/Vis/QtRenderer/QtRenderer.vcproj
r1163 r1166 20 20 Name="VCCLCompilerTool" 21 21 Optimization="0" 22 AdditionalIncludeDirectories=" ..\Preprocessing\src;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";..\..\..\..\..\NonGTP\Zlib\include;"$(CG_INC_PATH)""22 AdditionalIncludeDirectories=""$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";..\Preprocessing\src;..\..\..\..\..\NonGTP\Zlib\include;"$(CG_INC_PATH)"" 23 23 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;QTRENDERER_EXPORTS" 24 24 MinimalRebuild="TRUE" … … 28 28 WarningLevel="3" 29 29 Detect64BitPortabilityProblems="TRUE" 30 DebugInformationFormat=" 3"/>30 DebugInformationFormat="4"/> 31 31 <Tool 32 32 Name="VCCustomBuildTool"/> 33 33 <Tool 34 34 Name="VCLinkerTool" 35 AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4 .lib Qt3Support4.lib QAxContainer.lib QtCore4.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib"36 OutputFile="$(OutDir)/Qt GlRenderer.dll"37 LinkIncremental=" 1"35 AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4d.lib Qt3Support4d.lib QAxContainerd.lib QtCore4d.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib" 36 OutputFile="$(OutDir)/QtRenderer.dll" 37 LinkIncremental="2" 38 38 AdditionalLibraryDirectories=""$(QTDIR)\lib";..\..\..\..\..\NonGTP\Zlib\lib;"$(CG_LIB_PATH)";"..\Preprocessing\lib\$(ConfigurationName)";..\Preprocessing\src\GL;..\..\..\..\..\NonGTP\Xerces\xercesc\lib" 39 39 GenerateDebugInformation="TRUE" 40 ProgramDatabaseFile="$(OutDir)/ $(ProjectName).pdb"40 ProgramDatabaseFile="$(OutDir)/QtRenderer.pdb" 41 41 SubSystem="2" 42 42 ImportLibrary="$(OutDir)/QtRenderer.lib"
Note: See TracChangeset
for help on using the changeset viewer.