Changeset 498
- Timestamp:
- 01/04/06 19:34:11 (19 years ago)
- Location:
- trunk/VUT
- Files:
-
- 7 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj
r497 r498 62 62 <Tool 63 63 Name="VCCLCompilerTool" 64 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl"; include"64 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";..\src" 65 65 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;" 66 66 RuntimeLibrary="2" … … 77 77 Name="VCLinkerTool" 78 78 AdditionalDependencies="xerces-c_2.lib zdll.lib zziplib.lib devil.lib qtmain.lib QtOpenGL4.lib QtUiTools.lib QtCore4.lib QtDesigner4.lib QtGui4.lib QtAssistantClient.lib QtTest4.lib Qt3Supportd4.lib QAxContainer.lib QAxServerd.lib QtXml4.lib glut32.lib OpenGL32.Lib glu32.lib QAxServer.lib QtDesignerComponents4.lib" 79 AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;"$(QTDIR)\lib";..\include \GL"/>79 AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;"$(QTDIR)\lib";..\include;..\src\GL"/> 80 80 <Tool 81 81 Name="VCMIDLTool"/> -
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r497 r498 21 21 # stored sample rays 22 22 samplesFilename rays.out 23 useGlRenderer false23 useGlRenderer true 24 24 # type sampling 25 25 type vss -
trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.h
r497 r498 26 26 PvsRenderStatistics() { Reset(); } 27 27 28 Reset() {28 void Reset() { 29 29 maxError = 0.0f; 30 30 sumError = 0.0f; … … 49 49 50 50 public: 51 SceneGraph *mSceneGraph;52 51 ObjectContainer mObjects; 53 ViewCellsManager *mViewCellsManager; 54 52 55 53 Vector3 mViewPoint; 56 54 Vector3 mViewDirection; -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r495 r498 320 320 { 321 321 mViewCells.clear(); 322 322 323 CollectViewCells(); 323 324 mViewCellsStats.Reset(); -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r497 r498 1508 1508 void VspBspTree::CollectViewCells(ViewCellContainer &viewCells) const 1509 1509 { 1510 1511 1512 1510 stack<BspNode *> nodeStack; 1511 1512 if (!mRoot) 1513 1513 return; 1514 1514 1515 nodeStack.push(mRoot); 1516 1517 ViewCell::NewMail(); 1518 1519 while (!nodeStack.empty()) 1520 { 1521 BspNode *node = nodeStack.top(); 1522 nodeStack.pop(); 1523 1524 if (node->IsLeaf() && !mShowInvalidSpace && node->TreeValid()) 1525 { 1526 ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 1527 1528 if (!viewCell->Mailed()) 1529 { 1530 viewCell->Mail(); 1531 viewCells.push_back(viewCell); 1532 } 1533 } 1534 else 1535 { 1536 BspInterior *interior = dynamic_cast<BspInterior *>(node); 1537 1538 nodeStack.push(interior->GetFront()); 1539 nodeStack.push(interior->GetBack()); 1540 } 1541 } 1515 nodeStack.push(mRoot); 1516 1517 ViewCell::NewMail(); 1518 1519 while (!nodeStack.empty()) 1520 { 1521 BspNode *node = nodeStack.top(); 1522 nodeStack.pop(); 1523 1524 if (node->IsLeaf()) 1525 { 1526 if (!mShowInvalidSpace && node->TreeValid()) 1527 { 1528 ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 1529 1530 if (!viewCell->Mailed()) 1531 { 1532 viewCell->Mail(); 1533 viewCells.push_back(viewCell); 1534 } 1535 } 1536 } 1537 else 1538 { 1539 BspInterior *interior = dynamic_cast<BspInterior *>(node); 1540 1541 nodeStack.push(interior->GetFront()); 1542 nodeStack.push(interior->GetBack()); 1543 } 1544 } 1542 1545 } 1543 1546 … … 1742 1745 const bool onlyUnmailed) const 1743 1746 { 1744 PolygonContainer cell;1745 ConstructGeometry(n, cell);1747 PolygonContainer geom; 1748 ConstructGeometry(n, geom); 1746 1749 1747 1750 stack<BspNode *> nodeStack; … … 1758 1761 1759 1762 if (node->IsLeaf()) 1763 1760 1764 { // test if this leaf is in valid view space 1761 1765 if (node->TreeValid() && … … 1790 1794 BspInterior *interior = dynamic_cast<BspInterior *>(node); 1791 1795 1792 const int cf = Polygon3::ClassifyPlane( cell,1796 const int cf = Polygon3::ClassifyPlane(geom, 1793 1797 interior->GetPlane(), 1794 1798 mEpsilon); … … 1808 1812 } 1809 1813 1810 CLEAR_CONTAINER( cell);1814 CLEAR_CONTAINER(geom); 1811 1815 return (int)neighbors.size(); 1812 1816 } … … 1835 1839 BspNode *next; 1836 1840 1837 PolygonContainer cell;1841 PolygonContainer geom; 1838 1842 1839 1843 // todo: not very efficient: constructs full cell everytime 1840 ConstructGeometry(interior, cell);1841 1842 const int cf = Polygon3::ClassifyPlane( cell, halfspace, mEpsilon);1844 ConstructGeometry(interior, geom); 1845 1846 const int cf = Polygon3::ClassifyPlane(geom, halfspace, mEpsilon); 1843 1847 1844 1848 if (cf == Polygon3::BACK_SIDE) … … 2323 2327 leaf = (*iit).mLeaf; 2324 2328 2325 // view space does not correspond to valid space2329 // view space not valid 2326 2330 if (!leaf->TreeValid() || !prevLeaf->TreeValid()) 2327 2331 continue;
Note: See TracChangeset
for help on using the changeset viewer.